本人是一名程序员,致力于研究计算机应用开发技术,本人现在正在从事TETRA数字集群的应用开发与终端MCU开发,搜集一下信安有没有同行。
附上一段C++内联汇编
void CtestDlg::OnBnClickedTestBtn()
{
int iRet;
char cRet[100];
__asm
{
push 10
push 20
call TestAsmFunction
mov iRet,eax
}
sprintf(cRet, "%d",iRet);
__asm
{
lea eax,word ptr[cRet]
push 0
push eax
push eax
push 0
call dword ptr [MessageBoxA]
}
}
int CtestDlg::TestAsmFunction(int a,int b)
{
__asm
{
MOV EBP,ESP
MOV EAX,DWORD PTR [EBP+0xC]
MOV EBX,DWORD PTR [EBP+8]
add EAX,EBX
}
}
附上一段C++内联汇编
void CtestDlg::OnBnClickedTestBtn()
{
int iRet;
char cRet[100];
__asm
{
push 10
push 20
call TestAsmFunction
mov iRet,eax
}
sprintf(cRet, "%d",iRet);
__asm
{
lea eax,word ptr[cRet]
push 0
push eax
push eax
push 0
call dword ptr [MessageBoxA]
}
}
int CtestDlg::TestAsmFunction(int a,int b)
{
__asm
{
MOV EBP,ESP
MOV EAX,DWORD PTR [EBP+0xC]
MOV EBX,DWORD PTR [EBP+8]
add EAX,EBX
}
}



