Advertisement
Broihon

Untitled

Dec 11th, 2018
1,594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DWORD Seed = 0;
  2.  
  3. void SetSeed(DWORD s)
  4. {
  5.     //Get seed address
  6.     Seed = s;
  7. }
  8.  
  9. DWORD PseudoRand()
  10. {
  11.     //Get seed address
  12.  
  13.     DWORD Ret = Seed * 0x343FD;
  14.     Ret += 0x269EC3;
  15.  
  16.     Seed = Ret;
  17.  
  18.     Ret >>= 0x10;
  19.     Ret &= 0x7FFF;
  20.  
  21.     return Ret;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement