Guest User

Untitled

a guest
May 26th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. int __cdecl sub_40BB60()
  2. {
  3. char v0; // si@1
  4. int v1; // edx@1
  5. int v2; // ecx@1
  6. unsigned int v3; // eax@1
  7. int v4; // edi@1
  8. int v5; // esi@1
  9. int result; // eax@1
  10.  
  11. v0 = random_state;
  12. v1 = dword_685440[((_BYTE)random_state - 3) & 0xF];
  13. v2 = dword_685440[random_state] ^ v1 ^ ((v1 ^ 2 * dword_685440[random_state]) << 15);
  14. v3 = ((unsigned int)dword_685440[((_BYTE)random_state - 7) & 0xF] >> 11) ^ dword_685440[((_BYTE)random_state - 7) & 0xF];
  15. v4 = v3 ^ dword_685440[random_state] ^ v1 ^ ((v1 ^ 2 * dword_685440[random_state]) << 15);
  16. dword_685440[random_state] = v4;
  17. v5 = (v0 - 1) & 0xF;
  18. result = dword_685440[v5] ^ v2 ^ v4 ^ 32 * (v4 & 0xFED22169) ^ 4 * (dword_685440[v5] ^ ((v2 ^ (v3 << 10)) << 16));
  19. random_state = v5;
  20. dword_685440[v5] = result;
  21. return result;
  22. }
  23.  
  24. DWORD a = g_state[g_stateIdx];
  25. DWORD b = g_state[(g_stateIdx - 3) % 16];
  26. DWORD c = a ^ b ^ ((b ^ 2 * a) << 15);
  27. DWORD d = (g_state[(g_stateIdx - 7) & 0xF] >> 11) ^ g_state[(g_stateIdx - 7) & 0xF] ^ c;
  28. DWORD e = d ^ c;
  29. g_state[g_stateIdx] = e;
  30. DWORD f = e ^ 0x20 * (e & 0xFED22169);
  31. g_stateIdx = (g_stateIdx - 1) % 16;
  32. DWORD g = g_state[g_stateIdx];
  33. DWORD h = f ^ 4 * (g ^ ((c ^ (d << 10)) << 16));
  34. g_state[g_stateIdx] = g ^ c ^ h;
  35. return g_state[g_stateIdx];
  36.  
  37. DWORD f = e ^ 0x20 * (e & 0xFED22169);
  38.  
  39. d = a ^ ((a << 5) & 0xda442d20UL);
  40.  
  41. ((signed)0xda442d24 >> 5) == 0xfed2169
  42. 0x20 == 1 << 5
Add Comment
Please, Sign In to add comment