#include"stdio.h"
int main()
{
int m,n,q;
printf("step1\n");
m=100;//十六进制:64
printf("step2\n");
n=10;//十六进制:A
printf("step3\n");
if(m==n)
{
printf("step4\n");
q=1;}
else
{printf("step4\n");
q=2;}
printf("step5\n");
return 0;
}
/*00401284 |. E8 7CFDFFFF call test.00401005 :关键call
00401000 CC db CC
00401001 CC int3
00401002 CC int3
00401003 CC int3
00401004 CC int3
00401005 /$ E9 06000000 jmp test.main
0040100A | CC int3
0040100B | CC int3
0040100C | CC int3
0040100D | CC int3
0040100E | CC int3
0040100F | CC int3
00401010 >|> 55 push ebp
00401011 |. 8BEC mov ebp,esp
00401013 |. 83EC 4C sub esp,4C
00401016 |. 53 push ebx
00401017 |. 56 push esi
00401018 |. 57 push edi
00401019 |. 8D7D B4 lea edi,dword ptr ss:[ebp-4C]
0040101C |. B9 13000000 mov ecx,13
00401021 |. B8 CCCCCCCC mov eax,CCCCCCCC
00401026 |. F3:AB rep stos dword ptr es:[edi]
00401028 |. 68 C42F4200 push test.00422FC4 ; /step1\n
0040102D |. E8 AE000000 call test.printf ; \printf
00401032 |. 83C4 04 add esp,4
00401035 |. C745 FC 64000>mov dword ptr ss:[ebp-4],64
0040103C |. 68 3C204200 push test.0042203C ; /step2\n
00401041 |. E8 9A000000 call test.printf ; \printf
00401046 |. 83C4 04 add esp,4
00401049 |. C745 F8 0A000>mov dword ptr ss:[ebp-8],0A
00401050 |. 68 34204200 push test.00422034 ; /step3\n
00401055 |. E8 86000000 call test.printf ; \printf
0040105A |. 83C4 04 add esp,4
0040105D |. 8B45 FC mov eax,dword ptr ss:[ebp-4]
00401060 |. 3B45 F8 cmp eax,dword ptr ss:[ebp-8]
00401063 |. 75 16 jnz short test.0040107B
00401065 |. 68 2C204200 push test.0042202C ; /step4\n
0040106A |. E8 71000000 call test.printf ; \printf
0040106F |. 83C4 04 add esp,4
00401072 |. C745 F4 01000>mov dword ptr ss:[ebp-C],1
00401079 |. EB 14 jmp short test.0040108F
0040107B |> 68 24204200 push test.00422024 ; /step4\n
00401080 |. E8 5B000000 call test.printf ; \printf
00401085 |. 83C4 04 add esp,4
00401088 |. C745 F4 02000>mov dword ptr ss:[ebp-C],2
0040108F |> 68 1C204200 push test.0042201C ; /step5\n
00401094 |. E8 47000000 call test.printf ; \printf
00401099 |. 83C4 04 add esp,4
0040109C |. 33C0 xor eax,eax
0040109E |. 5F pop edi
0040109F |. 5E pop esi
004010A0 |. 5B pop ebx
004010A1 |. 83C4 4C add esp,4C
004010A4 |. 3BEC cmp ebp,esp
004010A6 |. E8 B5000000 call test._chkesp
004010AB |. 8BE5 mov esp,ebp
004010AD |. 5D pop ebp
004010AE \. C3 retn*/
前面是程序代码,后面是F7跟进关键call后的内容,刚刚学汇编,不过我看出来了00401035、00401049是赋值语句,不过不知道int m,n;在哪,也不懂在进行比较之前的0040105D是干什么的,谢谢.
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课