
Originally Posted by
Method
songoda explained why the application is no longer working. What are you on about?
As for updating the application, I don't think I'm interested enough to figure out how the string obfuscation works and reverse it. If anyone else wants to do so, you're free to submit an updated version. I'll add it to the main post.
Method it's actually fairly easy. Every class has some code that looks like this:
Code:
public char[] z(String str) {
char[] ch = str.toCharArray();
if (ch.length < 2)
ch[0] ^= *random value*;
return ch;
}
public String z(char[] ch) {
for (int pos = 0; pos < ch.length; pos++) {
switch (pos % 5) {
case 0:
ch[pos] ^= *random value*;
break;
case 1:
ch[pos] ^= *random value*;
break;
case 2:
ch[pos] ^= *random value*;
break;
case 3:
ch[pos] ^= *random value*;
break;
default:
ch[pos] ^= *random value*;
break;
}
}
return new String(ch).intern();
}
Each class also has a static array of strings which is initialized in the static initializer, like this:
Code:
static {
strings = new String[] {
z(z("encrypted string here")), z(z("encrypted string here")) //etc
}
}
In the code they are simply referred to as:
etc.
The random values change for each class but it's quite simple to find those by using these patterns:
Code:
CALOAD (BIPUSH | SIPUSH | ICONST) IXOR I2C CASTORE
CALOAD ILOAD ICONST IREM (TABLESWITCH | LOOKUPSWITCH) ((BIPUSH | SIPUSH | ICONST) GOTO?)* IXOR I2C CASTORE
I also used this to find the code which populates the table:
Code:
(ICONST | BIPUSH | SIPUSH | LDC) ANEWARRAY (DUP (ICONST | BIPUSH | SIPUSH | LDC) LDC INVOKESTATIC INVOKESTATIC AASTORE)+ PUTSTATIC
Then, once you've decrypted the strings in the table, you simply have to replace any sequence of GETSTATIC, ICONST/BIPUSH/SIPUSH, AALOAD which refers to that array, with an LDC which refers to the decrypted string.