-
Автор темы
- #1
Кому не сложно, сделайте пожалуйста dll, это WH для русской локализации
DWORD retDIPHook, DIPHook;
int wallhack = 1;
__declspec(naked) HRESULT WINAPI aDIPHook()
{
static LPDIRECT3DDEVICE9 pDevice;
__asm
{
MOV ECX, DWORD PTR DS : [EDI]
MOV EDX, DWORD PTR DS : [ECX + 0x148]
MOV DWORD PTR DS : [pDevice], EDI
PUSHAD
}
if (wallhack)
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
__asm
{
POPAD
JMP retDIPHook
}
}
bool Ready2Hook()
{
if (GetModuleHandle("CShell.dll") != 0 && GetModuleHandle("ClientFx.fxd") != 0)
return true;
return false;
}
DWORD WINAPI Call()
{
while (!Ready2Hook())
Sleep(200);
while (TRUE)
{
DIPHook = FindPattern((DWORD)GetModuleHandle("crossfire.exe"), 0xFFFFFF, (PBYTE)"\x8B\x0F\x8B\x91\x00\x00\x00\x00\x53\x6A\x00\x55\x6A\x00\x6A\x00\x6A\x04\x57\xFF\xD2\x5F\x5E\x5D\x85\xC0", "0000????00?00?0?0?00000000");
if (DIPHook != 0)
{
retDIPHook = (DIPHook + 0x8);
DetourCreate((PBYTE)DIPHook, (PBYTE)aDIPHook, 8);
}
}
return 0;
}
DWORD retDIPHook, DIPHook;
int wallhack = 1;
__declspec(naked) HRESULT WINAPI aDIPHook()
{
static LPDIRECT3DDEVICE9 pDevice;
__asm
{
MOV ECX, DWORD PTR DS : [EDI]
MOV EDX, DWORD PTR DS : [ECX + 0x148]
MOV DWORD PTR DS : [pDevice], EDI
PUSHAD
}
if (wallhack)
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
__asm
{
POPAD
JMP retDIPHook
}
}
bool Ready2Hook()
{
if (GetModuleHandle("CShell.dll") != 0 && GetModuleHandle("ClientFx.fxd") != 0)
return true;
return false;
}
DWORD WINAPI Call()
{
while (!Ready2Hook())
Sleep(200);
while (TRUE)
{
DIPHook = FindPattern((DWORD)GetModuleHandle("crossfire.exe"), 0xFFFFFF, (PBYTE)"\x8B\x0F\x8B\x91\x00\x00\x00\x00\x53\x6A\x00\x55\x6A\x00\x6A\x00\x6A\x04\x57\xFF\xD2\x5F\x5E\x5D\x85\xC0", "0000????00?00?0?0?00000000");
if (DIPHook != 0)
{
retDIPHook = (DIPHook + 0x8);
DetourCreate((PBYTE)DIPHook, (PBYTE)aDIPHook, 8);
}
}
return 0;
}