Цитата:
Сообщение от alexteam
э.. и чо это значит ?
|
Это просто функции, в которых месседжБокс)
Код:
DWORD WINAPI InitThread(LPVOID lpParameter)
{
//HWID();
hEngine = GetModuleHandle("engine.dll");
UNHandlerTable = GetProcAddress(hEngine, nUNHandlerTable);
//GameGuardReplay = GetProcAddress(hEngine, nGameGuardReplay);
(FARPROC &)UNetWorkHandler_Init = GetProcAddress(hEngine, nUNHandlerInit);
(FARPROC &)DispatchNetworkQueue = GetProcAddress(hEngine, nDispatchNetworkQueue);
pDispatchNetworkQueue = (int)DispatchNetworkQueue;
SplaisingVMT(UNHandlerTable,UNetWorkHandler_Init,UNHandler_Init);
//SplaisingVMT(UNHandlerTable,GameGuardReplay,GameGuardReplayHook);
while (GetModuleHandleA("fire.dll") == 0)
{
Sleep(100);
}
(FARPROC &)SendPacket = (FARPROC)(DWORD *)(**(DWORD **)(pUNetworkHandler + 0x48) + 0x6C);
(FARPROC &)ClientEncrypt = (FARPROC)((DWORD)UNHandlerTable - 0x0C);
(FARPROC &)ClientDecrypt = (FARPROC)((DWORD)UNHandlerTable - 0x08);
SplaisingVMTF(ClientEncrypt, NewCrypt);
SplaisingVMTF(ClientDecrypt, NewCrypt);
return 0;
};
Код:
void __stdcall NewCrypt(char * buff, __int64 * Key, int size)
{
MessageBox(0,"New Crypt","New Ctypt Is", MB_OK);
};
Код:
DWORD oldprotect;
/******************************************************************************************************
* Хук таблицы VMT
******************************************************************************************************/
void __stdcall SplaisingVMT(void * Table, void * Method, void * Hook)
{
asm
{
mov ecx,-1
cld
mov edi,Table
mov eax,Method
repnz scasd
push Hook
pop edi-4
}
return;
};
void __stdcall SplaisingVMTF(void * Method, void * Hook)
{
int * pMethod = *(int**)(Method);
if(!VirtualProtect(pMethod,10,PAGE_EXECUTE_READWRITE,&oldprotect))
{
MessageBox(0,"SplaisingVMTF", "Error", MB_OK);
return;
}
pMethod = (int*)Hook;
return;
};
/******************************************************************************************************
* Сплайсинг типа CALL
******************************************************************************************************/
void __stdcall SplaisingCall(void * Method, void * Hook)
{
if(!VirtualProtect(Method,10,PAGE_EXECUTE_READWRITE,&oldprotect))
{
MessageBox(0,"SplaisingCall", "Error", MB_OK);
return;
}
asm
{
mov eax, [Method]
mov ebx, eax
mov edx, [Hook]
add ebx, 0x05
sub edx, ebx
mov byte [eax], 0xE8
mov dword [eax+1], edx
}
return;
};
Добавлено через 43 минуты
ВСё, проблема решена)
Тему можно закрывать)