#include<stdio.h>
#include <windows.h>void main()
{// LoadLibrary("msvcrt.dll"); //载入system所在的dll _asm{
push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
push eax
mov byte ptr[ebp-0Ch],6Dh //m
mov byte ptr[ebp-0Bh],73h //s
mov byte ptr[ebp-0Ah],76h //v
mov byte ptr[ebp-09h],63h //c
mov byte ptr[ebp-08h],72h //r
mov byte ptr[ebp-07h],74h //t
mov byte ptr[ebp-06h],2Eh //.
mov byte ptr[ebp-05h],64h //d
mov byte ptr[ebp-04h],6Ch //l
mov byte ptr[ebp-03h],6Ch //l
lea esi,[ebp-0Ch]
push esi
mov eax,0x7747395c //WIN7中LoadLibrary地址
call eax
}
// system("notepad");
_asm{
push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
push eax
//记事本 notepad
mov byte ptr[ebp-0Ch],6eh //n
mov byte ptr[ebp-0Bh],6fh //o
mov byte ptr[ebp-0Ah],74h //t
mov byte ptr[ebp-09h],65h //e
mov byte ptr[ebp-08h],70h //p
mov byte ptr[ebp-07h],61h //a
mov byte ptr[ebp-06h],64h //d
lea esi,[ebp-0ch]
push esi
mov eax,0x7634b16f //WIN7中system地址
call eax
}
}可是运行以后会跳出错误,求大神帮忙修改。
错误如下
////////////////////////////////////////////////////////////////////
错误信息:
Debug Error!
Program:F:\Debug\DLoadDLL.exe
Module:
File:i386\chkesp.c
Line:42
The value of ESP was not properly saved across a function call.
This is usually a result of calling a function declared with one calling
convention with a function pointer declared with a different calling convertion.
(Press Retry to debug the application)
//////////////////////////////////////////////////////////////C函数调试
记不清了,frame 没 回复吧 ?
move esp,ebp
pop ebp
#include <windows.h>void aa()
{// LoadLibrary("msvcrt.dll"); //载入system所在的dll _asm {
push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
push eax mov byte ptr[ebp-0Ch],6Dh //m
mov byte ptr[ebp-0Bh],73h //s
mov byte ptr[ebp-0Ah],76h //v
mov byte ptr[ebp-09h],63h //c
mov byte ptr[ebp-08h],72h //r
mov byte ptr[ebp-07h],74h //t
mov byte ptr[ebp-06h],2Eh //.
mov byte ptr[ebp-05h],64h //d
mov byte ptr[ebp-04h],6Ch //l
mov byte ptr[ebp-03h],6Ch //l
lea esi,[ebp-0Ch] push esi
mov eax, 0x7c801d7b //xp中LoadLibrary地址
call eax
mov esp, ebp
pop ebp
}// system("notepad");
_asm { push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
push eax
//记事本 notepad
mov byte ptr[ebp-0Ch],6eh //n
mov byte ptr[ebp-0Bh],6fh //o
mov byte ptr[ebp-0Ah],74h //t
mov byte ptr[ebp-09h],65h //e
mov byte ptr[ebp-08h],70h //p
mov byte ptr[ebp-07h],61h //a
mov byte ptr[ebp-06h],64h //d
lea esi,[ebp-0ch]
push esi
mov eax, 0x77bf93c7 //xp中system地址
call eax
add esp, 0x10
pop ebp
}
}int main()
{
aa();
}