You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 6 година
пре 6 година
пре 6 година
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. format ms64 coff
  2. section '.text' code readable writeable executable align 16
  3. use64
  4. public _rip_relative
  5. _rip_relative:
  6. mov rax, qword[seed]
  7. mov ecx, 214013
  8. mul ecx
  9. add eax, 2531011
  10. mov [seed], eax
  11. shr eax, 16
  12. and eax, 0x7FFF
  13. ret
  14. seed dd 1
  15. public _branch
  16. _branch:
  17. and rax, 1
  18. jz @branch_ret
  19. xor rax, rax
  20. nop ; Just some padding, so the function can't be copied entirely into the
  21. nop ; trampoline
  22. nop
  23. nop
  24. nop
  25. nop
  26. nop
  27. nop
  28. nop
  29. nop
  30. nop
  31. nop
  32. nop
  33. nop
  34. nop
  35. nop
  36. nop
  37. nop
  38. nop
  39. nop
  40. @branch_ret:
  41. ret
  42. public _small
  43. _small:
  44. xor eax, eax
  45. ret