Don't forget to give proper credit. Unknown V2 figured out the checksum routine.
Code:
unsigned char TwoWorldsObfTable[32] = {
0x36, 0xEF, 0x64, 0xBA,
0x43, 0x39, 0x09, 0xD4,
0x5D, 0xE3, 0xEA, 0x6F,
0x43, 0x8D, 0xFF, 0x40,
0x03, 0x75, 0x94, 0x1C,
0x4B, 0xA2, 0xF9, 0x43,
0x10, 0xDF, 0x66, 0x9C,
0x0C, 0x95, 0xED, 0xFE,
} ;
unsigned int two_worlds_checksum(unsigned char* pbInp, unsigned int cbInp) {
int x;
unsigned int sig = 0;
for (x = 0; x < cbInp; x++) {
sig ^= (pbInp[x] ^ TwoWorldsObfTable[( x & 0x1f)]) << ((x << 3) & 0x18);
}
return sig;
}