[讨论]调试Dll输出函数的问题。
发表于:
2011-1-31 22:59
4893
在VC写的DLL里定义输出函数GLC,调试时有问题
输出函数:
unsigned char licH[16];
extern "C" int __declspec(dllexport) GLC(unsigned long int ID, int KEY,
unsigned long int iID,
unsigned long int flags,
char *licH)
{
strcpy(licH,"AABC");
return 0;
}
调用代码
00403980 push ebp //*** 压ebp
00403981 mov ebp, esp
00403983 push 00A1A55C
00403988 mov eax, dword ptr [ebp+8]
0040398B push eax
0040398C push 887B
00403991 push 009253A0
00403996 push 5E09204F
0040399B call <jmp.&Key.GLC> 调用Key.dll的输出函数GLC
004039A0 mov dword ptr [A1A564], eax
004039A5 cmp dword ptr [A1A564], 0
004039AC je short 004039C0
004039AE push 0
004039B0 push 0
004039B2 push 00927444
004039B7 call <jmp.&MFC42.#1200_AfxMessageBox>
004039BC xor eax, eax
004039BE jmp short 004039C5
004039C0 mov eax, 1
004039C5 pop ebp //***执行这条指令后,ebp=5E09204F,奇怪,不是开头压的ebp
004039C6 retn
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)