please check this WH
it get ban in 3 minutes
please check this code
crossfire - Ru
CODE HERE
please check this code
crossfire - Ru
CODE HERE
code
#include <Windows.h>
#include <d3d9.h>
#include <process.h>
DWORD jump_Font, jump_Present;
DWORD ModelNode;
DWORD WallArray;
bool WallHack = false;
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for (; *szMask; ++szMask, ++pData, ++bMask)
if (*szMask == 'x' && *pData != *bMask)
return 0;
return (*szMask) == NULL;
}
DWORD FindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask, char * szMask)
{
for (DWORD i = 0; i<dwLen; i++)
if (bCompare((BYTE*)(dwAddress + i), bMask, szMask))
return (DWORD)(dwAddress + i);
return 0;
}
__declspec(naked) DWORD __stdcall pPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
{
__asm
{
MOV EDI, EDI
PUSH EBP
MOV EBP, ESP
jmp jump_Present
}
}
HRESULT _stdcall my_Present(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
{
// Draw your Stuff Here or Call your Memory Hacks
bool isgetaddress = false;
void FindAddress();
{
if(!isgetaddress)
{
WallArray = FindPattern(0x400000, 0xFFFFFFF,(PBYTE)"\x75\x00\x83\x0D\x00\x00\x00\x00 \x01\xB8\x00\x00\x00\x00\xE8","x?xx????xx????x");
if(WallArray) WallArray = *(DWORD*)(WallArray + 0xA);
// 104C0D13 |. 8B15 E421BA11 MOV EDX,DWORD PTR DS:[11BA21E4]
ModelNode = 0x1BA21E4; //8B 15 ?? ?? ?? ?? 83 C4 2 <============= Need to update
isgetaddress = true;
}
}
//WallHack
if (GetAsyncKeyState(0x56) & 1) WallHack = (!WallHack); //V Hotkey for WallHack
if(WallHack)
{
memcpy((PVOID)(WallArray + 0xA4), (PBYTE)"\x00\x00\x00\x00\x00\x00\x90\x90\x90\x90\x 90\x90\x90\x90\x90\x90\x90\x90\x90", 19);
}
else
{
memcpy((PVOID)(WallArray + 0xA4), (PBYTE) "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\ x90\x90\x90\x90\x90\x90\x90", 19);
}
return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
__declspec(naked) DWORD __stdcall D3DXCreateFont(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E, DWORD F, DWORD G, DWORD H, DWORD I, DWORD J, DWORD K, DWORD L)
{
__asm
{
MOV EDI, EDI
PUSH EBP
MOV EBP, ESP
jmp jump_Font
}
}
DWORD __stdcall MyD3DXCreateFont(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E, DWORD F, DWORD G, DWORD H, DWORD I, DWORD J, DWORD K, DWORD L)
{
DWORD thisa = *(DWORD*)A;
DWORD old_Present;
DWORD PSAddress = thisa + 68; //17*4 Present
DWORD MID_Present = *(DWORD*)PSAddress;
jump_Present = MID_Present + 5;
VirtualProtect((LPVOID)MID_Present, 5, PAGE_EXECUTE_READWRITE, &old_Present);
*(PBYTE)MID_Present = 0xE9;
*(PULONG)(MID_Present + 1) = (DWORD)my_Present - (MID_Present + 5);
*(PULONG)(jump_Font - 5) = 0x0000008b;
*(PULONG)(jump_Font - 4) = 0xEC8B55FF;
return D3DXCreateFont(A, B, C, D, E, F, G, H, I, J, K, L);
}
unsigned __stdcall sub_10005F90(void *a1)
{
HMODULE v1;
FARPROC v2;
DWORD flOldProtect;
v1 = LoadLibraryA("d3dx9_29.dll");
v2 = GetProcAddress(v1, "D3DXCreateFontA");
VirtualProtect(v2, 5u, 0x40u, &flOldProtect);
jump_Font = (int)v2 + 5;
*(DWORD*)v2 = 233;
*(DWORD*)((char *)v2 + 1) = (char *)MyD3DXCreateFont - (char *)v2 - 5;
return 1;
}
BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
DisableThreadLibraryCalls(hinstDLL);
if (fdwReason == 1)
_beginthreadex(0, 0, &sub_10005F90, 0, 0, 0);
return 1;
}
#include <d3d9.h>
#include <process.h>
DWORD jump_Font, jump_Present;
DWORD ModelNode;
DWORD WallArray;
bool WallHack = false;
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for (; *szMask; ++szMask, ++pData, ++bMask)
if (*szMask == 'x' && *pData != *bMask)
return 0;
return (*szMask) == NULL;
}
DWORD FindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask, char * szMask)
{
for (DWORD i = 0; i<dwLen; i++)
if (bCompare((BYTE*)(dwAddress + i), bMask, szMask))
return (DWORD)(dwAddress + i);
return 0;
}
__declspec(naked) DWORD __stdcall pPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
{
__asm
{
MOV EDI, EDI
PUSH EBP
MOV EBP, ESP
jmp jump_Present
}
}
HRESULT _stdcall my_Present(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
{
// Draw your Stuff Here or Call your Memory Hacks
bool isgetaddress = false;
void FindAddress();
{
if(!isgetaddress)
{
WallArray = FindPattern(0x400000, 0xFFFFFFF,(PBYTE)"\x75\x00\x83\x0D\x00\x00\x00\x00 \x01\xB8\x00\x00\x00\x00\xE8","x?xx????xx????x");
if(WallArray) WallArray = *(DWORD*)(WallArray + 0xA);
// 104C0D13 |. 8B15 E421BA11 MOV EDX,DWORD PTR DS:[11BA21E4]
ModelNode = 0x1BA21E4; //8B 15 ?? ?? ?? ?? 83 C4 2 <============= Need to update
isgetaddress = true;
}
}
//WallHack
if (GetAsyncKeyState(0x56) & 1) WallHack = (!WallHack); //V Hotkey for WallHack
if(WallHack)
{
memcpy((PVOID)(WallArray + 0xA4), (PBYTE)"\x00\x00\x00\x00\x00\x00\x90\x90\x90\x90\x 90\x90\x90\x90\x90\x90\x90\x90\x90", 19);
}
else
{
memcpy((PVOID)(WallArray + 0xA4), (PBYTE) "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\ x90\x90\x90\x90\x90\x90\x90", 19);
}
return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
__declspec(naked) DWORD __stdcall D3DXCreateFont(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E, DWORD F, DWORD G, DWORD H, DWORD I, DWORD J, DWORD K, DWORD L)
{
__asm
{
MOV EDI, EDI
PUSH EBP
MOV EBP, ESP
jmp jump_Font
}
}
DWORD __stdcall MyD3DXCreateFont(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E, DWORD F, DWORD G, DWORD H, DWORD I, DWORD J, DWORD K, DWORD L)
{
DWORD thisa = *(DWORD*)A;
DWORD old_Present;
DWORD PSAddress = thisa + 68; //17*4 Present
DWORD MID_Present = *(DWORD*)PSAddress;
jump_Present = MID_Present + 5;
VirtualProtect((LPVOID)MID_Present, 5, PAGE_EXECUTE_READWRITE, &old_Present);
*(PBYTE)MID_Present = 0xE9;
*(PULONG)(MID_Present + 1) = (DWORD)my_Present - (MID_Present + 5);
*(PULONG)(jump_Font - 5) = 0x0000008b;
*(PULONG)(jump_Font - 4) = 0xEC8B55FF;
return D3DXCreateFont(A, B, C, D, E, F, G, H, I, J, K, L);
}
unsigned __stdcall sub_10005F90(void *a1)
{
HMODULE v1;
FARPROC v2;
DWORD flOldProtect;
v1 = LoadLibraryA("d3dx9_29.dll");
v2 = GetProcAddress(v1, "D3DXCreateFontA");
VirtualProtect(v2, 5u, 0x40u, &flOldProtect);
jump_Font = (int)v2 + 5;
*(DWORD*)v2 = 233;
*(DWORD*)((char *)v2 + 1) = (char *)MyD3DXCreateFont - (char *)v2 - 5;
return 1;
}
BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
DisableThreadLibraryCalls(hinstDLL);
if (fdwReason == 1)
_beginthreadex(0, 0, &sub_10005F90, 0, 0, 0);
return 1;
}
