cat2.hex2 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. :getchar
  2. 48 c7 c0 00 00 00 00 # mov rax,0x0
  3. 48 c7 c7 00 00 00 00 # mov rdi,0x0
  4. 48 8d 35 *buf # lea rsi,[rip+0x63] # 6000f0 <buf>
  5. 48 c7 c2 01 00 00 00 # mov rdx,0x1
  6. 0f 05 # syscall
  7. 48 83 f8 01 # cmp rax,0x1
  8. 75 .getchar.getchar_fail # jne 6000a4 <getchar.getchar_fail>
  9. 48 8b 05 *buf # mov rax,QWORD PTR [rip+0x4d] # 6000f0 <buf>
  10. c3 # ret
  11. :getchar.getchar_fail
  12. 48 c7 c0 ff ff ff ff # mov rax,0xffffffffffffffff
  13. c3 # ret
  14. :putchar
  15. 48 89 05 *buf # mov QWORD PTR [rip+0x3d],rax # 6000f0 <buf>
  16. 48 c7 c0 01 00 00 00 # mov rax,0x1
  17. 48 c7 c7 01 00 00 00 # mov rdi,0x1
  18. 48 8d 35 *buf # lea rsi,[rip+0x28] # 6000f0 <buf>
  19. 48 c7 c2 01 00 00 00 # mov rdx,0x1
  20. 0f 05 # syscall
  21. c3 # ret
  22. :_start
  23. e8 *getchar # call 600078 <getchar>
  24. 48 83 f8 ff # cmp rax,0xffffffffffffffff
  25. 74 ._start.done # je 6000e4 <_start.done>
  26. e8 *putchar # call 6000ac <putchar>
  27. eb ._start # jmp 6000d2 <_start>
  28. :_start.done
  29. 48 89 c7 # mov rdi,rax
  30. 48 c7 c0 3c 00 00 00 # mov rax,0x3c
  31. 0f 05 # syscall
  32. :buf
  33. ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff