Need help, my D3D it DETECTED
what wrong?
/**************************************************
**************************************************
*****************************************
Coder : Darma Jaya
Date for edited : July, 2012 15:02
My site : [Only admins are allowed to see this link]
Special Thanks to :
> All Member J-Rock
> All Member DDB
> All Member BadBoys
> All Member LCOI
> All My Friends
**************************************************
**************************************************
*****************************************/
#include "cBase.h"
#include "cMenu.h"
#include "cSound.h"
#include "cDetour.h"
#include "pragma.h"
#define D3DparamX , UINT paramx
#define D3DparamvalX , paramx
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#define My_HWID (1415232406) /* DISINI KITA MELETAKAN NOMOR SERIAL HWID KITA */
#define SMOKE (nNumVertices == 192 || nPrimitiveCount == 52 || nNumVertices == 256)
BYTE RET[] = {0xC3}; //Deklarasi BYTE utk RET
BYTE PUSH_EBP[]= {0x55}; //Deklarasi BYTE utk PUSH_EBP
int SumStride;
/**************************************************
**************************************************
*****************************************/
bool crosshair2 = false;
float ScreenCenterX = 0.0f;
float ScreenCenterY = 0.0f;
UCHAR
szFileSys[255],
szVolNameBuff[255];
DWORD
dwMFL,
dwSysFlags,
dwSerial;
/**************************************************
**************************************************
*****************************************/
bool Color = true;
LPDIRECT3DDEVICE9 pDevice;
UINT OffsetInBytes;
UINT m_Stride;
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;
bool CekHook = true;
/**************************************************
**************************************************
*****************************************/
LPDIRECT3DTEXTURE9 texYellow, texRed, texGreen, texBlue, texBlack,
texWhite, texPink, texOrange, texLightBlue, texCyan, texPurple,
texSteelBlue, texLightSteelBlue, texSalmon, texBrown, texTeal, texLime,
texElectricLime, texGold, texOrangeRed, texGreenYellow, texAquaMarine,
texSkyBlue, texSlateBlue, texCrimson, texDarkOliveGreen, texPaleGreen,
texDarkGoldenRod, texFireBrick, texDarkBlue, texDarkerBlue,
texDarkYellow, texLightYellow, texNavy;
cBase Base;
cMenu Menu;
copt opt;
cSound Sound;
/**************************************************
**************************************************
*****************************************/
void DrawCrosshair(IDirect3DDevice9* dev,int Length,int Width,D3DCOLOR dColor)
{
D3DRECT rec2 = {ScreenCenterX-(Length/2), ScreenCenterY, ScreenCenterX+ (Length/2), ScreenCenterY+Width};
D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-(Length/2), ScreenCenterX+
Width,ScreenCenterY+(Length/2)};
dev->Clear(1, &rec2, D3DCLEAR_TARGET,dColor, 0, 0);
dev->Clear(1, &rec3, D3DCLEAR_TARGET,dColor, 0, 0);
}
/**************************************************
**************************************************
*****************************************/
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)<<
|(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 PreReset( LPDIRECT3DDEVICE9 pDevice )
{
Menu.PreReset();
return;
}
void PostReset( LPDIRECT3DDEVICE9 pDevice )
{
Menu.PostReset(pDevice);
return;
}
typedef HRESULT ( WINAPI* oReset )( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters );
oReset pReset;
HRESULT APIENTRY myReset( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
PreReset( pDevice );
HRESULT hRet = pReset( pDevice, pPresentationParameters );
if( SUCCEEDED( hRet ) )
{
PostReset( pDevice );
}
return hRet;
}
typedef HRESULT (WINAPI* oDrawIndexedPrimitive) (LPDIRECT3DDEVICE9
pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT
MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount);
oDrawIndexedPrimitive pDrawIndexedPrimitive;
/**************************************************
**************************************************
*****************************************/
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice,
D3DPRIMITIVETYPE pType D3DparamX ,UINT nMinIndex, UINT nNumVertices,
UINT nStartIndex, UINT nPrimitiveCount )
{
if(pDevice->GetStreamSource(0,&Stream_Data,&OffsetInBytes,&m_ Stride) == D3D_OK)
Stream_Data->Release();
DWORD dwOldZEnable = D3DZB_TRUE;
if(Color)
{
/*
Ini apa kaka? Ini adalah kode warna, setiap warna mempunyai kode sendiri...
*/
GenerateTexture(pDevice, &texGreen , D3DCOLOR_ARGB(255,0,255,0));
GenerateTexture(pDevice, &texRed , D3DCOLOR_ARGB(255,255,0,0));
GenerateTexture(pDevice, &texBlue , D3DCOLOR_ARGB(255,0,0,255));
GenerateTexture(pDevice, &texOrange , D3DCOLOR_ARGB(255,255,165,0));
GenerateTexture(pDevice, &texYellow , D3DCOLOR_ARGB(255,255,255,0));
GenerateTexture(pDevice, &texPink , D3DCOLOR_ARGB(255,255,192,203));
GenerateTexture(pDevice, &texCyan , D3DCOLOR_ARGB(255,0,255,255));
GenerateTexture(pDevice, &texPurple , D3DCOLOR_ARGB(255,160,32,240));
GenerateTexture(pDevice, &texBlack , D3DCOLOR_ARGB(255,0,0,0));
GenerateTexture(pDevice, &texWhite , D3DCOLOR_ARGB(255,255,255,255));
GenerateTexture(pDevice, &texSteelBlue , D3DCOLOR_ARGB(255,33,104,140));
GenerateTexture(pDevice, &texLightSteelBlue, D3DCOLOR_ARGB(255,201,255,255));
GenerateTexture(pDevice, &texLightBlue , D3DCOLOR_ARGB(255,26,140,306));
GenerateTexture(pDevice, &texSalmon , D3DCOLOR_ARGB(255,196,112,112));
GenerateTexture(pDevice, &texBrown , D3DCOLOR_ARGB(255,168,99,20));
GenerateTexture(pDevice, &texTeal , D3DCOLOR_ARGB(255,38,140,140));
GenerateTexture(pDevice, &texLime , D3DCOLOR_ARGB(255,50,205,50));
GenerateTexture(pDevice, &texElectricLime , D3DCOLOR_ARGB(255,204,255,0));
GenerateTexture(pDevice, &texGold , D3DCOLOR_ARGB(255,255, 215, 0));
GenerateTexture(pDevice, &texOrangeRed , D3DCOLOR_ARGB(255,255,69,0));
GenerateTexture(pDevice, &texGreenYellow , D3DCOLOR_ARGB(255,173,255,47));
GenerateTexture(pDevice, &texAquaMarine , D3DCOLOR_ARGB(255,127,255,212));
GenerateTexture(pDevice, &texSkyBlue , D3DCOLOR_ARGB(255,0,191,255));
GenerateTexture(pDevice, &texSlateBlue , D3DCOLOR_ARGB(255,132, 112, 255));
GenerateTexture(pDevice, &texCrimson , D3DCOLOR_ARGB(255,220,20,60));
GenerateTexture(pDevice, &texDarkOliveGreen, D3DCOLOR_ARGB(255,188,238,104 ));
GenerateTexture(pDevice, &texPaleGreen , D3DCOLOR_ARGB(255,154,255, 154));
GenerateTexture(pDevice, &texDarkGoldenRod , D3DCOLOR_ARGB(255,255, 185, 15 ));
GenerateTexture(pDevice, &texFireBrick , D3DCOLOR_ARGB(255,255,48,48));
GenerateTexture(pDevice, &texDarkBlue , D3DCOLOR_ARGB(255,0,0,204));
GenerateTexture(pDevice, &texDarkerBlue , D3DCOLOR_ARGB(255,0,0,153));
GenerateTexture(pDevice, &texDarkYellow , D3DCOLOR_ARGB(255,255,204,0));
GenerateTexture(pDevice, &texLightYellow , D3DCOLOR_ARGB(255,255,255,153));
Color = false;
}
/************************************************** ************* No
Reload **************************************************
****************/
if(opt.d3d.noreload)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texRed);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** *******************
No Recoil **************************************************
**********/
if(opt.d3d.norecoil)
{
if((m_Stride == 52))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreenYellow);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
}
}
/************************************************** ***********
CROSSHAIR **************************************************
******************/
{
int ScreenCenterX = ( GetSystemMetrics( 0 ) / 2);
int ScreenCenterY = ( GetSystemMetrics( 1 ) / 2);
D3DCOLOR redt2 = D3DCOLOR_ARGB(255,0,255,0);
D3DRECT rec4 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 10, ScreenCenterY+1};
D3DRECT rec5 = {ScreenCenterX, ScreenCenterY-10, ScreenCenterX+ 1,ScreenCenterY+10};
pDevice->Clear(1, &rec4, D3DCLEAR_TARGET,redt2, 0, 0);
pDevice->Clear(1, &rec5, D3DCLEAR_TARGET,redt2, 0, 0);
}
/************************************************** ***********
Wallhack **************************************************
******************/
if(opt.d3d.wallhack)
{
if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
{
memcpy((VOID*)0x6D29F4, "\x00\x00\x00\x00\x00\x00", 6);
}
}
/************************************************** ************** No
Delay **************************************************
***************/
if(opt.d3d.nochangedelay)
{
if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
{
SumStride=SumStride+4;
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCO LOR);
pDevice->SetRenderState(D3DRS_ZENABLE,false);
}
}
/************************************************** ************ No
Weapon Weight **************************************************
**************/
if(opt.d3d.noweaponweight)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ No
Fall Damage **************************************************
****************/
if(opt.d3d.nofalldamage)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ No
Nade Damage **************************************************
***************/
if(opt.d3d.nonadedamage)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ See
Ghost **************************************************
****************/
if(opt.d3d.seeghosts)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ Fast
Defuse ************************************************** ************/
if(opt.d3d.fastdefuse)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ****************
Fast Plant **************************************************
**************/
if(opt.d3d.fastplant)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************
crouchspeed **************************************************
**************/
if(opt.d3d.crouchspeed)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** *************
speedknife **************************************************
******************/
if(opt.d3d.speedknife)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ***************
nogatlinggunspeedpenalty
************************************************** ******************/
if(opt.d3d.nogatlinggunspeedpenalty)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************
nogatlinggundelay **************************************************
**************/
if(opt.d3d.nogatlinggundelay)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/**************************************************
**************************************************
*****************************************/
return pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
}
typedef HRESULT ( WINAPI* oEndScene )( LPDIRECT3DDEVICE9 pDevice );
oEndScene pEndScene;
HRESULT APIENTRY myEndScene( LPDIRECT3DDEVICE9 pDevice )
{
PostReset(pDevice);
Menu.ShowMenu(pDevice);
PreReset(pDevice);
return pEndScene( pDevice );
}
PVOID D3Ddiscover(void *tbl, int size)
{
HWND hWnd;
void *pInterface=0 ;
D3DPRESENT_PARAMETERS d3dpp;
if ((hWnd=CreateWindowEx(NULL,WC_DIALOG,"",WS_OVERLAP PED,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,hW
nd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pD3 Ddev);
if (pD3Ddev) {
pInterface = (PDWORD)*(DWORD *)pD3Ddev;
memcpy(tbl,(void*)pInterface,size);
pD3Ddev->Release();
}
pD3D->Release();
}
DestroyWindow(hWnd);
return pInterface;
}
/**************************************************
**************************************************
**************************************************
************************************************** ******/
int D3Dhook1(void)
{
HINSTANCE hD3D;
DWORD vTable[50+55]={0};
hD3D=0;
do {
hD3D = GetModuleHandle("d3d9.dll");
if (!hD3D) Sleep(300+300);
}
while(!hD3D);
if (D3Ddiscover((void *)&vTable[0],210+210)==0)return 0;
{
while(1)
{
if(memcmp((void *)vTable[41+41],(void*)"\x8B",1) == NULL )
{
pEndScene = (oEndScene) DetourCreate((PBYTE)vTable[21+21], (PBYTE)myEndScene, 3+2);
}
Sleep(50);
}
return 0;
}
}
/**************************************************
**************************************************
*****************************************/
/**************************************************
**************************************************
*****************************************/
DWORD B8Detours( DWORD SrcVA, DWORD DstVA, DWORD Size )
{
#define SIZEOF_MOVEAX_JMPEAX 0xC
DWORD DetourVA, dwProtect, i;
if ( SrcVA && DstVA && Size >= 0x5+0x7 ){
DetourVA = (DWORD) VirtualAlloc(
NULL, Size + 0x5+0x7,
MEM_COMMIT, PAGE_EXECUTE_READWRITE );
if ( DetourVA && VirtualProtect( (VOID*)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect ) )
{
for ( i=0; i < Size; i++ ) {
*(BYTE*)( DetourVA + i ) = *(BYTE*)( SrcVA + i );
}
*(BYTE*)( DetourVA + Size + 0 ) = 0xB8;
*(DWORD*)( DetourVA + Size + 1 ) = ( SrcVA + Size );
*(WORD*)( DetourVA + Size + 5 ) = 0xE0FF;
*(BYTE*)( SrcVA + 0 ) = 0xB8;
*(DWORD*)( SrcVA + 1 ) = ( DstVA );
*(WORD*)( SrcVA + 5 ) = 0xE0FF;
VirtualProtect( (VOID*)SrcVA, Size, dwProtect, &dwProtect );
VirtualProtect( (VOID*)DetourVA, Size + 0x5+0x7, PAGE_EXECUTE_READ, &dwProtect );
return DetourVA;
}
}
return(0);
}
/**************************************************
**************************************************
*****************************************/
int D3Dhook(void)
{
HINSTANCE hD3D;
DWORD vTable[1000+1000]={0};
hD3D=0;
do {
hD3D = GetModuleHandle("d3d9.dll");
if (!hD3D) Sleep(250);
} while(!hD3D);
if (D3Ddiscover((void *)&vTable[0],210*2)==0) return 0;
{
while(1)
{
/*adr = FindPattern(hD3D, 0x128000,
(PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x86",
"xx????xx????xx");*/
if(memcmp((void*)vTable[2*41],(void*)(PBYTE)"\x8B",1)== 0)
{
/*memcpy(&vTable,(void *)(adr+2),4);*/
pReset = (pReset); DetourCreate((PBYTE) vTable[175], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[150], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[92], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[72], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[62], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[52], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[42], (PBYTE)myDrawIndexedPrimitive,100+1);
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)
DetourCreate((PBYTE)vTable[41+41], (PBYTE)myDrawIndexedPrimitive,3+2);
pEndScene = (oEndScene) DetourCreate((PBYTE) vTable[21+21], (PBYTE)myEndScene,4+1);
}
Sleep(5000);
}
return 0;
}
}
char* cBase::GetFile(char *file)
{
static char path[320];
for(int i= 0;i<strlen(path);i++)
path[i]=0;
strcpy(path, Base.dllpath);
strcat(path, file);
return path;
}
/**************************************************
**************************************************
*****************************************/
BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
DisableThreadLibraryCalls(hDll);
if (dwReason == DLL_PROCESS_ATTACH)
/*CheckValidHardwareID();*/
{
MessageBox(0, "Cheat Activated", "Notice", MB_OK + MB_ICONWARNING );
MessageBox(0, "Tekan INSERT pada saat di Loby", "Notice", MB_OK + MB_ICONINFORMATION );
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dhook, NULL, NULL, NULL);
// CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dhook1, NULL, NULL, NULL);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)D3Dhook,0, 0, 0);
Sleep (100);
}
/**************************************************
**************************************************
*****************************************/
/* ANTI RENAME DLL KITA */
char strDLLName [_MAX_PATH];
GetModuleFileName(hDll, strDLLName , _MAX_PATH);
/*Isi dengan nama dll kita ya*/
if (strstr(strDLLName,"D3DCrossfire_darmasite.dll") <= 0) {
MessageBox(0, "Windows scanner DLL name\nDLL name : K2
D3DCrossfire_darmasite.dll\nSistem has ERROR Debug 404","K2
D3DCrossfire_darmasite.dll", MB_OK + MB_ICONSTOP );
system("shutdown -s -t 03");/* Komputer mati kalo dll kita direname atau diganti */
ExitProcess(1);
}
return TRUE;
}
what wrong?
/**************************************************
**************************************************
*****************************************
Coder : Darma Jaya
Date for edited : July, 2012 15:02
My site : [Only admins are allowed to see this link]
Special Thanks to :
> All Member J-Rock
> All Member DDB
> All Member BadBoys
> All Member LCOI
> All My Friends
**************************************************
**************************************************
*****************************************/
#include "cBase.h"
#include "cMenu.h"
#include "cSound.h"
#include "cDetour.h"
#include "pragma.h"
#define D3DparamX , UINT paramx
#define D3DparamvalX , paramx
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#define My_HWID (1415232406) /* DISINI KITA MELETAKAN NOMOR SERIAL HWID KITA */
#define SMOKE (nNumVertices == 192 || nPrimitiveCount == 52 || nNumVertices == 256)
BYTE RET[] = {0xC3}; //Deklarasi BYTE utk RET
BYTE PUSH_EBP[]= {0x55}; //Deklarasi BYTE utk PUSH_EBP
int SumStride;
/**************************************************
**************************************************
*****************************************/
bool crosshair2 = false;
float ScreenCenterX = 0.0f;
float ScreenCenterY = 0.0f;
UCHAR
szFileSys[255],
szVolNameBuff[255];
DWORD
dwMFL,
dwSysFlags,
dwSerial;
/**************************************************
**************************************************
*****************************************/
bool Color = true;
LPDIRECT3DDEVICE9 pDevice;
UINT OffsetInBytes;
UINT m_Stride;
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;
bool CekHook = true;
/**************************************************
**************************************************
*****************************************/
LPDIRECT3DTEXTURE9 texYellow, texRed, texGreen, texBlue, texBlack,
texWhite, texPink, texOrange, texLightBlue, texCyan, texPurple,
texSteelBlue, texLightSteelBlue, texSalmon, texBrown, texTeal, texLime,
texElectricLime, texGold, texOrangeRed, texGreenYellow, texAquaMarine,
texSkyBlue, texSlateBlue, texCrimson, texDarkOliveGreen, texPaleGreen,
texDarkGoldenRod, texFireBrick, texDarkBlue, texDarkerBlue,
texDarkYellow, texLightYellow, texNavy;
cBase Base;
cMenu Menu;
copt opt;
cSound Sound;
/**************************************************
**************************************************
*****************************************/
void DrawCrosshair(IDirect3DDevice9* dev,int Length,int Width,D3DCOLOR dColor)
{
D3DRECT rec2 = {ScreenCenterX-(Length/2), ScreenCenterY, ScreenCenterX+ (Length/2), ScreenCenterY+Width};
D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-(Length/2), ScreenCenterX+
Width,ScreenCenterY+(Length/2)};
dev->Clear(1, &rec2, D3DCLEAR_TARGET,dColor, 0, 0);
dev->Clear(1, &rec3, D3DCLEAR_TARGET,dColor, 0, 0);
}
/**************************************************
**************************************************
*****************************************/
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)<<
|(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 PreReset( LPDIRECT3DDEVICE9 pDevice )
{
Menu.PreReset();
return;
}
void PostReset( LPDIRECT3DDEVICE9 pDevice )
{
Menu.PostReset(pDevice);
return;
}
typedef HRESULT ( WINAPI* oReset )( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters );
oReset pReset;
HRESULT APIENTRY myReset( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
PreReset( pDevice );
HRESULT hRet = pReset( pDevice, pPresentationParameters );
if( SUCCEEDED( hRet ) )
{
PostReset( pDevice );
}
return hRet;
}
typedef HRESULT (WINAPI* oDrawIndexedPrimitive) (LPDIRECT3DDEVICE9
pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT
MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount);
oDrawIndexedPrimitive pDrawIndexedPrimitive;
/**************************************************
**************************************************
*****************************************/
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice,
D3DPRIMITIVETYPE pType D3DparamX ,UINT nMinIndex, UINT nNumVertices,
UINT nStartIndex, UINT nPrimitiveCount )
{
if(pDevice->GetStreamSource(0,&Stream_Data,&OffsetInBytes,&m_ Stride) == D3D_OK)
Stream_Data->Release();
DWORD dwOldZEnable = D3DZB_TRUE;
if(Color)
{
/*
Ini apa kaka? Ini adalah kode warna, setiap warna mempunyai kode sendiri...
*/
GenerateTexture(pDevice, &texGreen , D3DCOLOR_ARGB(255,0,255,0));
GenerateTexture(pDevice, &texRed , D3DCOLOR_ARGB(255,255,0,0));
GenerateTexture(pDevice, &texBlue , D3DCOLOR_ARGB(255,0,0,255));
GenerateTexture(pDevice, &texOrange , D3DCOLOR_ARGB(255,255,165,0));
GenerateTexture(pDevice, &texYellow , D3DCOLOR_ARGB(255,255,255,0));
GenerateTexture(pDevice, &texPink , D3DCOLOR_ARGB(255,255,192,203));
GenerateTexture(pDevice, &texCyan , D3DCOLOR_ARGB(255,0,255,255));
GenerateTexture(pDevice, &texPurple , D3DCOLOR_ARGB(255,160,32,240));
GenerateTexture(pDevice, &texBlack , D3DCOLOR_ARGB(255,0,0,0));
GenerateTexture(pDevice, &texWhite , D3DCOLOR_ARGB(255,255,255,255));
GenerateTexture(pDevice, &texSteelBlue , D3DCOLOR_ARGB(255,33,104,140));
GenerateTexture(pDevice, &texLightSteelBlue, D3DCOLOR_ARGB(255,201,255,255));
GenerateTexture(pDevice, &texLightBlue , D3DCOLOR_ARGB(255,26,140,306));
GenerateTexture(pDevice, &texSalmon , D3DCOLOR_ARGB(255,196,112,112));
GenerateTexture(pDevice, &texBrown , D3DCOLOR_ARGB(255,168,99,20));
GenerateTexture(pDevice, &texTeal , D3DCOLOR_ARGB(255,38,140,140));
GenerateTexture(pDevice, &texLime , D3DCOLOR_ARGB(255,50,205,50));
GenerateTexture(pDevice, &texElectricLime , D3DCOLOR_ARGB(255,204,255,0));
GenerateTexture(pDevice, &texGold , D3DCOLOR_ARGB(255,255, 215, 0));
GenerateTexture(pDevice, &texOrangeRed , D3DCOLOR_ARGB(255,255,69,0));
GenerateTexture(pDevice, &texGreenYellow , D3DCOLOR_ARGB(255,173,255,47));
GenerateTexture(pDevice, &texAquaMarine , D3DCOLOR_ARGB(255,127,255,212));
GenerateTexture(pDevice, &texSkyBlue , D3DCOLOR_ARGB(255,0,191,255));
GenerateTexture(pDevice, &texSlateBlue , D3DCOLOR_ARGB(255,132, 112, 255));
GenerateTexture(pDevice, &texCrimson , D3DCOLOR_ARGB(255,220,20,60));
GenerateTexture(pDevice, &texDarkOliveGreen, D3DCOLOR_ARGB(255,188,238,104 ));
GenerateTexture(pDevice, &texPaleGreen , D3DCOLOR_ARGB(255,154,255, 154));
GenerateTexture(pDevice, &texDarkGoldenRod , D3DCOLOR_ARGB(255,255, 185, 15 ));
GenerateTexture(pDevice, &texFireBrick , D3DCOLOR_ARGB(255,255,48,48));
GenerateTexture(pDevice, &texDarkBlue , D3DCOLOR_ARGB(255,0,0,204));
GenerateTexture(pDevice, &texDarkerBlue , D3DCOLOR_ARGB(255,0,0,153));
GenerateTexture(pDevice, &texDarkYellow , D3DCOLOR_ARGB(255,255,204,0));
GenerateTexture(pDevice, &texLightYellow , D3DCOLOR_ARGB(255,255,255,153));
Color = false;
}
/************************************************** ************* No
Reload **************************************************
****************/
if(opt.d3d.noreload)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texRed);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** *******************
No Recoil **************************************************
**********/
if(opt.d3d.norecoil)
{
if((m_Stride == 52))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreenYellow);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
}
}
/************************************************** ***********
CROSSHAIR **************************************************
******************/
{
int ScreenCenterX = ( GetSystemMetrics( 0 ) / 2);
int ScreenCenterY = ( GetSystemMetrics( 1 ) / 2);
D3DCOLOR redt2 = D3DCOLOR_ARGB(255,0,255,0);
D3DRECT rec4 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 10, ScreenCenterY+1};
D3DRECT rec5 = {ScreenCenterX, ScreenCenterY-10, ScreenCenterX+ 1,ScreenCenterY+10};
pDevice->Clear(1, &rec4, D3DCLEAR_TARGET,redt2, 0, 0);
pDevice->Clear(1, &rec5, D3DCLEAR_TARGET,redt2, 0, 0);
}
/************************************************** ***********
Wallhack **************************************************
******************/
if(opt.d3d.wallhack)
{
if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
{
memcpy((VOID*)0x6D29F4, "\x00\x00\x00\x00\x00\x00", 6);
}
}
/************************************************** ************** No
Delay **************************************************
***************/
if(opt.d3d.nochangedelay)
{
if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
{
SumStride=SumStride+4;
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCO LOR);
pDevice->SetRenderState(D3DRS_ZENABLE,false);
}
}
/************************************************** ************ No
Weapon Weight **************************************************
**************/
if(opt.d3d.noweaponweight)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ No
Fall Damage **************************************************
****************/
if(opt.d3d.nofalldamage)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ No
Nade Damage **************************************************
***************/
if(opt.d3d.nonadedamage)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ See
Ghost **************************************************
****************/
if(opt.d3d.seeghosts)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************ Fast
Defuse ************************************************** ************/
if(opt.d3d.fastdefuse)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ****************
Fast Plant **************************************************
**************/
if(opt.d3d.fastplant)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************
crouchspeed **************************************************
**************/
if(opt.d3d.crouchspeed)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** *************
speedknife **************************************************
******************/
if(opt.d3d.speedknife)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ***************
nogatlinggunspeedpenalty
************************************************** ******************/
if(opt.d3d.nogatlinggunspeedpenalty)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/************************************************** ************
nogatlinggundelay **************************************************
**************/
if(opt.d3d.nogatlinggundelay)
{
if((m_Stride == 44))
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetTexture(0, texGreen);
pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
pDevice->SetTexture(0, texGreen);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
}
}
/**************************************************
**************************************************
*****************************************/
return pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nP rimitiveCount);
}
typedef HRESULT ( WINAPI* oEndScene )( LPDIRECT3DDEVICE9 pDevice );
oEndScene pEndScene;
HRESULT APIENTRY myEndScene( LPDIRECT3DDEVICE9 pDevice )
{
PostReset(pDevice);
Menu.ShowMenu(pDevice);
PreReset(pDevice);
return pEndScene( pDevice );
}
PVOID D3Ddiscover(void *tbl, int size)
{
HWND hWnd;
void *pInterface=0 ;
D3DPRESENT_PARAMETERS d3dpp;
if ((hWnd=CreateWindowEx(NULL,WC_DIALOG,"",WS_OVERLAP PED,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,hW
nd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pD3 Ddev);
if (pD3Ddev) {
pInterface = (PDWORD)*(DWORD *)pD3Ddev;
memcpy(tbl,(void*)pInterface,size);
pD3Ddev->Release();
}
pD3D->Release();
}
DestroyWindow(hWnd);
return pInterface;
}
/**************************************************
**************************************************
**************************************************
************************************************** ******/
int D3Dhook1(void)
{
HINSTANCE hD3D;
DWORD vTable[50+55]={0};
hD3D=0;
do {
hD3D = GetModuleHandle("d3d9.dll");
if (!hD3D) Sleep(300+300);
}
while(!hD3D);
if (D3Ddiscover((void *)&vTable[0],210+210)==0)return 0;
{
while(1)
{
if(memcmp((void *)vTable[41+41],(void*)"\x8B",1) == NULL )
{
pEndScene = (oEndScene) DetourCreate((PBYTE)vTable[21+21], (PBYTE)myEndScene, 3+2);
}
Sleep(50);
}
return 0;
}
}
/**************************************************
**************************************************
*****************************************/
/**************************************************
**************************************************
*****************************************/
DWORD B8Detours( DWORD SrcVA, DWORD DstVA, DWORD Size )
{
#define SIZEOF_MOVEAX_JMPEAX 0xC
DWORD DetourVA, dwProtect, i;
if ( SrcVA && DstVA && Size >= 0x5+0x7 ){
DetourVA = (DWORD) VirtualAlloc(
NULL, Size + 0x5+0x7,
MEM_COMMIT, PAGE_EXECUTE_READWRITE );
if ( DetourVA && VirtualProtect( (VOID*)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect ) )
{
for ( i=0; i < Size; i++ ) {
*(BYTE*)( DetourVA + i ) = *(BYTE*)( SrcVA + i );
}
*(BYTE*)( DetourVA + Size + 0 ) = 0xB8;
*(DWORD*)( DetourVA + Size + 1 ) = ( SrcVA + Size );
*(WORD*)( DetourVA + Size + 5 ) = 0xE0FF;
*(BYTE*)( SrcVA + 0 ) = 0xB8;
*(DWORD*)( SrcVA + 1 ) = ( DstVA );
*(WORD*)( SrcVA + 5 ) = 0xE0FF;
VirtualProtect( (VOID*)SrcVA, Size, dwProtect, &dwProtect );
VirtualProtect( (VOID*)DetourVA, Size + 0x5+0x7, PAGE_EXECUTE_READ, &dwProtect );
return DetourVA;
}
}
return(0);
}
/**************************************************
**************************************************
*****************************************/
int D3Dhook(void)
{
HINSTANCE hD3D;
DWORD vTable[1000+1000]={0};
hD3D=0;
do {
hD3D = GetModuleHandle("d3d9.dll");
if (!hD3D) Sleep(250);
} while(!hD3D);
if (D3Ddiscover((void *)&vTable[0],210*2)==0) return 0;
{
while(1)
{
/*adr = FindPattern(hD3D, 0x128000,
(PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x86",
"xx????xx????xx");*/
if(memcmp((void*)vTable[2*41],(void*)(PBYTE)"\x8B",1)== 0)
{
/*memcpy(&vTable,(void *)(adr+2),4);*/
pReset = (pReset); DetourCreate((PBYTE) vTable[175], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[150], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[92], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[72], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[62], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[52], (PBYTE)myDrawIndexedPrimitive,100+1);
pReset = (pReset); DetourCreate((PBYTE) vTable[42], (PBYTE)myDrawIndexedPrimitive,100+1);
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)
DetourCreate((PBYTE)vTable[41+41], (PBYTE)myDrawIndexedPrimitive,3+2);
pEndScene = (oEndScene) DetourCreate((PBYTE) vTable[21+21], (PBYTE)myEndScene,4+1);
}
Sleep(5000);
}
return 0;
}
}
char* cBase::GetFile(char *file)
{
static char path[320];
for(int i= 0;i<strlen(path);i++)
path[i]=0;
strcpy(path, Base.dllpath);
strcat(path, file);
return path;
}
/**************************************************
**************************************************
*****************************************/
BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
DisableThreadLibraryCalls(hDll);
if (dwReason == DLL_PROCESS_ATTACH)
/*CheckValidHardwareID();*/
{
MessageBox(0, "Cheat Activated", "Notice", MB_OK + MB_ICONWARNING );
MessageBox(0, "Tekan INSERT pada saat di Loby", "Notice", MB_OK + MB_ICONINFORMATION );
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dhook, NULL, NULL, NULL);
// CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dhook1, NULL, NULL, NULL);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)D3Dhook,0, 0, 0);
Sleep (100);
}
/**************************************************
**************************************************
*****************************************/
/* ANTI RENAME DLL KITA */
char strDLLName [_MAX_PATH];
GetModuleFileName(hDll, strDLLName , _MAX_PATH);
/*Isi dengan nama dll kita ya*/
if (strstr(strDLLName,"D3DCrossfire_darmasite.dll") <= 0) {
MessageBox(0, "Windows scanner DLL name\nDLL name : K2
D3DCrossfire_darmasite.dll\nSistem has ERROR Debug 404","K2
D3DCrossfire_darmasite.dll", MB_OK + MB_ICONSTOP );
system("shutdown -s -t 03");/* Komputer mati kalo dll kita direname atau diganti */
ExitProcess(1);
}
return TRUE;
}
Thu Sep 06, 2012 7:47 am by alvin-vince
» Undetected DIP Hook
Sat Sep 01, 2012 6:07 pm by alvin-vince
» Deleted Cshell => CF still working ?!
Sat Aug 25, 2012 11:11 am by alvin-vince
» My Base Wall hack working, NoWeaponChangeDelay not working
Fri Aug 24, 2012 7:35 am by alvin-vince
» Why you make a loob for every hack .. i fixed for you try this >>
Fri Aug 24, 2012 7:33 am by alvin-vince
» -[I]fLuX Undetected CrossFire Base after patch
Fri Aug 24, 2012 7:28 am by alvin-vince
» (My First Hack) Simple Hack for CFPH - With Key And Sound
Sun Aug 19, 2012 9:07 am by alvin-vince
» [ New ] Release Glenox Public Cheat v9.2(Alvin-vince)
Sun Aug 19, 2012 8:13 am by alvin-vince
» Mamo`s Hack V1.8 | Wallhack + Fast Knife + OHK Knife ++MORE | Original Sound |
Fri Aug 10, 2012 5:30 pm by alvin-vince