So I looked into engine hooking and came up with this:
Code:
#define DIPEngine 0x007D7D03
DWORD retDIPEngine = ( DIPEngine + 12 );
while(true)
{
if(memcmp((void*)DIPEngine, (void*)(PBYTE)"\x8B\x10", 2) == 0)
{
MessageBox(NULL, "memcmp", NULL, NULL);
Sleep(100);
DetourCreate((PBYTE)DIPEngine, (PBYTE)drawIndexedPrimitive, 12);
}
Sleep(50);
}
Code:
HRESULT WINAPI drawIndexedPrimitive(LPDIRECT3DDEVICE9 device, D3DPRIMITIVETYPE type, INT baseVertexIndex, UINT minVertexIndex, UINT numVertices, UINT startIndex, UINT primCount)
{
return pDrawIndexedPrimitive(device, type, baseVertexIndex, minVertexIndex, numVertices, startIndex, primCount);
}
But this crashes as soon as I open up the itemshop in WarRock