TrogWW

TWW - Seed function

Apr 20th, 2020
706
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.91 KB | None | 0 0
  1.  
  2. /* __thiscall JMath::TRandom_enough_::setSeed(unsigned long) */
  3.  
  4. void __thiscall setSeed(TRandom_enough_ *this,ulong param_1)
  5.  
  6. {
  7.   uint *puVar1;
  8.   uint extraout_r4;
  9.   uint extraout_r4_00;
  10.   int iVar2;
  11.   int iVar3;
  12.   undefined8 uVar4;
  13.  
  14.   uVar4 = FUN_8032693c();
  15.   puVar1 = (uint *)((ulonglong)uVar4 >> 0x20);
  16.   puVar1[1] = 0;
  17.   *puVar1 = (int)uVar4 + 1;
  18.   if (*puVar1 == 0) {
  19.     *puVar1 = 1;
  20.   }
  21.   iVar2 = 8;
  22.   do {
  23.     __mod2u((int)((ulonglong)*puVar1 * 0x41a7 >> 0x20),*puVar1 * 0x41a7,0,0x7fffffff);
  24.     *puVar1 = extraout_r4;
  25.     iVar2 = iVar2 + -1;
  26.   } while (iVar2 != 0);
  27.   iVar3 = 0x20;
  28.   iVar2 = 0x80;
  29.   do {
  30.     iVar3 = iVar3 + -1;
  31.     __mod2u((int)((ulonglong)*puVar1 * 0x41a7 >> 0x20),*puVar1 * 0x41a7,0,0x7fffffff);
  32.     *puVar1 = extraout_r4_00;
  33.     *(uint *)((int)puVar1 + iVar2 + 4) = *puVar1;
  34.     iVar2 = iVar2 + -4;
  35.   } while (iVar3 != 0);
  36.   FUN_80326988();
  37.   return;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment