Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

simple_tests.asm 557B

6 anos atrás
6 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. format ms64 coff
  2. section '.text' code readable writeable executable
  3. use64
  4. public _small
  5. _small:
  6. xor eax, eax
  7. ret
  8. public _rip_relative
  9. _rip_relative:
  10. mov rax, qword[seed]
  11. mov ecx, 214013
  12. mul ecx
  13. add eax, 2531011
  14. mov [seed], eax
  15. shr eax, 16
  16. and eax, 0x7FFF
  17. ret
  18. seed dd 1
  19. public _branch
  20. _branch:
  21. and rax, 1
  22. jz @branch_ret
  23. xor rax, rax
  24. nop ; Just some padding, so the function can't be copied entirely into the
  25. nop ; trampoline
  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. nop
  41. nop
  42. nop
  43. nop
  44. @branch_ret:
  45. ret