Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //I didn't do anything about the pushes or pops.
- //I assumed those were optimizations by the compiler to reuse registers
- uint32_t
- func_417170_random( range /*ESI*/ )
- {
- uint32_t _450C34=0;
- uint32_t _450BBC=0;
- //some code I didn't understand:
- /*
- TEST ESI,ESI
- JG 0xoof1717D //it always jumps here ?_?
- XOR EAX, EAX
- POP ESI
- return
- */
- uint64_t somevar=_450C34; //EAX
- somevar++;
- uint32_t somevar_0_o=1234; //ECX
- uint32_t remainder=somevar%somevar_0_o; //EDX=EAX%ECX: IDIV ECX
- somevar=_450C34; //EAX
- somevar++;
- uint32_t somevar2_0_o=3000; //EDI
- somevar_0_o=remainder; //MOV ECX, EDX
- remainder=somevar%somevar2_0_o; //EDX=EAX%EDI: IDIV EDI
- _450C34=somevar_0_o;
- //MOVZX ?_?:
- somevar=*(remainder+0x44FF90); //no idea what is going on here, might be the seed somehow
- somevar+=somevar_0_o; //add remainder
- _450BBC=remainder;
- remainder=somevar%range;
- return remainder;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement