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