请大神翻译源码到e~
有请精通c和e的大神帮翻译此段到e~谢谢~VOID DisplayGameTextFunc(
wchar_t pszContent[],
int x,
int y
);
DWORD GameAddr=NULL;
BOOL APIENTRY DllMain( HANDLE hModule,
DWORDul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
Go();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
void Go()
{
GameAddr=(DWORD)GetModuleHandle("game.dll");
if(GameAddr==NULL)
{
MessageBox(NULL,NULL,"no game.dll",0);
return;
}
if(*(int*)(GameAddr+0x361f62)!=0x30245c89)
{
MessageBox(NULL,NULL,"error Gamedll Version",0);
return;
}
MiniMap();
PowerAndRoshan();
}
DLL注入的吧? plpplppl 发表于 2015-1-27 09:15
DLL注入的吧?
翻译到e后就不一定要dll了,exe远程hook也可以吧 //显示游戏文本 pszContent要显示的文字数组 x坐标y坐标
VOID DisplayGameTextFunc(
wchar_t pszContent[],
int x,
int y
);
//定义一个双字节数
DWORD GameAddr=NULL;
//程序的入口 传入:句柄,相应类型(后面的weitch来判断),lpReserved未知
BOOL APIENTRY DllMain( HANDLE hModule,
DWORDul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH://调用注入
Go();
break;
case DLL_THREAD_ATTACH://线程注入
case DLL_THREAD_DETACH://线程分离
case DLL_PROCESS_DETACH://注入分离
break;
}
return TRUE;
}
void Go()
{
GameAddr=(DWORD)GetModuleHandle("game.dll");//取dll地址
if(GameAddr==NULL)
{
//地址为Null则输出无dll
MessageBox(NULL,NULL,"no game.dll",0);
return;
}
if(*(int*)(GameAddr+0x361f62)!=0x30245c89)
{
//读内存整数型不为0x30245c89则提示版本错误
MessageBox(NULL,NULL,"error Gamedll Version",0);
return;
}
//此处代码不全,无法继续猜,下面是调用两个方法,应该就是外挂的功能了
MiniMap();
PowerAndRoshan();
}
如有帮助请评分
页:
[1]