-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstack assembly
31 lines (30 loc) · 1.2 KB
/
stack assembly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
seed@ubuntu:~/Desktop$ gdb -q stack
Reading symbols from /home/seed/Desktop/stack...done.
(gdb) disassemble main
Dump of assembler code for function main:
0x08048483 <+0>: push %ebp
0x08048484 <+1>: mov %esp,%ebp
0x08048486 <+3>: and $0xfffffff0,%esp
0x08048489 <+6>: sub $0x220,%esp
0x0804848f <+12>: mov $0x80485c0,%edx
0x08048494 <+17>: mov $0x80485c2,%eax
0x08048499 <+22>: mov %edx,0x4(%esp)
0x0804849d <+26>: mov %eax,(%esp)
0x080484a0 <+29>: call 0x804836c <fopen@plt>
0x080484a5 <+34>: mov %eax,0x21c(%esp)
0x080484ac <+41>: mov 0x21c(%esp),%eax
0x080484b3 <+48>: mov %eax,0xc(%esp)
0x080484b7 <+52>: movl $0x205,0x8(%esp)
0x080484bf <+60>: movl $0x1,0x4(%esp)
0x080484c7 <+68>: lea 0x17(%esp),%eax
0x080484cb <+72>: mov %eax,(%esp)
0x080484ce <+75>: call 0x804839c <fread@plt>
0x080484d3 <+80>: lea 0x17(%esp),%eax
0x080484d7 <+84>: mov %eax,(%esp)
0x080484da <+87>: call 0x8048464 <bof>
0x080484df <+92>: movl $0x80485ca,(%esp)
0x080484e6 <+99>: call 0x804838c <puts@plt>
0x080484eb <+104>: mov $0x1,%eax
0x080484f0 <+109>: leave
0x080484f1 <+110>: ret
End of assembler dump.