Code: Select all
uint8_t kBox1[20] = {
0xEB, 0x57, 0x50, 0x86, 0x32, 0x0D, 0x27, 0x60, 0xF4, 0xDE,
0xF2, 0x4F, 0x6F, 0x13, 0xDA, 0x7B, 0x29, 0x3F, 0xF1, 0x41};
uint8_t kBox2[20] = {
0x2D, 0x50, 0xD7, 0x64, 0x17, 0xAB, 0x25, 0x0B, 0xC0, 0x3E,
0x61, 0x49, 0x20, 0x7A, 0x8E, 0x78, 0xA0, 0x67, 0x8D, 0x29};
uint32_t Var4 = 0;
int32_t Var8 = (kBox2[16] * kBox1[12]) * dwSize;
for(int32_t i = 0; i < dwSize; i++)
{
uint32_t j = int32_t(Var8 & (Var4 << 11)) >> (kBox2[19-(i % 20)] % 7);
lpBuffer[i] ^= kBox1[j % 20] ^ (j + j / 255) ^ kBox2[i % 20];
Var4 += dwSize;
}
Files for testing are attached. I will be glad to any help and advice.
Thanks in advance