❗ D3D Hack Problem in McMy's D3D Base
Anyone can Help me @expert codes.... Why CHAMS D3D Hack not work on game????
not detected but not work..... THANK'S FOR YOUR HELP ^.^ IM USING McMy's D3D Base
not detected but not work..... THANK'S FOR YOUR HELP ^.^ IM USING McMy's D3D Base
Code:
// Color:
#define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
#define RED D3DCOLOR_ARGB(255, 255, 000, 000)
#define GREEN D3DCOLOR_ARGB(255, 000, 255, 000)
#define BLUE D3DCOLOR_ARGB(255, 000, 000, 255)
#define BLACK D3DCOLOR_ARGB(150, 000, 000, 000)
#define mBLACK D3DCOLOR_ARGB(100, 000, 000, 205)
#define PURPLE D3DCOLOR_ARGB(255, 125, 000, 255)
#define GREY D3DCOLOR_ARGB(255, 128, 128, 128)
#define YELLOW D3DCOLOR_ARGB(255, 255, 255, 000)
#define ORANGE D3DCOLOR_ARGB(255, 255, 125, 000)
#define WHITE2 D3DCOLOR_ARGB(100, 255, 255, 255)
#define RED2 D3DCOLOR_ARGB(100, 255, 000, 000)
#define GREEN2 D3DCOLOR_ARGB(100, 000, 255, 000)
#define BLUE2 D3DCOLOR_ARGB(100, 000, 000, 255)
#define BLACK2 D3DCOLOR_ARGB(100, 000, 000, 000)
#define PURPLE2 D3DCOLOR_ARGB(100, 125, 000, 255)
#define GREY2 D3DCOLOR_ARGB(100, 128, 128, 128)
#define YELLOW2 D3DCOLOR_ARGB(100, 255, 255, 000)
#define ORANGE2 D3DCOLOR_ARGB(100, 255, 125, 000)
#define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
#define RED D3DCOLOR_ARGB(255, 255, 000, 000)
#define GREEN D3DCOLOR_ARGB(255, 000, 255, 000)
#define BLUE D3DCOLOR_ARGB(255, 000, 000, 255)
#define BLUE4 D3DCOLOR_ARGB(255, 000, 000, 255)
#define BLACK D3DCOLOR_ARGB(150, 000, 000, 000)
#define mBLACK D3DCOLOR_ARGB(100, 000, 000, 205)
#define PURPLE D3DCOLOR_ARGB(255, 125, 000, 255)
#define GREY D3DCOLOR_ARGB(255, 128, 128, 128)
#define YELLOW D3DCOLOR_ARGB(255, 255, 255, 000)
#define ORANGE D3DCOLOR_ARGB(255, 255, 125, 000)
#define WHITE2 D3DCOLOR_ARGB(100, 255, 255, 255)
#define RED2 D3DCOLOR_ARGB(100, 255, 000, 000)
#define RED3 D3DCOLOR_ARGB(100, 255, 000, 000)
#define GREEN2 D3DCOLOR_ARGB(100, 000, 255, 000)
#define BLUE2 D3DCOLOR_ARGB(100, 000, 000, 255)
#define BLACK2 D3DCOLOR_ARGB(100, 000, 000, 000)
#define PURPLE2 D3DCOLOR_ARGB(100, 125, 000, 255)
#define GREY2 D3DCOLOR_ARGB(100, 128, 128, 128)
#define YELLOW2 D3DCOLOR_ARGB(100, 255, 255, 000)
#define ORANGE2 D3DCOLOR_ARGB(100, 255, 125, 000)
#define BLUE3 D3DCOLOR_XRGB(030, 144, 255)
#define COLERX4 D3DCOLOR_ARGB(255, 255, 255, 000)
#define COLERX3 D3DCOLOR_ARGB(255, 255, 000, 000)
#define COLERX2 D3DCOLOR_ARGB(255, 000, 255, 000)
#define BLUE3 D3DCOLOR_XRGB(030, 144, 255)
#define COLERX BLACK
#define MCOLOR_CURRENT RED
#define MCOLOR_ACTIVE GREEN
#define MENUCOLOR_TITLE D3DCOLOR_ARGB(255, 255, 000, 000)
#define MCOLOR_TEXT D3DCOLOR_ARGB(255, 255, 255, 255)
#define MCOLOR_FOLDER D3DCOLOR_ARGB(255, 000, 000, 255)
#define MCOLOR_INACTIVE D3DCOLOR_ARGB(255, 255, 000, 000)
#define BackGround D3DCOLOR_ARGB(150, 000, 000, 000)
#define colorgmwarn D3DCOLOR_ARGB(255,255,0,0)
Base:
#include <windows.h>
#include <stdio.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <fstream>
#include "color.h"
#include "addys.h"
#include "st_Options.h"
#include "base.h"
#include "d3dmenu.h"
#include "detours.h"
#include "bypass.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "D3DX9.LIB")
D3D9Menu *MCMYD3D9 = NULL;
LPDIRECT3DDEVICE9 pDevice = 0;
LPDIRECT3DTEXTURE9 White,Red,Green,Blue,Black,Purple,Grey,Yellow,Orange;
LPDIRECT3DVERTEXBUFFER9 StreamData;
UINT OffsetInBytes;
ID3DXFont* pFont;
bool Create;
char *Moptfolder[] = {"[+]", "[-]"};
char *Moptonoff[] = {" [OFF] ", " [ON] "};
char *Scope[] = {"1", "2", "3"};
char *SJ[] = {"1000", "2000", "3000", "4000", "5000"};
char *coder[] = {"Coder"};
char *thx[] = {"Thx"};
char *text = {""};
char *Chams[] = {"[OFF]", "Red", "Blue", "Green", "White", "Black", "Yellow"};
int MC_Chams;
int MC_GlassWalls;
int MC_SPEED;
int MC_BOUNDS;
int MC_WATER;
int MC_SJ;
int MC_DRUNK;
int MC_PREM;
int MC_DINAR;
int MC_LEVEL;
int MC_SLOT5;
int MC_SLOT6;
int MC_SLOT7;
int MC_SLOT8;
int MC_SPAWN ;
int MC_ANTIAFK;
int MC_GM;
int MC_ROOM;
int MC_SM;
int MC_SPREAD;
int MC_RECOIL;
int MC_SCOPE;
int MC_SIZE;
int MC_LOCK;
int McMy ;
int CH_chams;
int color;
int blackone;
int skillrulezz;
int AutoReady;
int Enter;
int AutoStrg;
int Superjump;
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 RebuildMenu(void)
{
MCMYD3D9->AddFolder("[D3D Releated]", Moptfolder, &Folders.folder5, 2);
if(Folders.folder5)
{
MCMYD3D9->AddItem("Chams" , Chams , &MC_Chams ,7 );
MCMYD3D9->AddItem("GlassWalls" , Moptonoff , &MC_GlassWalls ,2 );
}
MCMYD3D9->AddFolder("[Dinarbot]", Moptfolder, &Folders.folder2, 2);
if (Folders.folder2)
{
/*MCMYD3D9->AddItem("Speed " , Moptonoff , &MC_SPEED ,2 );
MCMYD3D9->AddItem("No Bounds" , Moptonoff , &MC_BOUNDS ,2 );
MCMYD3D9->AddItem("No Water" , Moptonoff , &MC_WATER ,2 );
MCMYD3D9->AddItem("SuperJump" , Moptonoff , &MC_SJ ,2 );*/
MCMYD3D9->AddItem("Auto Ready" , Moptonoff , &AutoReady ,2 );
MCMYD3D9->AddItem("Auto Kill" , Moptonoff , &AutoStrg ,2 );
MCMYD3D9->AddItem("Auto Enter" , Moptonoff , &Enter ,2 );
MCMYD3D9->AddItem("Ready 2 Death" , Moptonoff , &Superjump ,2 );
MCMYD3D9->AddItem("GM Warning" , Moptonoff , &MC_GM ,2 );
}
//MCMYD3D9->AddFolder("[Server Hacks]", Moptfolder, &Folders.folder3, 2);
if (Folders.folder3)
{
/* MCMYD3D9->AddItem("Premium" , Moptonoff , &MC_PREM ,2 );
MCMYD3D9->AddItem("Dinar" , Moptonoff , &MC_DINAR ,2 );
MCMYD3D9->AddItem("Level" , Moptonoff , &MC_LEVEL ,2 );
MCMYD3D9->AddItem("5th Slot" , Moptonoff , &MC_SLOT5 ,2 );
MCMYD3D9->AddItem("6th Slot" , Moptonoff , &MC_SLOT6 ,2 );
MCMYD3D9->AddItem("7th Slot" , Moptonoff , &MC_SLOT7 ,2 );
MCMYD3D9->AddItem("8th Slot" , Moptonoff , &MC_SLOT8 ,2 );
MCMYD3D9->AddItem("SpawnWait" , Moptonoff , &MC_SPAWN ,2 );
MCMYD3D9->AddItem("AntiAfkKick" , Moptonoff , &MC_ANTIAFK ,2 );
MCMYD3D9->AddItem("GM Warning" , Moptonoff , &MC_GM ,2 );*/
}
/* MCMYD3D9->AddFolder("[Weapon Hacks]", Moptfolder, &Folders.folder4, 2);*/
if(Folders.folder4)
{
/* MCMYD3D9->AddItem("No Spread" , Moptonoff , &MC_SPREAD ,2 );
MCMYD3D9->AddItem("No Recoil" , Moptonoff , &MC_RECOIL ,2 );
MCMYD3D9->AddItem("Wep. Scope" , Moptonoff , &MC_SCOPE ,2 );
MCMYD3D9->AddItem("Scope Size" , Scope , &MC_SIZE ,4 );
MCMYD3D9->AddItem("AutoLockOn" , Moptonoff , &MC_LOCK ,2 );*/
}
MCMYD3D9->AddFolder("[Credits]", Moptfolder, &Folders.folder6, 2);
if(Folders.folder6)
{
MCMYD3D9->AddItem("Cartel" ,coder , &McMy ,1 );
MCMYD3D9->AddItem("Büny" ,thx , &blackone ,1 );
}
}
void PlayerHacks()
{
if(Enter){
keybd_event(VK_RETURN,0,0,0);
Sleep(250); }
if(AutoStrg){
keybd_event(0x11,0,0,0);
Sleep(250);}
if (AutoReady) {
SetCursorPos(450, 90); // bei 1024x768
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); // Maus wird gedrückt
Sleep(25);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);} // Maus wird losgelassen
if(Superjump){
if(GetAsyncKeyState(VK_CONTROL)){
*(float*)(ADR_PLAYERPOINTER + OFS_Z) = 2000; }
}}
void ServerHacks()
{
}
void ProHacks()
{
for(;; )
{
{
PlayerHacks();
}
{
ServerHacks();
}
}
Sleep(200);
}
HRESULT WINAPI myReset (LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
pFont->OnLostDevice();
HRESULT hRet = pReset(pDevice, pPresentationParameters);
pFont->OnResetDevice();
return hRet;
}
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
{
if(pDevice->GetStreamSource(0,&StreamData,&OffsetInBytes,&m_Stride) == D3D_OK)
{
StreamData->Release();
}
DWORD dwOldZEnable = D3DZB_TRUE;
if(CH_chams == 1)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 1) pDevice->SetTexture(0, Red);
if(CH_chams == 2) pDevice->SetTexture(0, Blue);
if(CH_chams == 3) pDevice->SetTexture(0, Green);
if(CH_chams == 4) pDevice->SetTexture(0, White);
if(CH_chams == 5) pDevice->SetTexture(0, Black);
if(CH_chams == 6) pDevice->SetTexture(0, Yellow);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
if(m_Stride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 1) pDevice->SetTexture(0, Red);
if(CH_chams == 2) pDevice->SetTexture(0, Blue);
if(CH_chams == 3) pDevice->SetTexture(0, Green);
if(CH_chams == 4) pDevice->SetTexture(0, White);
if(CH_chams == 5) pDevice->SetTexture(0, Black);
if(CH_chams == 6) pDevice->SetTexture(0, Yellow);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
}
if(CH_chams == 2)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 2) pDevice->SetTexture(0, Blue);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
if(m_Stride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 2) pDevice->SetTexture(0, Blue);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
}
if(CH_chams == 3)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 3) pDevice->SetTexture(0, Green);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
if(m_Stride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 3) pDevice->SetTexture(0, Green);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
}
if(CH_chams == 4)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 4) pDevice->SetTexture(0, White);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
if(m_Stride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 4) pDevice->SetTexture(0, White);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
}
if(CH_chams == 5)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 5) pDevice->SetTexture(0, Black);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
if(m_Stride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 5) pDevice->SetTexture(0, Black);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
}
if(CH_chams == 6)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 6) pDevice->SetTexture(0, Yellow);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
if(m_Stride == 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
pDevice->SetRenderState(D3DRS_LIGHTING,true);
if(CH_chams == 6) pDevice->SetTexture(0, Yellow);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE,true);
}
}
////////////////////////////END OF CHAMS////////////////////////////
return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
PVOID D3Ddiscover(void *tbl, int size)
{
HWND hWnd;
void *pInterface=0 ;
D3DPRESENT_PARAMETERS d3dpp;
if ((hWnd=CreateWindowEx(NULL,WC_DIALOG,L"",WS_OVERLAPPED,0,0,50,50,NULL,NULL,NULL,NULL))==NULL) return 0;
ShowWindow(hWnd, SW_HIDE);
LPDIRECT3D9 pD3D;
LPDIRECT3DDEVICE9 pD3Ddev;
if ((pD3D = Direct3DCreate9(D3D_SDK_VERSION))!=NULL)
{
ZeroMemory(&d3dpp, sizeof(d3dpp));
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.hDeviceWindow = hWnd;
d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
d3dpp.BackBufferWidth = d3dpp.BackBufferHeight = 600;
pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pD3Ddev);
if (pD3Ddev) {
pInterface = (PDWORD)*(DWORD *)pD3Ddev;
memcpy(tbl,(void *)pInterface,size);
pD3Ddev->Release();
}
pD3D->Release();
}
DestroyWindow(hWnd);
return pInterface;
}
HRESULT WINAPI myPresent ( LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
{
if( !Create )
{
D3DXCreateFont(pDevice, 14, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial", &pFont);
Create = true;
}
if( pFont == NULL )
pFont->OnLostDevice();
else
{
if(MCMYD3D9 == NULL)
{
MCMYD3D9 = new D3D9Menu("Dinarbot by Cartel V.1.0");
}else{
if(MCMYD3D9->Mmax==0) RebuildMenu();
MCMYD3D9->MenuShow(12,10,pFont,pDevice);
MCMYD3D9->MenuNav();
}
}
return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
void HideModule(HINSTANCE hModule)
{
DWORD dwPEB_LDR_DATA = 0;
_asm
{
pushad;
pushfd;
mov eax, fs:[30h]
mov eax, [eax+0Ch]
mov dwPEB_LDR_DATA, eax
InLoadOrderModuleList:
mov esi, [eax+0Ch]
mov edx, [eax+10h]
LoopInLoadOrderModuleList:
lodsd
mov esi, eax
mov ecx, [eax+18h]
cmp ecx, hModule
jne SkipA
mov ebx, [eax]
mov ecx, [eax+4]
mov [ecx], ebx
mov [ebx+4], ecx
jmp InMemoryOrderModuleList
SkipA:
cmp edx, esi
jne LoopInLoadOrderModuleList
InMemoryOrderModuleList:
mov eax, dwPEB_LDR_DATA
mov esi, [eax+14h]
mov edx, [eax+18h]
LoopInMemoryOrderModuleList:
lodsd
mov esi, eax
mov ecx, [eax+10h]
cmp ecx, hModule
jne SkipB
mov ebx, [eax]
mov ecx, [eax+4]
mov [ecx], ebx
mov [ebx+4], ecx
jmp InInitializationOrderModuleList
SkipB:
cmp edx, esi
jne LoopInMemoryOrderModuleList
InInitializationOrderModuleList:
mov eax, dwPEB_LDR_DATA
mov esi, [eax+1Ch]
mov edx, [eax+20h]
LoopInInitializationOrderModuleList:
lodsd
mov esi, eax
mov ecx, [eax+08h]
cmp ecx, hModule
jne SkipC
mov ebx, [eax]
mov ecx, [eax+4]
mov [ecx], ebx
mov [ebx+4], ecx
jmp Finished
SkipC:
cmp edx, esi
jne LoopInInitializationOrderModuleList
Finished:
popfd;
popad;
}
}
DWORD WINAPI InstallHook(LPVOID)
{
HMODULE D3D9;
do
{
D3D9 = GetModuleHandle(L"d3d9.dll");
}
while(!D3D9);
DWORD dwPresent = GetAddressPtr(17);
DWORD dwReset = GetAddressPtr(16);
pPresent = (oPresent) B8Detours((DWORD)dwPresent,(DWORD)myPresent,SIZEOF_MOVEAX_JMPEAX); //E9Detours1
pReset = (oReset) B8Detours((DWORD)dwReset,(DWORD)myReset,SIZEOF_MOVEAX_JMPEAX);
while(1)
{
DWORD dwDrawIndexedPrimitive = GetAddressPtr(82);
if( memcmp((void*)dwDrawIndexedPrimitive,(void*)"\x8B\xFF",2)==0 )
{
pDrawIndexedPrimitive = (oDrawIndexedPrimitive) B8Detours(dwDrawIndexedPrimitive, (DWORD)myDrawIndexedPrimitive, 12);
}
Sleep(100);
}
return TRUE;
}
BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
HideModule(hDll);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InstallHook, NULL, NULL, NULL);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ProHacks, NULL, NULL, NULL);
}
return TRUE;
}



