Register for your free account! | Forgot your password?
Fortnite Cheats

Go Back   elitepvpers > Popular Games > Fortnite
You last visited: Today at 23:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[DXGI] D3D Hook - Direct Hijack window

Discussion on [DXGI] D3D Hook - Direct Hijack window within the Fortnite forum part of the Popular Games category.

Reply
 
Old   #1
Trade Restricted
 
MRx86™'s Avatar
 
elite*gold: 30
Join Date: May 2013
Posts: 1,546
Received Thanks: 2,597
[DXGI] D3D Hook - Direct Hijack window

Hi Folkz.

Based to my prev hook for d3d 8/9 released 10 years ago.

Thread :

this was just tested on Fortnite, but for sure will work for any process that load DXGI

sorry for low effort codenz, nowdays very lazy :coolmaninthetoilet:

You know what, my lazy ass, you need to do pattern for various os. for the offset. this was just tested into windows 10 22H2 , and no idea if offset changes in others winver


Jobs:
Intercept memset from DXGI and wait for exactly returnaddress, of the follow function exactly in this case D3D Present. + Swap Chain from stack memset stack :sadwavey:





Code:
ID3D11Device       * Device = nullptr;
ID3D11DeviceContext* pContext = NULL;
IDXGISwapChain     * pSwapChain;
static uintptr_t hReturnAddress = NULL;

#define IatHook(A,O,N) \
	  if ( *(DWORD64*)(A) && *(DWORD64*)(A) != (DWORD64)(&N) )  { \
			*(DWORD64*)(&O) = *(DWORD64*)(A); \
			*(DWORD64*)(A) = (DWORD64)(&N); \
       }


void* (__cdecl* omemset) (void* str, int c, size_t n);

void* __cdecl nmemset ( void* str, int c, size_t n )
{
	if ( _ReturnAddress() == (void*)hReturnAddress )
	{
		pSwapChain = (IDXGISwapChain*)*(DWORD64*)str;
		if (pSwapChain)
		{
			if (!Device)
			{
				pSwapChain->GetDevice(__uuidof(Device), (void**)&Device);
				Device->GetImmediateContext(&pContext);
				add_log("", "pDevice %p pContext %p", Device, pContext);
			}


		}
	}
	return omemset(str, c, n);
}

void InitializeHook()
{

	uintptr_t hModule = GetModuleHandleW(L"dxgi.dll");


	add_log("", "dxgi.dll %p", hModule);

	hReturnAddress = (hModule+0x1678);


	add_log("", "hReturnAddress.dll %p", hReturnAddress);
	
	DWORD dwMemsetFlag;
	VirtualProtect((void*)(hModule+0x9EEC0),8,PAGE_READWRITE,&dwMemsetFlag);  //VirtualProtect Needed due to page protection
	IatHook((hModule+0x9EEC0), omemset, nmemset);
	VirtualProtect((void*)(hModule+0x9EEC0),8,dwMemsetFlag,&dwMemsetFlag);
}

just a few precautions need to be taken when swap memset, make sure you point it into a legit module if you are internal

MRx86™ is offline  
Reply


Similar Threads Similar Threads
Black ops 2 Pc dxgi.dll missing hilfee
09/15/2013 - Call of Duty - 4 Replies
Hallo ich habe heute black ops 2 installiert wollte es starten dann kamm das eine dll fehlt hab ich sie gedownloadet und reingetan dann stand da das :real dxgi.dll missing hat jemand vielleicht ne antwort ? oder kann mir jemand damit helfen?
Black Ops 2 PC "dxgi.dll!CreateDXGIFactory1" error
02/17/2013 - Call of Duty - 15 Replies
Hallo, habe vor ein paar Stunden BO2 fertig geladen und wollte es Starten...doch nun bekomme ich diese fehlermedlung* "" Problemsignatur: Problemereignisname: APPCRASH Anwendungsname: t6mp.exe Anwendungsversion: 1.0.0.1 Anwendungszeitstempel: 509a7625 Fehlermodulname: dxgi.dll!CreateDXGIFactory1 Fehlermodulversion: 6.0.6002.18327 Fehlermodulzeitstempel: 4cb73436



All times are GMT +1. The time now is 23:41.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.