Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › CrossFire Hacks & Cheats › CrossFire Hack Coding / Programming / Source Code › Undedected D3D Hook

ExclamationUndedected D3D Hook

Posts 1–15 of 22 · Page 1 of 2
CO
CoderCf
Undedected D3D Hook
Main.cpp

Code:
#include "Functions.h"

DWORD ret_myMid;

void D3D(LPDIRECT3DDEVICE9 pDevice)
{
	IDirect3DVertexBuffer9* pStreamData = NULL; 
	UINT iOffsetInBytes,iStride;
	pDevice->GetStreamSource(0,&pStreamData,&iOffsetInBytes,&iStride);

if(iStride ==44 || iStride == 40)
{
			pDevice->SetRenderState(D3DRS_ZENABLE,D3DZB_FALSE);
 }
		
}
_declspec(naked) void MyMid()
{
 static LPDIRECT3DDEVICE9 pDevice;
 __asm 
 {
  mov edi, edi
  push ebp
  mov ebp, esp
  MOV EAX,DWORD PTR [EBP + 0x8]
  MOV pDevice,EAX
 }
 D3D(pDevice);
 _asm
{
JMP ret_myMid 
}
}
void Hacks(void)
{
	DWORD hD3D;  
 do { hD3D = (DWORD)LoadLibraryA("d3d9.dll");} while(!hD3D);
DWORD Address = FindPattern(hD3D, 0x128000,(PBYTE)"PATTERN","MASK"); <- You have to find it shelf in d3d9.dll :D If you find you can Post 
	if(Address)
	{
		ret_myMid = Address + 5;
		DetourCreate((PBYTE)Address,(PBYTE)MyMid,5);
		Beep(750,300);
	}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if (dwReason==DLL_PROCESS_ATTACH)
	{
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
	}
	return TRUE;
}
Functions.h

Code:
#include <windows.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
#include <fstream>
#include <d3d9.h>
#include <d3dx9.h>
#include <time.h>
#pragma comment (lib,"d3dx9.lib")
#pragma comment (lib,"d3d9.lib")

HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
{
if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED,
ppD3Dtex, NULL)) )
return E_FAIL;
WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
|(WORD)(((colour32>>20)&0xF)<<8)
|(WORD)(((colour32>>12)&0xF)<<4)
|(WORD)(((colour32>>4)&0xF)<<0);
D3DLOCKED_RECT d3dlr;
(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for(int xy=0; xy < 8*8; xy++)
*pDst16++ = colour16;
(*ppD3Dtex)->UnlockRect(0);
return S_OK;
}
VOID *DetourCreate( BYTE *src, CONST BYTE *dst, CONST INT len )
{
    BYTE *jmp =( BYTE * ) malloc( len + 5 );
    DWORD dwBack;

    VirtualProtect( src, len, PAGE_READWRITE, &dwBack );
    memcpy( jmp, src, len );    
    jmp += len;
    jmp[0] = 0xE9;
    *( DWORD * )( jmp + 1 ) = ( DWORD )( src + len - jmp ) - 5;

    src[0] = 0xE9;
    *( DWORD * )( src + 1 ) = ( DWORD )( dst - src ) - 5;
    for( INT i = 5; i < len; i++ )
        src[i] = 0x90;
    VirtualProtect( src, len, dwBack, &dwBack );

    return( jmp - len );
}
void MakeCall(BYTE* paddress, DWORD yourfunction, DWORD dwlen)
{
    DWORD dwOldProtect, dwBkup, dwRelAddr;
    VirtualProtect(paddress, dwlen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    dwRelAddr = (DWORD) (yourfunction - (DWORD) paddress) - 5;
    *paddress = 0xE8;
    *((DWORD*) (paddress + 0x1)) = dwRelAddr;
    for(DWORD x = 0x5; x < dwlen; x++) *(paddress + x) = 0x90;
 VirtualProtect(paddress, dwlen, dwOldProtect, &dwBkup);
    return;
}
void MakeJMP(BYTE *pAddress, DWORD dwJumpTo, DWORD dwLen)
{
    DWORD dwOldProtect, dwBkup, dwRelAddr;
    VirtualProtect(pAddress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    dwRelAddr = (DWORD) (dwJumpTo - (DWORD) pAddress) - 5;
    *pAddress = 0xE9;
    *((DWORD *)(pAddress + 0x1)) = dwRelAddr;
    for(DWORD x = 0x5; x < dwLen; x++) *(pAddress + x) = 0x90;
    VirtualProtect(pAddress, dwLen, dwOldProtect, &dwBkup);
    return;
}
bool bDataCompare(const BYTE* pData,const BYTE* bMask,const char* szMasK)
{
	for(;*szMasK;++szMasK,++pData,++bMask)
	{
		if(*szMasK=='x' && *pData!=*bMask) return false;
	}
	return (*szMasK) == NULL;
}
DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMASK,char * szMask)
{
	for(DWORD i=0;i<dwLen;i++)
	{
		if(bDataCompare((BYTE*)(dwAddress+i),bMASK,szMask)) return (DWORD)(dwAddress+i);
	}
	return 0;
}
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "ClientFX.fxd" ) != NULL && GetModuleHandleA( "CShell.dll" ) != NULL ){return true;}
	return false;
}
Credits : Me(ALL),-IfluX(ASM)
#1 · 13y ago
6I
6ixth
This hook is not the D3D9?
and
This has already been posted!

http://www.mpgh.net/forum/242-crossf...e-example.html
#2 · 13y ago
AL
Aldimann
He stole this one from me
Already reported him

He dont got the pattern & the wrong asm because i manipulated the source before i showed him via Teamviewer

He tried Copy&Paste steal
#3 · edited 13y ago · 13y ago
CO
CoderCf
Quote Originally Posted by ForeverRed View Post
This hook is not the D3D9?
and
This has already been posted!

http://www.mpgh.net/forum/242-crossf...e-example.html

It is D3D and It is not the Same !
#4 · 13y ago
ARGB
ARGB
Code:
C7 06  ??  ??  ??  ?? 89 86  ??  ??  ??  ?? 89 86
#5 · 13y ago
CO
CoderCf
Quote Originally Posted by Aldimann View Post
He stole this one from me
Already reported him

He dont got the pattern & the wrong asm because i manipulated the source before i showed him via Teamviewer

He tried Copy&Paste steal

HAHA If you want to Steel my Codes !


I say i give you NoFallDmg and Other Source i gave you 2 Source + Unpacked CShell + Unpacked Crossfire.exe and you won*t give me the working one :-D
#6 · 13y ago
ARGB
ARGB
Quote Originally Posted by CoderCf View Post
HAHA If you want to Steel my Codes !


I say i give you NoFallDmg and Other Source i gave you 2 Source + Unpacked CShell + Unpacked Crossfire.exe and you won*t give me the working one :-D
neeewbs ..
#7 · 13y ago
AL
Aldimann
You tried to steal mine Undetected DIP Hook and blame me?
Shame on you

But I think everyone that CoderCf(vinke) just steal codes etc

Proof that i got mine own look into attachments
cfhooked.png
#8 · 13y ago
-[I]fLuX
-[I]fLuX
thats no full d3d hook every d3d hook is like that you posted just other address and maybe other mid everyone can say search the pointer by yourself but the pointer is the only thing that xtrap will detected... so this isn't helpfully for neewbes
#9 · 13y ago
Qmo
Qmo
Quote Originally Posted by ForeverRed View Post
This hook is not the D3D9?
Of course this d3d9 , But this not hooking for D3D
This CODE is partly a function of D3D remember ( this not hooking for d3d )

HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
{
if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED,
ppD3Dtex, NULL)) )
return E_FAIL;
WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
|(WORD)(((colour32>>20)&0xF)<<8)
|(WORD)(((colour32>>12)&0xF)<<4)
|(WORD)(((colour32>>4)&0xF)<<0);
D3DLOCKED_RECT d3dlr;
(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for(int xy=0; xy < 8*8; xy++)
*pDst16++ = colour16;
(*ppD3Dtex)->UnlockRect(0);
return S_OK;
}
#10 · edited 13y ago · 13y ago
ayawmanmik
ayawmanmik
Quote Originally Posted by Qmo View Post


Of course this d3d9 , But this not hooking for D3D
This CODE is partly a function of D3D remember ( this not hooking for d3d )

HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
{
if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED,
ppD3Dtex, NULL)) )
return E_FAIL;
WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
|(WORD)(((colour32>>20)&0xF)<<8)
|(WORD)(((colour32>>12)&0xF)<<4)
|(WORD)(((colour32>>4)&0xF)<<0);
D3DLOCKED_RECT d3dlr;
(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for(int xy=0; xy < 8*8; xy++)
*pDst16++ = colour16;
(*ppD3Dtex)->UnlockRect(0);
return S_OK;
}
This Is From Menu D3D ^_^
#11 · 13y ago
6I
6ixth
Quote Originally Posted by Qmo View Post


Of course this d3d9 , But this not hooking for D3D
This CODE is partly a function of D3D remember ( this not hooking for d3d )

Thanks very much!
#12 · 13y ago
ARGB
ARGB
Quote Originally Posted by -[I
fLuX;8140712]thats no full d3d hook every d3d hook is like that you posted just other address and maybe other mid everyone can say search the pointer by yourself but the pointer is the only thing that xtrap will detected... so this isn't helpfully for neewbes
its a FULL d3d hook .. so its helpful for newbs like you
#13 · 13y ago
Qmo
Qmo
Quote Originally Posted by ayawmanmik View Post
This Is From Menu D3D ^_^
partly a function of D3D
#14 · 13y ago
ayawmanmik
ayawmanmik
Quote Originally Posted by Qmo View Post


partly a function of D3D
Yap Im using this In All Of My Menu d3d
#15 · 13y ago
Posts 1–15 of 22 · Page 1 of 2

Post a Reply

Similar Threads

  • WR D3D Hook - =o - 03/22/07By Dave84311 in Hack/Release News
    14Last post 18y ago
  • D3D hooking tutorial 5 i thinkBy llvengancell in WarRock - International Hacks
    7Last post 19y ago
  • WR D3D Hook - =o - 09/21/07By Dave84311 in Hack/Release News
    26Last post 18y ago
  • WR D3D Hook Updated to include Punkbuster Hardware Bypass!By Dave84311 in Hack/Release News
    3Last post 18y ago
  • WR D3D Hook - =o - 09/23/07By Dave84311 in Hack/Release News
    3Last post 19y ago

Tags for this Thread

#crossfire#d3d#hook