D3D Wallhack using DIP hook

Posts 1–15 of 19 · Page 1 of 2
D3D Wallhack using DIP hook
I'm following the tutorial of DeadHell, I need help how to find these (d3d9+Olly)coz Im noob on this
~thnks

[HTML]void WallHack()
{
LoadLibraryA("d3d9.dll");
DWORD D3D9, adr, *VTable;
do
{
D3D9 = (DWORD)LoadLibraryA("d3d9.dll");
Sleep(100);
} while (D3D9 == NULL);

adr = FindPattern(D3D9, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x8", "xx????xx????xx");
if (adr) {
memcpy(&VTable,(void *)(adr+2),4);

MakeJMP((BYTE *)0x4FF51658, (DWORD)dwmyDIP, 0x6);
DWORD dwJMPback = 0x4FF51658;
}
}
[/HTML]
How to find these Pointer assuming the 1st is the DIP hook & the other is DIP return?
MakeJMP((BYTE *)0x4FF51658, (DWORD)dwmyDIP, 0x6);
DWORD dwJMPback = 0x4FF51658;
Refer:
http://www.mpgh.net/forum/242-crossf...-tutorial.html
i use this:
 
Spoiler
Code:
void DX_Init(DWORD* table)
{
    WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(NULL),NULL,NULL,NULL,NULL,"DX",NULL};
    RegisterClassEx(&wc);
    HWND hWnd = CreateWindow("DX",NULL,WS_OVERLAPPEDWINDOW,100,100,300,300,GetDesktopWindow(),NULL,wc.hInstance,NULL);
    LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory( &d3dpp, sizeof(d3dpp) );
    d3dpp.Windowed = TRUE;
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
    LPDIRECT3DDEVICE9 pd3dDevice;
    pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];

    table[ES]	= pVTable[42];
    table[DIP]	= pVTable[82];
    table[RES]	= pVTable[16];

    DestroyWindow(hWnd);
}
Quote Originally Posted by pceumel View Post
i use this:
 
Spoiler
Code:
void DX_Init(DWORD* table)
{
    WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(NULL),NULL,NULL,NULL,NULL,"DX",NULL};
    RegisterClassEx(&wc);
    HWND hWnd = CreateWindow("DX",NULL,WS_OVERLAPPEDWINDOW,100,100,300,300,GetDesktopWindow(),NULL,wc.hInstance,NULL);
    LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory( &d3dpp, sizeof(d3dpp) );
    d3dpp.Windowed = TRUE;
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
    LPDIRECT3DDEVICE9 pd3dDevice;
    pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];

    table[ES]	= pVTable[42];
    table[DIP]	= pVTable[82];
    table[RES]	= pVTable[16];

    DestroyWindow(hWnd);
}
you forgot to destroy the created device :P
@pceumel thanks for your reply,, but im not interested in hooking on the specific pointer in the DIP to make wallhack etc..;
sry but can´t get what u mean ^^ u want VTable ?
Quote Originally Posted by firefox800 View Post
I'm following the tutorial of DeadHell, I need help how to find these (d3d9+Olly)coz Im noob on this
~thnks

[HTML]void WallHack()
{
LoadLibraryA("d3d9.dll");
DWORD D3D9, adr, *VTable;
do
{
D3D9 = (DWORD)LoadLibraryA("d3d9.dll");
Sleep(100);
} while (D3D9 == NULL);

adr = FindPattern(D3D9, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x8", "xx????xx????xx");
if (adr) {
memcpy(&VTable,(void *)(adr+2),4);

MakeJMP((BYTE *)0x4FF51658, (DWORD)dwmyDIP, 0x6);
DWORD dwJMPback = 0x4FF51658;
}
}
[/HTML]
How to find these Pointer assuming the 1st is the DIP hook & the other is DIP return?

Refer:
http://www.mpgh.net/forum/242-crossf...-tutorial.html
It's a wrong address , because the d3d9.dll is variable , the real address is the Vtable of DIP + 0x7 .
@xBuMbIx thanks for the info btw sir im using Windows XP
@pceumel i mean hooking in DIP i want to know where i can find pointers in the exact location in d3d9.dll ; i found a thread by Mr. ginayat tutorial in searching DIP hook pointers may this a big help to make hooking in crossfire games,,~Thanks
Quote Originally Posted by firefox800 View Post
@xBuMbIx thanks for the info btw sir im using Windows XP
@pceumel i mean hooking in DIP i want to know where i can find pointers in the exact location in d3d9.dll ; i found a thread by Mr. ginayat tutorial in searching DIP hook pointers may this a big help to make hooking in crossfire games,,~Thanks
If u understand good :

8B FF 55 8B EC 6A FF 68 ?? ?? ?? ?? 64 A1 00 00 00 00 50 83 EC 20 53 56 57 A1 ?? ?? ?? ?? 33 C5
50 8D 45 F4 64 A3 00 00 00 00 89 65 F0 8B 7D 08 33 DB 3B FB 0F 84 ?? ?? ?? ?? 8D 77 04

in d3d9.dll

If i don t wrong midfunction here is decected by xtrap but try



The detour zone is after PUSH -1
@xBuMbIx thnks for your reply

i got the code now:

DIP HOOK: 4FE5105D
DIP RET: 4FE50F3C

yes but will try to make midfunction hook thnks xBuMbIx
a hint : hardware breakpoints aren´t patched ... ^^
@pceumel, thanks for the info? any idea how to hook DIP in other way, thnks in advance.
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(52): error C2400: inline assembler syntax error in 'second operand'; found 'newline'
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(53): warning C4405: 'DWORD' : identifier is reserved word
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(53): warning C4405: 'PTR' : identifier is reserved word
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(53): error C2400: inline assembler syntax error in 'opcode'; found 'PTR'
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(90): error C2601: 'WallHack' : local function definitions are illegal
1> c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(78): this line contains a '{' which has not yet been matched
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(111): error C2601: 'DX_Init' : local function definitions are illegal
1> c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(78): this line contains a '{' which has not yet been matched
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(132): error C2065: 'oid' : undeclared identifier
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(132): error C2146: syntax error : missing ';' before identifier 'WallHack'
1>c:\users\pc1\documents\visual studio 2010\projects\cheat\cheat\cheat.cpp(133): error C2143: syntax error : missing ';' before '{'


how to fix this
@amuto22 just leave this thread man , its clear that you understand nothing.
You only copy and paste and expect to work.
A device is also being created if the hWnd is 0.
Posts 1–15 of 19 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?