prob1.c
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 | Dump of assembler code for function main: 0x80483d0 <main>: push %ebp 0x80483d1 <main+1>: mov %ebp,%esp 0x80483d3 <main+3>: sub %esp,8 0x80483d6 <main+6>: mov DWORD PTR [%ebp-4],0xa 0x80483dd <main+13>: mov DWORD PTR [%ebp-8],0x14 0x80483e4 <main+20>: mov %eax,DWORD PTR [%ebp-4] 0x80483e7 <main+23>: cmp %eax,DWORD PTR [%ebp-8] 0x80483ea <main+26>: jle 0x8048400 <main+48> 0x80483ec <main+28>: mov %eax,DWORD PTR [%ebp-4] 0x80483ef <main+31>: push %eax 0x80483f0 <main+32>: push 0x8048480 0x80483f5 <main+37>: call 0x8048308 <printf> 0x80483fa <main+42>: add %esp,8 0x80483fd <main+45>: jmp 0x804842d <main+93> 0x80483ff <main+47>: nop 0x8048400 <main+48>: mov %eax,DWORD PTR [%ebp-8] 0x8048403 <main+51>: cmp %eax,DWORD PTR [%ebp-4] 0x8048406 <main+54>: jle 0x8048420 <main+80> 0x8048408 <main+56>: mov %eax,DWORD PTR [%ebp-8] 0x804840b <main+59>: push %eax 0x804840c <main+60>: push 0x8048480 0x8048411 <main+65>: call 0x8048308 <printf> 0x8048416 <main+70>: add %esp,8 0x8048419 <main+73>: jmp 0x804842d <main+93> 0x804841b <main+75>: nop 0x804841c <main+76>: lea %esi,[%esi*1] 0x8048420 <main+80>: push 0x8048484 0x8048425 <main+85>: call 0x8048308 <printf> 0x804842a <main+90>: add %esp,4 0x804842d <main+93>: leave 0x804842e <main+94>: ret 0x804842f <main+95>: nop End of assembler dump. (gdb) x/s 0x8048480 0x8048480 <_IO_stdin_used+4>: "%d\n" (gdb) x/s 0x8048484 0x8048484 <_IO_stdin_used+8>: "equal\n" | cs |
핸드레이
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<stdio.h> void main(){ int a=0xa; int b=0x14; if(a>b){ printf("%d",a); }else if(a=b){ printf("equal"); }else{ printf("%d",b); } return; } | cs |
'Study > reversing' 카테고리의 다른 글
prob3.c 핸드레이 (0) | 2017.09.21 |
---|---|
prob2.c 핸드레이 (0) | 2017.09.20 |
abex Crackme 1번 Line By Line (0) | 2017.09.19 |
인터럽트에 대해 알아보자 (0) | 2017.08.24 |
코드의 흐름을 변경하는 어셈블리어 명령에 대해 알아보자 (0) | 2017.08.24 |