我试图从另一个dll调用一个函数,知道她的确切地址和参数。
在开发协会:
int __userpurge sub_104CC1A0<eax>(int a1<ecx>, double a2<st0>, int a3)我在stackoverflow.com上找到了类似的答案,但我得到了错误:
struct typechat
{
unsigned int a;
unsigned int b;
unsigned int type;
};
typechat * point;
DWORD callAddress = 0x4CC1A0 + baseaddr;
__declspec(naked) int SendMsg(char * text, double time, typechat * a3)
{
__asm{
push ebp
mov ebp, esp
push ebx
push a3
mov st0, time // error C2415: invalid operand type
mov ecx, text
call[callAddress]
pop ebx
leave
ret
}
}error C2415:无效操作数类型
switch ( *(_DWORD *)(a3 + 8) )//chat type ,[code from IDA]
{
}更新:
_
//int __userpurge sub_104CC1A0<eax>(int a1<ecx>, double a2<st0>, int a3)
declspec(naked) int SendMsg(char * text, double nTime, typechat * nType)
{
__asm{
push ebp
mov ebp, esp
push nType
fld nTime
push ecx
mov ecx, text
move eax, [callAddress]
call eax
pop ecx
leave
ret
}
}此函数也不工作!:(不称为callAddress)
发布于 2013-12-27 20:41:53
AFAIK,您不能MOV一个值进入ST0寄存器,您必须使用FLD代替,例如:
fld timehttps://stackoverflow.com/questions/20806865
复制相似问题