Advertisement
Guest User

lsb_bin_reverse_start

a guest
May 26th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. main 400B20
  2.  
  3. # GCC dictates how the stack is used. Contract between caller and callee on x86:
  4. # * after call instruction:
  5. # o %eip points at first instruction of function
  6. # o %esp+4 points at first argument
  7. # o %esp points at return address
  8. # * after ret instruction:
  9. # o %eip contains return address
  10. # o %esp points at arguments pushed by caller
  11. # o called function may have trashed arguments
  12. # o %eax contains return value (or trash if function is void)
  13. # o %ecx, %edx may be trashed
  14. # o %ebp, %ebx, %esi, %edi must contain contents from time of call
  15. # * Terminology:
  16. # o %eax, %ecx, %edx are "caller save" registers
  17. # o %ebp, %ebx, %esi, %edi are "callee save" registers
  18. push rbx
  19.  
  20. # edi/rdi is the number of argument(s)
  21. # esi/rsi is the value of the argment(s) as a string in memory
  22.  
  23. # Check if number of argument equals 1
  24. cmp edi, 1
  25.  
  26. # If no arg, the jump to function that display (usage %password)
  27. jle short loc_400B45
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement