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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
| gdb-peda$ disas main disas main Dump of assembler code for function main: 0x080486d8 <+0>: lea ecx,[esp+0x4] 0x080486dc <+4>: and esp,0xfffffff0 0x080486df <+7>: push DWORD PTR [ecx-0x4] 0x080486e2 <+10>: push ebp 0x080486e3 <+11>: mov ebp,esp 0x080486e5 <+13>: push edi 0x080486e6 <+14>: push esi 0x080486e7 <+15>: push ebx 0x080486e8 <+16>: push ecx 0x080486e9 <+17>: sub esp,0xa8 0x080486ef <+23>: call 0x80485b0 <__x86.get_pc_thunk.bx> 0x080486f4 <+28>: add ebx,0x1654 0x080486fa <+34>: mov DWORD PTR [ebp-0xac],0x414e 0x08048704 <+44>: lea edx,[ebp-0xa8] 0x0804870a <+50>: mov eax,0x0 0x0804870f <+55>: mov ecx,0x18 0x08048714 <+60>: mov edi,edx 0x08048716 <+62>: rep stos DWORD PTR es:[edi],eax 0x08048718 <+64>: sub esp,0x8 0x0804871b <+67>: lea eax,[ebx-0x13ee] 0x08048721 <+73>: push eax 0x08048722 <+74>: lea eax,[ebx-0x13ec] 0x08048728 <+80>: push eax 0x08048729 <+81>: call 0x8048520 <fopen@plt> 0x0804872e <+86>: add esp,0x10 0x08048731 <+89>: mov DWORD PTR [ebp-0x1c],eax 0x08048734 <+92>: sub esp,0xc 0x08048737 <+95>: lea eax,[ebx-0x13d4] 0x0804873d <+101>: push eax 0x0804873e <+102>: call 0x80484e0 <puts@plt> 0x08048743 <+107>: add esp,0x10 0x08048746 <+110>: sub esp,0xc 0x08048749 <+113>: lea eax,[ebx-0x137c] 0x0804874f <+119>: push eax 0x08048750 <+120>: call 0x8048480 <printf@plt> 0x08048755 <+125>: add esp,0x10 0x08048758 <+128>: mov eax,DWORD PTR [ebx-0x4] 0x0804875e <+134>: mov eax,DWORD PTR [eax] 0x08048760 <+136>: sub esp,0x4 0x08048763 <+139>: push eax 0x08048764 <+140>: push 0x19 0x08048766 <+142>: lea eax,[ebp-0x39] 0x08048769 <+145>: push eax 0x0804876a <+146>: call 0x80484b0 <fgets@plt> 0x0804876f <+151>: add esp,0x10 0x08048772 <+154>: sub esp,0xc 0x08048775 <+157>: lea eax,[ebx-0x1366] 0x0804877b <+163>: push eax 0x0804877c <+164>: call 0x8048480 <printf@plt> 0x08048781 <+169>: add esp,0x10 0x08048784 <+172>: sub esp,0x8 0x08048787 <+175>: lea eax,[ebp-0x40] 0x0804878a <+178>: push eax 0x0804878b <+179>: lea eax,[ebx-0x1352] 0x08048791 <+185>: push eax 0x08048792 <+186>: call 0x8048540 <__isoc99_scanf@plt> 0x08048797 <+191>: add esp,0x10 0x0804879a <+194>: sub esp,0xc 0x0804879d <+197>: lea eax,[ebx-0x134f] 0x080487a3 <+203>: push eax 0x080487a4 <+204>: call 0x8048480 <printf@plt> 0x080487a9 <+209>: add esp,0x10 0x080487ac <+212>: sub esp,0x8 0x080487af <+215>: lea eax,[ebp-0x44] 0x080487b2 <+218>: push eax 0x080487b3 <+219>: lea eax,[ebx-0x1352] 0x080487b9 <+225>: push eax 0x080487ba <+226>: call 0x8048540 <__isoc99_scanf@plt> 0x080487bf <+231>: add esp,0x10 0x080487c2 <+234>: sub esp,0xc 0x080487c5 <+237>: lea eax,[ebx-0x1340] 0x080487cb <+243>: push eax 0x080487cc <+244>: call 0x8048480 <printf@plt> 0x080487d1 <+249>: add esp,0x10 0x080487d4 <+252>: sub esp,0x8 0x080487d7 <+255>: lea eax,[ebp-0x48] 0x080487da <+258>: push eax 0x080487db <+259>: lea eax,[ebx-0x1352] 0x080487e1 <+265>: push eax 0x080487e2 <+266>: call 0x8048540 <__isoc99_scanf@plt> 0x080487e7 <+271>: add esp,0x10 0x080487ea <+274>: call 0x80484a0 <getchar@plt> 0x080487ef <+279>: mov DWORD PTR [ebp-0x20],eax 0x080487f2 <+282>: cmp DWORD PTR [ebp-0x20],0xa 0x080487f6 <+286>: je 0x80487fe <main+294> 0x080487f8 <+288>: cmp DWORD PTR [ebp-0x20],0xffffffff 0x080487fc <+292>: jne 0x80487ea <main+274> 0x080487fe <+294>: mov eax,DWORD PTR [ebp-0x48] 0x08048801 <+297>: cmp eax,0x1 0x08048804 <+300>: jne 0x804883c <main+356> 0x08048806 <+302>: sub esp,0xc 0x08048809 <+305>: lea eax,[ebx-0x1317] 0x0804880f <+311>: push eax 0x08048810 <+312>: call 0x8048480 <printf@plt> 0x08048815 <+317>: add esp,0x10 0x08048818 <+320>: sub esp,0xc 0x0804881b <+323>: lea eax,[ebp-0xac] 0x08048821 <+329>: push eax 0x08048822 <+330>: call 0x8048490 <gets@plt> 0x08048827 <+335>: add esp,0x10 0x0804882a <+338>: sub esp,0xc 0x0804882d <+341>: lea eax,[ebp-0xac] 0x08048833 <+347>: push eax 0x08048834 <+348>: call 0x80486ad <vuln> 0x08048839 <+353>: add esp,0x10 0x0804883c <+356>: sub esp,0xc 0x0804883f <+359>: lea eax,[ebx-0x130d] 0x08048845 <+365>: push eax 0x08048846 <+366>: call 0x80484e0 <puts@plt> 0x0804884b <+371>: add esp,0x10 0x0804884e <+374>: mov ecx,DWORD PTR [ebp-0x48] 0x08048851 <+377>: mov edx,DWORD PTR [ebp-0x44] 0x08048854 <+380>: mov eax,DWORD PTR [ebp-0x40] 0x08048857 <+383>: sub esp,0x8 0x0804885a <+386>: lea esi,[ebp-0xac] 0x08048860 <+392>: push esi 0x08048861 <+393>: push ecx 0x08048862 <+394>: push edx 0x08048863 <+395>: push eax 0x08048864 <+396>: lea eax,[ebp-0x39] 0x08048867 <+399>: push eax 0x08048868 <+400>: lea eax,[ebx-0x12ec] 0x0804886e <+406>: push eax 0x0804886f <+407>: call 0x8048480 <printf@plt> 0x08048874 <+412>: add esp,0x20 0x08048877 <+415>: mov ecx,DWORD PTR [ebp-0x48] 0x0804887a <+418>: mov edx,DWORD PTR [ebp-0x44] 0x0804887d <+421>: mov eax,DWORD PTR [ebp-0x40] 0x08048880 <+424>: sub esp,0x4 0x08048883 <+427>: lea esi,[ebp-0xac] 0x08048889 <+433>: push esi 0x0804888a <+434>: push ecx 0x0804888b <+435>: push edx 0x0804888c <+436>: push eax 0x0804888d <+437>: lea eax,[ebp-0x39] 0x08048890 <+440>: push eax 0x08048891 <+441>: lea eax,[ebx-0x12ec] 0x08048897 <+447>: push eax 0x08048898 <+448>: push DWORD PTR [ebp-0x1c] 0x0804889b <+451>: call 0x8048510 <fprintf@plt> 0x080488a0 <+456>: add esp,0x20 0x080488a3 <+459>: sub esp,0xc 0x080488a6 <+462>: push DWORD PTR [ebp-0x1c] 0x080488a9 <+465>: call 0x80484c0 <fclose@plt> 0x080488ae <+470>: add esp,0x10 0x080488b1 <+473>: mov eax,0x0 0x080488b6 <+478>: lea esp,[ebp-0x10] 0x080488b9 <+481>: pop ecx 0x080488ba <+482>: pop ebx 0x080488bb <+483>: pop esi 0x080488bc <+484>: pop edi 0x080488bd <+485>: pop ebp 0x080488be <+486>: lea esp,[ecx-0x4] 0x080488c1 <+489>: ret End of assembler dump.
|