for (int i = 0; i < 5; i++)
//初始化表达式
00A41895 mov dword ptr [ebp-8],0
00A4189C jmp 00A418A7
//i++
00A4189E mov eax,dword ptr [ebp-8]
00A418A1 add eax,1
00A418A4 mov dword ptr [ebp-8],eax
//条件表达式
00A418A7 cmp dword ptr [ebp-8],5
00A418AB jge 00A418C0 //jump great equal 大于等于则跳出
{
printf("%d \n", i);
//printf函数调用
00A418AD mov eax,dword ptr [ebp-8] //把i值赋给eax
00A418B0 push eax
00A418B1 push 0A47B30h
00A418B6 call 00A410D2 //上面push进入printf的两个参数
00A418BB add esp,8 //提升栈空间
}
00A418BE jmp 00A4189E //执行完后进行i++
//函数外部语句
return 0;
00A418C0 xor eax,eax
}
00A418C2 pop edi
00A418C3 pop esi
00A418C4 pop ebx
00A418C5 add esp,0CCh
00A418CB cmp ebp,esp
00A418CD call 00A4124E
00A418D2 mov esp,ebp
00A418D4 pop ebp
00A418D5 ret