gdb>file a.out Using host libthread_db library "/lib/libthread_db.so.1". gdb>disass main Dump of assembler code for function main: 0x080483a4 : lea ecx,[esp+4] 0x080483a8 : and esp,0xfffffff0 0x080483ab : push DWORD PTR [ecx-4] 0x080483ae : push ebp 0x080483af : mov ebp,esp 0x080483b1 : push ebx 0x080483b2 : push ecx 0x080483b3 : sub esp,0x40 0x080483b6 : mov DWORD PTR [ebp-48],ecx 0x080483b9 : mov eax,DWORD PTR [ebp-48] 0x080483bc : cmp DWORD PTR [eax],0x1 0x080483bf : jle 0x80484dc 0x080483c5 : mov edx,DWORD PTR [ebp-48] 0x080483c8 : cmp DWORD PTR [edx],0x2 0x080483cb : jg 0x8048431 0x080483cd : mov ecx,DWORD PTR [ebp-48] 0x080483d0 : mov eax,DWORD PTR [ecx+8] 0x080483d3 : inc eax 0x080483d4 : mov DWORD PTR [esp+8],eax 0x080483d8 : mov DWORD PTR [esp+4],0x0 0x080483e0 : mov DWORD PTR [esp],0xffffffaa 0x080483e7 : call 0x80483a4
0x080483ec : mov edx,eax 0x080483ee : mov ebx,DWORD PTR [ebp-48] 0x080483f1 : add edx,DWORD PTR [ebx+8] 0x080483f4 : mov eax,0x1 0x080483f9 : mov ecx,DWORD PTR [ebp-48] 0x080483fc : sub eax,DWORD PTR [ecx+4] 0x080483ff : mov DWORD PTR [esp+8],edx 0x08048403 : mov DWORD PTR [esp+4],eax 0x08048407 : mov DWORD PTR [esp],0xffffffa9 0x0804840e : call 0x80483a4
0x08048413 : mov ebx,DWORD PTR [ebp-48] 0x08048416 : add eax,DWORD PTR [ebx+8] 0x08048419 : mov DWORD PTR [esp+8],eax 0x0804841d : mov DWORD PTR [esp+4],0xfffffff3 0x08048425 : mov DWORD PTR [esp],0xffffffb1 0x0804842c : call 0x80483a4
0x08048431 : mov edx,DWORD PTR [ebp-48] 0x08048434 : mov eax,DWORD PTR [edx] 0x08048436 : mov ecx,DWORD PTR [ebp-48] 0x08048439 : cmp eax,DWORD PTR [ecx+4] 0x0804843c : jge 0x8048460 0x0804843e : mov ebx,DWORD PTR [ebp-48] 0x08048441 : mov eax,DWORD PTR [ebx] 0x08048443 : inc eax 0x08048444 : mov ecx,DWORD PTR [ebp-48] 0x08048447 : mov edx,DWORD PTR [ecx+8] 0x0804844a : mov DWORD PTR [esp+8],edx 0x0804844e : mov ebx,DWORD PTR [ebp-48] 0x08048451 : mov edx,DWORD PTR [ebx+4] 0x08048454 : mov DWORD PTR [esp+4],edx 0x08048458 : mov DWORD PTR [esp],eax 0x0804845b : call 0x80483a4
0x08048460 : mov edx,DWORD PTR [ebp-48] 0x08048463 : mov eax,DWORD PTR [edx] 0x08048465 : sub eax,0x1b 0x08048468 : mov ecx,DWORD PTR [ebp-48] 0x0804846b : mov edx,DWORD PTR [ecx+8] 0x0804846e : mov DWORD PTR [esp+8],edx 0x08048472 : mov DWORD PTR [esp+4],eax 0x08048476 : mov DWORD PTR [esp],0xffffffa2 0x0804847d : call 0x80483a4
0x08048482 : test eax,eax 0x08048484 : je 0x80484ca 0x08048486 : mov ebx,DWORD PTR [ebp-48] 0x08048489 : cmp DWORD PTR [ebx],0x2 0x0804848c : jne 0x80484ca 0x0804848e : mov eax,DWORD PTR [ebp-48] 0x08048491 : cmp DWORD PTR [eax+4],0xc 0x08048495 : jg 0x80484bb 0x08048497 : mov edx,DWORD PTR [ebp-48] 0x0804849a : mov eax,DWORD PTR [edx+4] 0x0804849d : inc eax 0x0804849e : mov DWORD PTR [esp+8],0x8048748 0x080484a6 : mov DWORD PTR [esp+4],eax 0x080484aa : mov DWORD PTR [esp],0x2 0x080484b1 : call 0x80483a4
0x080484b6 : mov DWORD PTR [ebp-36],eax 0x080484b9 : jmp 0x80484c2 0x080484bb : mov DWORD PTR [ebp-36],0x9 0x080484c2 : mov ecx,DWORD PTR [ebp-36] 0x080484c5 : mov DWORD PTR [ebp-40],ecx 0x080484c8 : jmp 0x80484d1 0x080484ca : mov DWORD PTR [ebp-40],0x10 0x080484d1 : mov ebx,DWORD PTR [ebp-40] 0x080484d4 : mov DWORD PTR [ebp-44],ebx 0x080484d7 : jmp 0x804865f 0x080484dc : mov eax,DWORD PTR [ebp-48] 0x080484df : cmp DWORD PTR [eax],0x0 0x080484e2 : jns 0x80485c4 0x080484e8 : mov edx,DWORD PTR [ebp-48] 0x080484eb : cmp DWORD PTR [edx],0xffffffb8 0x080484ee : jge 0x8048517 0x080484f0 : mov DWORD PTR [esp+8],0x8048754 0x080484f8 : mov ecx,DWORD PTR [ebp-48] 0x080484fb : mov eax,DWORD PTR [ecx] 0x080484fd : mov DWORD PTR [esp+4],eax 0x08048501 : mov ebx,DWORD PTR [ebp-48] 0x08048504 : mov eax,DWORD PTR [ebx+4] 0x08048507 : mov DWORD PTR [esp],eax 0x0804850a : call 0x80483a4
0x0804850f : mov DWORD PTR [ebp-28],eax 0x08048512 : jmp 0x80485b9 0x08048517 : mov eax,DWORD PTR [ebp-48] 0x0804851a : cmp DWORD PTR [eax],0xffffffce 0x0804851d : jge 0x804857b 0x0804851f : mov edx,DWORD PTR [ebp-48] 0x08048522 : mov eax,DWORD PTR [edx+8] 0x08048525 : movzx eax,BYTE PTR [eax] 0x08048528 : movsx eax,al 0x0804852b : mov ecx,DWORD PTR [ebp-48] 0x0804852e : cmp eax,DWORD PTR [ecx+4] 0x08048531 : jne 0x804854f 0x08048533 : mov ebx,DWORD PTR [ebp-48] 0x08048536 : mov eax,DWORD PTR [ebx+8] 0x08048539 : add eax,0x1f 0x0804853c : movzx eax,BYTE PTR [eax] 0x0804853f : movsx eax,al 0x08048542 : mov DWORD PTR [esp],eax 0x08048545 : call 0x80482cc 0x0804854a : mov DWORD PTR [ebp-20],eax 0x0804854d : jmp 0x8048573 0x0804854f : mov edx,DWORD PTR [ebp-48] 0x08048552 : mov eax,DWORD PTR [edx+8] 0x08048555 : inc eax 0x08048556 : mov DWORD PTR [esp+8],eax 0x0804855a : mov ecx,DWORD PTR [ebp-48] 0x0804855d : mov eax,DWORD PTR [ecx+4] 0x08048560 : mov DWORD PTR [esp+4],eax 0x08048564 : mov DWORD PTR [esp],0xffffffbf 0x0804856b : call 0x80483a4
0x08048570 : mov DWORD PTR [ebp-20],eax 0x08048573 : mov ebx,DWORD PTR [ebp-20] 0x08048576 : mov DWORD PTR [ebp-24],ebx 0x08048579 : jmp 0x80485b3 0x0804857b : mov eax,DWORD PTR [ebp-48] 0x0804857e : mov ecx,DWORD PTR [eax+8] 0x08048581 : inc ecx 0x08048582 : mov edx,DWORD PTR [ebp-48] 0x08048585 : mov eax,DWORD PTR [edx+8] 0x08048588 : movzx eax,BYTE PTR [eax] 0x0804858b : cmp al,0x2f 0x0804858d : sete al 0x08048590 : movzx eax,al 0x08048593 : mov edx,eax 0x08048595 : mov ebx,DWORD PTR [ebp-48] 0x08048598 : add edx,DWORD PTR [ebx] 0x0804859a : mov DWORD PTR [esp+8],ecx 0x0804859e : mov ecx,DWORD PTR [ebp-48] 0x080485a1 : mov eax,DWORD PTR [ecx+4] 0x080485a4 : mov DWORD PTR [esp+4],eax 0x080485a8 : mov DWORD PTR [esp],edx 0x080485ab : call 0x80483a4
0x080485b0 : mov DWORD PTR [ebp-24],eax 0x080485b3 : mov ebx,DWORD PTR [ebp-24] 0x080485b6 : mov DWORD PTR [ebp-28],ebx 0x080485b9 : mov eax,DWORD PTR [ebp-28] 0x080485bc : mov DWORD PTR [ebp-32],eax 0x080485bf : jmp 0x8048659 0x080485c4 : mov edx,DWORD PTR [ebp-48] 0x080485c7 : cmp DWORD PTR [edx],0x0 0x080485ca : jle 0x80485ed 0x080485cc : mov DWORD PTR [esp+8],0x80488ed 0x080485d4 : mov DWORD PTR [esp+4],0x2 0x080485dc : mov DWORD PTR [esp],0x2 0x080485e3 : call 0x80483a4
0x080485e8 : mov DWORD PTR [ebp-16],eax 0x080485eb : jmp 0x8048653 0x080485ed : mov ecx,DWORD PTR [ebp-48] 0x080485f0 : mov eax,DWORD PTR [ecx+8] 0x080485f3 : movzx eax,BYTE PTR [eax] 0x080485f6 : cmp al,0x2f 0x080485f8 : je 0x804863d 0x080485fa : mov eax,DWORD PTR [ebp-48] 0x080485fd : mov ebx,DWORD PTR [eax+8] 0x08048600 : inc ebx 0x08048601 : mov edx,DWORD PTR [ebp-48] 0x08048604 : mov eax,DWORD PTR [edx+8] 0x08048607 : movzx eax,BYTE PTR [eax] 0x0804860a : movsx eax,al 0x0804860d : mov DWORD PTR [esp+8],0x80488f0 0x08048615 : mov DWORD PTR [esp+4],eax 0x08048619 : mov DWORD PTR [esp],0xffffffc3 0x08048620 : call 0x80483a4
0x08048625 : mov DWORD PTR [esp+8],ebx 0x08048629 : mov DWORD PTR [esp+4],eax 0x0804862d : mov DWORD PTR [esp],0x0 0x08048634 : call 0x80483a4
0x08048639 : test eax,eax 0x0804863b : je 0x8048646 0x0804863d : mov DWORD PTR [ebp-12],0x1 0x08048644 : jmp 0x804864d 0x08048646 : mov DWORD PTR [ebp-12],0x0 0x0804864d : mov ecx,DWORD PTR [ebp-12] 0x08048650 : mov DWORD PTR [ebp-16],ecx 0x08048653 : mov ebx,DWORD PTR [ebp-16] 0x08048656 : mov DWORD PTR [ebp-32],ebx 0x08048659 : mov eax,DWORD PTR [ebp-32] 0x0804865c : mov DWORD PTR [ebp-44],eax 0x0804865f : mov eax,DWORD PTR [ebp-44] 0x08048662 : add esp,0x40 0x08048665 : pop ecx 0x08048666 : pop ebx 0x08048667 : pop ebp 0x08048668 : lea esp,[ecx-4] 0x0804866b : ret 0x0804866c : nop 0x0804866d : nop 0x0804866e : nop 0x0804866f : nop End of assembler dump.