#include"stdio.h"
int function(int a,int b)
{
int c=a+b;
int i=0;
do
{
c=c+i;
}while(i<50);
return c;
}
void main()
{
function(1,2);
}
--- c:\users\wangchao\desktop\test\test\main.cpp -------------------------------
#include "stdio.h"
int function(int a,int b)
{
012E1A40 push ebp
012E1A41 mov ebp,esp
012E1A43 sub esp,0D8h
012E1A49 push ebx
012E1A4A push esi
012E1A4B push edi
012E1A4C lea edi,[ebp-0D8h]
012E1A52 mov ecx,36h
012E1A57 mov eax,0CCCCCCCCh
012E1A5C rep stos dword ptr es:[edi]
int c=a+b;
012E1A5E mov eax,dword ptr [a]
012E1A61 add eax,dword ptr [b]
012E1A64 mov dword ptr [c],eax
int i=0;
012E1A67 mov dword ptr [i],0
do
{
c=c+i;
012E1A6E mov eax,dword ptr [c]
012E1A71 add eax,dword ptr [i]
012E1A74 mov dword ptr [c],eax
}while(i<50);
012E1A77 cmp dword ptr [i],32h
012E1A7B jl function+2Eh (12E1A6Eh)
return c;
012E1A7D mov eax,dword ptr [c]
}
012E1A80 pop edi
012E1A81 pop esi
012E1A82 pop ebx
012E1A83 mov esp,ebp
012E1A85 pop ebp
012E1A86 ret