Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. => 0x0804921f <+0>: push %edi //push pushes data values onto stack
  2. 0x08049220 <+1>: push %esi
  3. 0x08049221 <+2>: push %ebx
  4. 0x08049222 <+3>: sub $0x20,%esp //decrement stack pointer by 32 bytes
  5. 0x08049225 <+6>: mov 0x30(%esp),%esi //M[48+address of esp] move to %esi
  6. 0x08049229 <+10>: mov 0x34(%esp),%ebx //M[52+address of esp] move to %ebx
  7. 0x0804922d <+14>: mov %ebx,(%esp) //loads value of %ebx into address of %esp
  8. 0x08049230 <+17>: call 0x804918f <string_length> //call func string_length on "%ebx" value
  9. 0x08049235 <+22>: mov %eax,%edi //move string_length output into %edi
  10. 0x08049237 <+24>: mov %esi,(%esp) //load value fo %esi into (%esp) for strlen
  11. 0x0804923a <+27>: call 0x804918f <string_length> //call string_length on "%esi"
  12. 0x0804923f <+32>: mov $0x1,%edx //fill in %edx with value of 1
  13. 0x08049244 <+37>: cmp %eax,%edi //compare contents of 2nd string length
  14. invocation to 1st length invocation
  15. 0x08049246 <+39>: jge 0x80492ad <strings_check+142> //jump if strlen 2 greater than or
  16. equal to strlen 1
  17. 0x08049248 <+41>: movzbl (%ebx),%eax //load byte from ebx addr. and 0-extend to full 32 bits
  18. 0x0804924b <+44>: test %al,%al //al is bits 0-7 of eax, testing if this is 0
  19. 0x0804924d <+46>: je 0x8049267 <strings_check+72> //if the righmost 8 bits are 0, jump +72
  20. 0x0804924f <+48>: cmp (%esi),%al
  21. 0x08049251 <+50>: je 0x804925c <strings_check+61>
  22. 0x08049253 <+52>: jmp 0x80492ad <strings_check+142>
  23. 0x08049255 <+54>: add $0x1,%ebx
  24. 0x08049258 <+57>: cmp (%esi),%al
  25. 0x0804925a <+59>: jne 0x80492a8 <strings_check+137>
  26. 0x0804925c <+61>: add $0x1,%esi
  27. 0x0804925f <+64>: movzbl 0x1(%ebx),%eax
  28. 0x08049263 <+68>: test %al,%al
  29. 0x08049265 <+70>: jne 0x8049255 <strings_check+54>
  30. 0x08049267 <+72>: mov $0x1,%edx
  31. 0x0804926c <+77>: cmpb $0x20,(%esi)
  32. 0x0804926f <+80>: jne 0x80492ad <strings_check+142>
  33. 0x08049271 <+82>: cmpb $0x0,0x1(%esi)
  34. 0x08049275 <+86>: je 0x80492ad <strings_check+142>
  35. 0x08049277 <+88>: lea 0x1c(%esp),%eax
  36. 0x0804927b <+92>: mov %eax,0x8(%esp)
  37. 0x0804927f <+96>: movl $0x804a7c9,0x4(%esp)
  38. 0x08049287 <+104>: add $0x1,%esi
  39. 0x0804928a <+107>: mov %esi,(%esp)
  40. 0x0804928d <+110>: call 0x8048950 <__isoc99_sscanf@plt>
  41. 0x08049292 <+115>: mov $0x1,%edx
  42. 0x08049297 <+120>: cmp $0x1,%eax
  43. 0x0804929a <+123>: jne 0x80492ad <strings_check+142>
  44. 0x0804929c <+125>: cmp 0x1c(%esp),%edi
  45. 0x080492a0 <+129>: setne %dl
  46. 0x080492a3 <+132>: movzbl %dl,%edx
  47. ---Type <return> to continue, or q <return> to quit---
  48. 0x080492a6 <+135>: jmp 0x80492ad <strings_check+142>
  49. 0x080492a8 <+137>: mov $0x1,%edx
  50. 0x080492ad <+142>: mov %edx,%eax //move 1 into eax
  51. 0x080492af <+144>: add $0x20,%esp //increment stack pointer
  52. 0x080492b2 <+147>: pop %ebx
  53. 0x080492b3 <+148>: pop %esi
  54. 0x080492b4 <+149>: pop %edi
  55. 0x080492b5 <+150>: ret
  56. End of assembler dump.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement