Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:37:36+00:00 2026-05-27T23:37:36+00:00

Im stuck reverse engineering a piece of java code. I was wondering if someone

  • 0

Im stuck reverse engineering a piece of java code. I was wondering if someone could help me out!

String var1 = "hello";
String var2 = "123456";

long var_l = 0L;
byte[] a1 = new byte[50];
byte[] a2 = new byte[50];

// i believe this checks if its between a-Z?
for (int j = 0; j < var1.length(); j++)
{
    a2[j] = (byte) var1.charAt(j);

    if ((a2[j] < 65) || (a2[j] > 122)
    {
        continue;
    } 

    var_l += 145 + a2[j];
}

The next part i really dont understand

var_l *= a1[0]; // a1 is a byte array of var2
var_l = 0xFFFF & var_l * (0xFF & var_l);

if (var_l < 100L)
{
    var_l = 2728L;
}

Could someone please help me out here? Im trying to learn cyphering algorithms here but im having trouble following the logic.

Here is the full code:

param_licensekey & licensename & lictype are global vars. Please read my comment below about the reason why im reverse engineering this. Thanks for all the awnsers.

public boolean check_license()
  {
    long l = 0L;
    byte[] arrayOfByte2 = new byte['ÿ'];
    byte[] arrayOfByte1 = new byte['ÿ'];
    int i;
    if (this.param_licensename.length() >= 2)
    {
      if (this.param_licensekey.length() >= 2)
      {
        for (int j = 0; j < this.param_licensekey.length(); j++)
          arrayOfByte1[j] = (byte)this.param_licensekey.charAt(j);
        for (j = 0; j < this.param_licensename.length(); j++)
        {
          arrayOfByte2[j] = (byte)this.param_licensename.charAt(j);
          if ((this.param_licensename.charAt(j) < 'A') || (this.param_licensename.charAt(j) > 'Z'))
            continue;
          arrayOfByte2[j] = (byte)(32 + arrayOfByte2[j]);
        }
        for (j = 0; j < this.param_licensename.length(); j++)
        {
          if ((arrayOfByte2[j] < 65) || (arrayOfByte2[j] > 122))
            continue;
          l += 145 + arrayOfByte2[j];
        }
        l *= arrayOfByte1[0];
        l = 0xFFFF & l * (0xFF & l);
        if (l < 100L)
          l = 2728L;
        String str = this.param_licensekey.charAt(0) + l;
        if (!this.param_licensekey.startsWith(str))
        {
          this.lictype = -1;
          i = 0;
        }
        else
        {
          this.lictype = (i[0] - 48);
          i = 1;
        }
      }
      else
      {
        i = 0;
      }
    }
    else
      i = 0;
    return i;
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:37:36+00:00Added an answer on May 27, 2026 at 11:37 pm
    // var_l = var_l * a1[0]
    var_l *= a1[0]; // a1 is a byte array of var2
    
    // The low 16 bits of var_l are multipled by the low 8 bits of var_l (the parenthesis
    // are not necessary in this case).
    var_l = 0xFFFF & var_l * (0xFF & var_l);
    
    // Self explanatory
    if (var_l < 100L) {
     var_l = 2728L;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm kinda stuck with this one so I hoped someone could help me. I
I've been contemplating how to protect my C/C++ code from disassembly and reverse engineering.
Reverse engineering source code into a VS 2010 UML class model? I have a
I'm trying to learn reverse engineering, and I'm stuck on this little thing. I
Any code-analysis or reverse-engineering tool that can do either of these?: Calculate which classes
Really stuck on trying to write code to unzip a file or directory on
I'm in the process of reverse-engineering a Windows executable. I found a class that
Hello I'm making RSS reader and I'm using DOM. Now I stuck, trying to
I am new to rails so could use some help here. I have followed
Probably simple question and I'm just missing something, but I'm stuck out of ideas.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.