Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int __cdecl sub_40BB60()
- {
- char v0; // si@1
- int v1; // edx@1
- int v2; // ecx@1
- unsigned int v3; // eax@1
- int v4; // edi@1
- int v5; // esi@1
- int result; // eax@1
- v0 = random_state;
- v1 = dword_685440[((_BYTE)random_state - 3) & 0xF];
- v2 = dword_685440[random_state] ^ v1 ^ ((v1 ^ 2 * dword_685440[random_state]) << 15);
- v3 = ((unsigned int)dword_685440[((_BYTE)random_state - 7) & 0xF] >> 11) ^ dword_685440[((_BYTE)random_state - 7) & 0xF];
- v4 = v3 ^ dword_685440[random_state] ^ v1 ^ ((v1 ^ 2 * dword_685440[random_state]) << 15);
- dword_685440[random_state] = v4;
- v5 = (v0 - 1) & 0xF;
- result = dword_685440[v5] ^ v2 ^ v4 ^ 32 * (v4 & 0xFED22169) ^ 4 * (dword_685440[v5] ^ ((v2 ^ (v3 << 10)) << 16));
- random_state = v5;
- dword_685440[v5] = result;
- return result;
- }
- DWORD a = g_state[g_stateIdx];
- DWORD b = g_state[(g_stateIdx - 3) % 16];
- DWORD c = a ^ b ^ ((b ^ 2 * a) << 15);
- DWORD d = (g_state[(g_stateIdx - 7) & 0xF] >> 11) ^ g_state[(g_stateIdx - 7) & 0xF] ^ c;
- DWORD e = d ^ c;
- g_state[g_stateIdx] = e;
- DWORD f = e ^ 0x20 * (e & 0xFED22169);
- g_stateIdx = (g_stateIdx - 1) % 16;
- DWORD g = g_state[g_stateIdx];
- DWORD h = f ^ 4 * (g ^ ((c ^ (d << 10)) << 16));
- g_state[g_stateIdx] = g ^ c ^ h;
- return g_state[g_stateIdx];
- DWORD f = e ^ 0x20 * (e & 0xFED22169);
- d = a ^ ((a << 5) & 0xda442d20UL);
- ((signed)0xda442d24 >> 5) == 0xfed2169
- 0x20 == 1 << 5
Add Comment
Please, Sign In to add comment