【分享】if if--else的反汇编
[11: int a = 5 ;
00401028 mov dword ptr ,5
12: int b = 4 ;
0040102F mov dword ptr ,4
14: if(a>b)
00401036 mov eax,dword ptr
00401039 cmp eax,dword ptr
0040103C jle main+3Fh (0040104f)
15: {
16:
17: printf("the big is %d\n",a);
0040103E mov ecx,dword ptr
00401041 push ecx
00401042 push offset string "the big is %d\n" (0042001c)
00401047 call printf (00401080)
0040104C add esp,8
20:
21: }
24: return 0;
0040104F xor eax,eax
25:
26: }
11: int a = 5 ;
00401028 mov dword ptr ,5
12: int b = 6 ;
0040102F mov dword ptr ,6
13:
14: if(a>b)
00401036 mov eax,dword ptr
00401039 cmp eax,dword ptr
0040103C jle main+41h (00401051)
15: {
16: printf("the big is %d\n",a);
0040103E mov ecx,dword ptr
00401041 push ecx
00401042 push offset string "the big is %d\n" (00420f84)
00401047 call printf (00401080)
0040104C add esp,8
17: }
18: else
0040104F jmp main+52h (00401062)
19: {
20: printf("the bigis %d\n",b);
00401051 mov edx,dword ptr
00401054 push edx
00401055 push offset string "the bigis %d\n" (0042001c)
0040105A call printf (00401080)
0040105F add esp,8
21: }
23: return 0;
00401062 xor eax,eax
24:
25:}
]
然后呢?这东西随便自己写一下丢IDA里更清晰把 学习了,看得不是很懂 楼主辛苦了。
页:
[1]