Advertisement
Guest User

lol optimized rndint

a guest
Oct 2nd, 2018
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;------------------------------
  2. ;rndint/1
  3. ;Generate 1 pseudo random number
  4. ;------------------------------
  5. ;Arg    : -
  6. ;------------------------------
  7. ;Ret    : Random integer in EAX
  8. ;Note   : -
  9. ;------------------------------
  10. align 4
  11. rndint:
  12.         push    edx
  13.         rdtsc
  14.         ror     eax, 8
  15.         imul    eax, eax, 0x8088405
  16.         pop     edx
  17.         ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement