/* --------------- jquery animation loading page ---------------------------------- */ .QOverlay { background-color: #000000; /*warna background loading */ z-index: 9999; } .QLoader { background-color:#111; /* warna bar loading */ -moz-box-shadow: 0px 1px 80px #ccc; height: 2px; } .QAmt { color:#ccc; /*warna angka loading*/ font-size:50px; font-weight:bold; line-height:50px; height:50px; width:100px; margin:-60px 0 0 -50px; } -->
skip to main | skip to sidebar

Anonymous Cheater

Anonymous Cheater Freedom For Game Online

  • Home
  • Forum
  • My Website
  • My Shortlink
  • My Facebook
  • My Twitter
  • My TV Online
  • My TV Online1

Senin, 24 Oktober 2011

Simple Base D3D Menu

18.06 Dery sulaiman
Kirimkan Ini lewat Email BlogThis! Bagikan ke X Berbagi ke Facebook

//-----------------------------------------------------------------------------------------------------------------------------------
/****************************************************************
Coded by: JoshRose
edited by: Gaze
Type: Gaze D3D Menu
Credits: JoshRose,Gaze
Status:Undetected
Note:Help Me With My Wallhack's
****************************************************************/
/*******************************************************************************/
#include <windows.h>
#include <wininet.h>
#include <mmsystem.h>
#include <stdio.h>


#include <fstream>
#include <d3d9.h>
#include <d3dx9.h>
#include <time.h>
//#include "Gazehack.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "winmm.lib")
/*******************************************************************************/
#define HOOK(func,addy) o##func = (t##func)DetourB8((DWORD)addy,(DWORD)hk##func,7)
#define UNHOOK(func,addy) o##func = (t##func)DetourB8((DWORD)addy,(DWORD)o##func,7)
/*******************************************************************************/
#define ES  82 //EndScene
#define DIP 42 //DrawIndexedPrimitive
#define RES 16 //Reset
/*******************************************************************************/
#define SMOKE (NumVertices == 192 || primCount == 52 || NumVertices == 256)
/*******************************************************************************/
LPD3DXFONT      g_pFont = NULL;
LPD3DXFONT      g_pFont2 = NULL;
D3DVIEWPORT9    g_ViewPort;
/*******************************************************************************/
LPDIRECT3DTEXTURE9    Megaze, Blooderz, Nightmarez, Avenged, Sevenfold, TujuhX, Bondan, Fadetoblack;
LPDIRECT3DDEVICE9 npDevice;
LPDIRECT3DTEXTURE9 txHeader;
LPD3DXSPRITE bbSprite;
D3DXVECTOR3 pHeader;
/******************************************************************************/
LPTSTR RaffiModule = "PointBlank.i3Exec";
LPTSTR RaffiModule1 = "PBlackout.i3Exec";
/*******************************************************************************/
#pragma warning (disable:4996 4244)
/*******************************************************************************/
bool CekHook=false;
bool Wanjeng = true;
/*******************************************************************************/
int Comander = 0;
int Rezpect = 0;
int Comander1 = 0;
int Rezpect1 = 0;
int tandasilang = 0;
int Tutor = 0;
/*******************************************************************************/
int CenterX = GetSystemMetrics( 0 ) / 2-1;
int CenterY = GetSystemMetrics( 1 ) / 2-1;
/*******************************************************************************/
int wew = 1;
int whack = 0;
int Respawn = 0;
int d3d = 1;
int uyeh = 0;
int Smoking = 0;
int color1 = 0;
int color2 = 0;
int chams = 0;
int Miniindo = 0;
int player = 1;
int defiuss = 0;
int Gosong1 = 0;
int Spass = 0;
int Pistol = 0;
int GravityON = 0;
int asus = 0;
int panthom = 0;
int Graf = 0;
int BurstAWP = 0;
int Weapon = 0;
int Phantom = 0;
int Wireframe = 0;
int crosshair = 0;
int Gaze = 0;
/******************************************************************************/
char *Ctest1[] = { "Gaze" };
char *Ctest2[] = { "Gaze" };
char *Ctest3[] = { "Gaze" };
char *Ctest4[] = { "Gaze" };
/*******************************************************************************/
char *pProcessWindowTitle = "Point Blank";
char *pProcessWindowClass = "I3VIEWER";
/*******************************************************************************/
D3DRECT RectA;
D3DRECT RectB;
D3DVIEWPORT9
Viewport;
/*******************************************************************************/
D3DCOLOR
HairColor = D3DCOLOR_ARGB(150, 20, 255, 20);
/*******************************************************************************/
DWORD dwProcessID;
HANDLE hProcess;
/*******************************************************************************/
/*DWORD adrDefuse, adrDeffuseON, adrInstant, adrInstantON, adrRespawn, adrRespawnON, adrGravityWS, adrGravityON, adrWSON;
DWORD adrJump, adrJumpON, adrJumpOFF, adrGravityOFF, adrWSOFF, adrAmmoPH,adrAmmoOn,adrAmmoOff;
DWORD adrMagnet, adrAmmoGlobal, adrMagnetON, adrMagnetOFF, adrGhost, adrGhostON, adrGhostOFF, adrAmmoCL, adrAmmoUS, adrAmmoIT, adrAmmoTR, adrAmmoINA;
DWORD adrMagnetINA, adrGhostINA, adrRespawnTime, adrNo_Respawn_Map_4vs4, adrInvincibleTime, adrInvincibleTime4v4, adrVote;
DWORD adrAmmoIN;
BYTE WSON[2]        = {0x70, 0x3F};
BYTE WSOFF[2]       = {0x80, 0x3F};
BYTE JumpON[3]      = {0x00,0xCC, 0x3C};
BYTE JumpOFF[3]     = {0x00,0xE0, 0x3F};
BYTE MagnetON[4]    = {0xFF, 0xFF, 0x00, 0x00};
BYTE MagnetOFF[4]   = {0xFF, 0xFF, 0x79, 0x3C};
BYTE GhostON[4]     = {0x6F, 0x12, 0x83, 0x00};
BYTE GhostOFF[4]    = {0x6F, 0x12, 0x83, 0x42};
BYTE DeffuseON[4]   = {0x00, 0x00, 0x00, 0x00};
BYTE RespawnON[4]   = {0x00, 0x00, 0x00, 0x00};
BYTE InstantON[7]   = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
//==================== AMMO Philipina ==================================//
BYTE AmmoONPH[33]= {0xC7, 0x02, 0x3C, 0x00, 0x00, 0x00 ,0x52 ,0xE8 ,0x0D ,0xBB ,0xEB ,0xFF ,0x83 ,0xC4 ,0x0C ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x68 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00};
BYTE AmmoOFFPH[33]= {0x52 ,0xE8 ,0x13 ,0xBB ,0xEB ,0xFF ,0x83 ,0xC4 ,0x0C ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x68 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00 ,0xCC ,0xCC ,0xCC ,0xCC ,0xCC ,0xCC};
//==================== AMMO Indonesia =================================//
BYTE AmmoONIN[33] = {0xC7, 0x02, 0x3C, 0x00, 0x00, 0x00, 0x52, 0xE8, 0x7F, 0x85, 0xEB, 0xFF, 0x83, 0xC4, 0x08, 0x8B, 0x45, 0xFC, 0x8B, 0x4D, 0x08, 0x89, 0x88, 0x68, 0x09, 0x00, 0x00, 0x8B, 0xE5, 0x5D, 0xC2, 0x04, 0x00};
BYTE AmmoOFFIN[33] = {0x52, 0xE8, 0x85, 0x85, 0xEB, 0xFF, 0x83, 0xC4, 0x08, 0x8B, 0x45, 0xFC, 0x8B, 0x4D, 0x08, 0x89, 0x88, 0x64, 0x09, 0x00, 0x00, 0x8B, 0xE5, 0x5D, 0xC2, 0x04, 0x00, 0x55, 0x8B, 0xEC, 0x51, 0x89, 0x4D};
//==================== Ammo Colombia ==================================//
BYTE AmmoONCL[33]= {0xC7, 0x02, 0x3C, 0x00, 0x00, 0x00 ,0x52 ,0xE8 ,0x7D ,0xCB ,0xEB ,0xFF ,0x83 ,0xC4 ,0x0C ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x68 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00};
BYTE AmmoOFFCL[33]= {0x52 ,0xE8 ,0x83 ,0xCB ,0xEB ,0xFF ,0x83 ,0xC4 ,0x0C ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x68 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00 ,0xCC ,0xCC ,0xCC ,0xCC ,0xCC ,0xCC};
//==================== Ammo PBlackout ==================================//
BYTE AmmoONUS[33]= {0xC7, 0x02, 0x3C, 0x00, 0x00, 0x00 ,0x52 ,0xE8 ,0x0F ,0x94 ,0xEB ,0xFF ,0x83 ,0xC4 ,0x08 ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x70 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00};
BYTE AmmoOFFUS[33]= {0x52 ,0xE8 ,0x15 ,0x94 ,0xEB ,0xFF ,0x83 ,0xC4 ,0x08 ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x70 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00 ,0x55 ,0x8B ,0xEC ,0x51 ,0x89 ,0x4D};
//==================== Ammo Italya ==================================//
BYTE AmmoONIT[33]= {0xC7, 0x02, 0x3C, 0x00, 0x00, 0x00 ,0x52 ,0xE8 ,0x7F ,0xA7 ,0xEB ,0xFF ,0x83 ,0xC4 ,0x08 ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x70 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00};
BYTE AmmoOFFIT[33]= {0x52 ,0xE8 ,0x85 ,0xA7 ,0xEB ,0xFF ,0x83 ,0xC4 ,0x08 ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x70 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00 ,0x55 ,0x8B ,0xEC ,0x51 ,0x89 ,0x4D};
//==================== Ammo Turkey ==================================//
BYTE AmmoONTR[33]= {0xC7, 0x02, 0x3C, 0x00, 0x00, 0x00 ,0x52 ,0xE8 ,0xBF ,0x94 ,0xEB ,0xFF ,0x83 ,0xC4 ,0x08 ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x70 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00};
BYTE AmmoOFFTR[33]= {0x52 ,0xE8 ,0xC5 ,0x94 ,0xEB ,0xFF ,0x83 ,0xC4 ,0x08 ,0x8B ,0x45 ,0xFC ,0x8B ,0x4D ,0x08 ,0x89 ,0x88 ,0x70 ,0x09 ,0x00 ,0x00 ,0x8B ,0xE5 ,0x5D ,0xC2 ,0x04 ,0x00 ,0x55 ,0x8B ,0xEC ,0x51 ,0x89 ,0x4D};
/*******************************************************************************/
/*#define getipurl "http://ip.warungcinta.com/ipyasfi.php"// LINK MENGGAMBIL IP ANDA
#define myip "110.137.96.40 " // IP ANDA 110.137.186.98
char output[1];//BANYAK KOMPUTER
/*******************************************************************************/
/*int GetIP(char *url)
{
HINTERNET hInternet;
HINTERNET hFile;
DWORD ReadSize;
BOOL bResult;

hInternet = InternetOpen("Some USER-AGENT",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);

hFile = InternetOpenUrl(hInternet,url,NULL,0,INTERNET_FLAG_RELOAD,0);

ReadSize = 15;
bResult = InternetReadFile(hFile,output,15,&ReadSize);
output[ReadSize] = '\1';// SAMBUANGAN UTK BANYAK KOMPUTER ANDA TADI
InternetCloseHandle(hFile);
InternetCloseHandle(hInternet);
return 0;
}
/*******************************************************************************/
using namespace std;
ofstream infile;
ofstream myfile;
/*******************************************************************************/
#define                 MENUMAXITEMS    100
#define                 MENUFOLDER        1
#define                 ANJING            1
#define                 MENUTEXT        2
#define                 MENUITEM        3
#define                 MENUWEWITEM        10
/*******************************************************************************/   
int                     Mpos=0;              // current highlighted menuitem   
int                     Mmax=0;              // number of menu items
int                        Mxofs =220;      // offset for option text
int                        Mysize=15;  // heigh of a menuline
int                        Mvisible=1;
/*******************************************************************************/
extern int                 Mpos;
extern int                 Mmax;
extern int                Mxofs;
extern int                Mysize;
extern int                Mvisible;
extern char                Mtitle[81];
extern char               *Moptfolder[];
extern char               *Moptonoff[];
/*******************************************************************************/
char                    Mtitle[81]= "Special For Public";
char                   *Moptfolder[] = {"Open", "Close"};
char                   *Moptonoff[]  = {"OFF", "ON"};
/*******************************************************************************/
void                    MenuAddItem(char *txt, char **opt, int *var, int maxvalue, int typ);
void                    MenuShow(int x, int y,    ID3DXFont* g_pFont);
void                    MenuNav(void);
/*******************************************************************************/
#define MCOLOR_CURRENT    D3DCOLOR_ARGB(255, 255, 255, 255)
#define MCOLOR_TEXT        D3DCOLOR_ARGB(255, 255, 255, 255)
#define MCOLOR_ACTIVE    D3DCOLOR_ARGB(255, 000, 255, 000)
#define MENUCOLOR_TITLE    D3DCOLOR_ARGB(255, 255, 000, 000)
#define MCOLOR_FOLDER    D3DCOLOR_ARGB( 250, 25, 220, 251)
#define MCOLOR_INACTIVE    D3DCOLOR_ARGB(255, 173, 173, 173)
/********************************************************************************/
bool Generate = true;
LPDIRECT3DTEXTURE9 White,Red,Green,Blue,Black,Purple,Grey,Yellow,Orange;
#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 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 YELLOW          D3DCOLOR_ARGB(255, 255, 255, 0)
#define TEAL            D3DCOLOR_ARGB(255, 0, 255, 255)
#define PINK            D3DCOLOR_ARGB(255, 255, 240, 0)
#define LIME            D3DCOLOR_ARGB(255, 198, 255, 0)
#define SKYBLUE         D3DCOLOR_ARGB(255, 0, 180, 255)
#define MAROON          D3DCOLOR_ARGB(255, 142, 30, 0)
#define LGRAY           D3DCOLOR_ARGB(255, 174, 174, 174)
#define DGRAY           D3DCOLOR_ARGB(255, 71, 65, 64)
#define BROWN           D3DCOLOR_ARGB(255, 77, 46, 38)
#define SHIT            D3DCOLOR_ARGB(255, 74, 38, 38)
#define Biru            D3DCOLOR_ARGB( 250, 25, 220, 251)
#define Biru            D3DCOLOR_ARGB( 250, 25, 220, 251)
/********************************************************************************/
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;
UINT texnum = 0;
/********************************************************************************/
RECT rect;
RECT rect2;
RECT rect3;
/********************************************************************************/
struct{
int  *var;
int  maxvalue;
int  typ;
char *txt;
char **opt;
}
/********************************************************************************/
MENU[MENUMAXITEMS];
/********************************************************************************/
void MenuAddItem(char *txt, char **opt, int *var, int maxvalue, int typ){
  MENU[Mmax].typ=typ;
  MENU[Mmax].txt=txt;
  MENU[Mmax].opt=opt;
  MENU[Mmax].var=var;
  MENU[Mmax].maxvalue=maxvalue;
  Mmax++;
}
/********************************************************************************/
void MenuShow(int x, int y,    ID3DXFont *pFont){
  int i, val;
  DWORD color;
    SetRect( &rect, x+Mxofs/2, y, x+Mxofs /2 , y );
  if (!Mvisible) return;

  if (Mtitle[0]) {

      pFont->DrawText(NULL,Mtitle,-1,&rect,DT_NOCLIP | DT_TOP, MCOLOR_CURRENT);

      y+=Mysize;
  }

  for (i=0; i<Mmax; i++) {
       val=(MENU[i].var)?(*MENU[i].var):0;
       // determine color
       if (i==Mpos)
           color=GREEN;
       else if (MENU[i].typ==MENUFOLDER)
           color=MCOLOR_FOLDER;
       else if (MENU[i].typ==ANJING)
           color=MCOLOR_INACTIVE;
       else if (MENU[i].typ==MENUTEXT)
           color=MCOLOR_TEXT;
       else
           color=(val)?Biru:RED;
     SetRect( &rect3, x, y, x , y );
     SetRect( &rect2, x+Mxofs, y, x+Mxofs , y );
       pFont->DrawText(NULL,MENU[i].txt,-1,&rect3, DT_NOCLIP,color);
       if (MENU[i].opt) {
           if (MENU[i].typ==MENUTEXT)
                  pFont->DrawText(NULL,(char *)MENU[i].opt,-1,&rect2, DT_NOCLIP | DT_LEFT, color);
           else
               pFont->DrawText(NULL,(char *)MENU[i].opt[val],-1,&rect2, DT_NOCLIP | DT_LEFT, color);
       }
       y+=Mysize;
  }
}
/********************************************************************************/
void MenuNav(void){
/********************************************************************************/
  if (GetAsyncKeyState(VK_INSERT)&1) Mvisible=(!Mvisible);
  if (!Mvisible) return;
/********************************************************************************/
  if (GetAsyncKeyState(VK_UP)&1) {
        do {
            Mpos--;
            if (Mpos<0)  Mpos=Mmax-1;
        } while (MENU[Mpos].typ==MENUTEXT);
/********************************************************************************/
  } else if (GetAsyncKeyState(VK_DOWN)&1) {
        do {
            Mpos++;
            if (Mpos==Mmax) Mpos=0;
        } while (MENU[Mpos].typ==MENUTEXT);
  } else if (MENU[Mpos].var) {
        int dir=0;
/********************************************************************************/
        if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[Mpos].var > 0                      ) dir=-1;
/********************************************************************************/
        if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[Mpos].var < (MENU[Mpos].maxvalue-1)) dir=1;
        if (dir) {
            *MENU[Mpos].var += dir;
            if (MENU[Mpos].typ==MENUFOLDER) Mmax=0;
/********************************************************************************/
        }
        }
        }
/********************************************************************************/
void Anjing()
{
        bool isFindWindow = true;
        HWND hWnd = NULL;
       
        while(isFindWindow)
        {
                if((hWnd = FindWindowA(pProcessWindowClass, pProcessWindowTitle)) != NULL) // jika window ditemukan
                {
                        isFindWindow = false;
                }
                Sleep(500);
        }

        GetWindowThreadProcessId(hWnd, &dwProcessID);
        hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, dwProcessID);
}
/********************************************************************************/
#define PI 3.14159265
ID3DXLine *g_pLine;
/********************************************************************************/
DWORD DetourB8( DWORD  SrcVA, DWORD  DstVA, DWORD  Size )
{


    DWORD DetourVA, dwProtect, i;

#define SIZEOF_MOVEAX_JMPEAX 7

    if ( SrcVA && DstVA && Size >= SIZEOF_MOVEAX_JMPEAX )
    {
        DetourVA = (DWORD) VirtualAlloc(
            NULL, Size + SIZEOF_MOVEAX_JMPEAX,
            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 +
                SIZEOF_MOVEAX_JMPEAX, PAGE_EXECUTE_READ, &dwProtect );

            return DetourVA;
        }
    }
    return (0);
}
/********************************************************************************/
void CopyBuffer(BYTE *Buffer, int Size, DWORD *Address) 
 { 
   DWORD pPrevious = 0; 
   VirtualProtect(Address, Size, PAGE_EXECUTE_READWRITE, &pPrevious); 
   memcpy(Address, Buffer, Size); 
   VirtualProtect(Address, Size, pPrevious, &pPrevious); 
 } 
/********************************************************************************/  
void GazeDetour(DWORD Function, DWORD Hook, int Size) 
 { 
    Hook = Hook - Function - 5; 
    BYTE bHook[4]; 
    memcpy(bHook,(void*)&Hook,4); 
    BYTE Buffer[10]; 
    memset(Buffer,0x90,10); 
    Buffer[0] = 0xE9; 
    Buffer[1] = bHook[0]; 
    Buffer[2] = bHook[1]; 
    Buffer[3] = bHook[2]; 
    Buffer[4] = bHook[3]; 
    CopyBuffer(Buffer, Size, (DWORD*)Function); 
 }
/********************************************************************************/
typedef HRESULT (WINAPI* tEndScene)(LPDIRECT3DDEVICE9 pDevice);
tEndScene oEndScene = NULL;
/********************************************************************************/
typedef HRESULT (WINAPI* tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount);
tDrawIndexedPrimitive oDrawIndexedPrimitive = NULL;
/********************************************************************************/
typedef HRESULT(WINAPI* tReset)(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters);
tReset oReset = NULL;
/********************************************************************************/
void PrintText(char pString[], int x, int y, D3DCOLOR col, ID3DXFont *font)
{
    RECT FontRect = { x, y, x+500, y+30 };
    font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
}
/********************************************************************************/
void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
    D3DRECT rec = { x, y, x + w, y + h };
    pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
/********************************************************************************/
void DrawPoint(int x, int y, int w, int h, DWORD color)
{
//    FillRGB((int)x, (int)y, (int)w, (int)h, color);

}
/********************************************************************************/
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color)
{

    D3DXVECTOR2 Line[128];
    float Step = PI * 2.0 / numSides;
    int Count = 0;
    for (float a=0; a < PI*2.0; a += Step)
    {
        float X1 = radius * cos(a) + X;
        float Y1 = radius * sin(a) + Y;
        float X2 = radius * cos(a+Step) + X;
        float Y2 = radius * sin(a+Step) + Y;
        Line[Count].x = X1;
        Line[Count].y = Y1;
        Line[Count+1].x = X2;
        Line[Count+1].y = Y2;
        Count += 2;
    }
    g_pLine->Begin();
    g_pLine->Draw(Line,Count,Color);
   g_pLine->End();
}
/********************************************************************************/
char Megaze1(void* address, int* val, char bytes)
{
    DWORD Comander, Rezpect;
    VirtualProtect(address, bytes, PAGE_EXECUTE_WRITECOPY, &Comander);
    memcpy(address, val, bytes);
    VirtualProtect(address,bytes,Comander,&Rezpect);
    return(0);
}
/********************************************************************************/
char *optColor1[10]    = {"OFF","Putih","Merah","Hijau","Biru","Hitam","Ungu","Abu","Kuning","Orange"};
char *optColor2[10]    = {"OFF","Putih","Merah","Hijau","Biru","Hitam","Ungu","Abu","Kuning","Orange"};
/********************************************************************************/
void RebuildMenu(void)
{
   
      MenuAddItem("            * Wallhack"     , Moptonoff , &Comander   , 2 , MENUITEM);
      MenuAddItem("            * WH Mini"      , Moptonoff , &Miniindo   , 2 , MENUITEM);
      MenuAddItem("            * Asus WH"      , Moptonoff , &asus       , 2 , MENUITEM);
      MenuAddItem("            * Chams CT"     , optColor1 , &color2     , 10, MENUWEWITEM);
      MenuAddItem("            * Chams Tero"   , optColor2 , &color1     , 10 , MENUWEWITEM);
      MenuAddItem("            * Weapon Chams" , Moptonoff , &Weapon     , 2 , MENUITEM);
      MenuAddItem("            * Wireframe"    , Moptonoff , &Wireframe  , 2 , MENUITEM);
      MenuAddItem("            * Phantom"      , Moptonoff , &Phantom    , 2 , MENUITEM);
      MenuAddItem("            * Crosshair"    , Moptonoff , &crosshair  , 2 , MENUITEM);
      MenuAddItem("            * No Smoke"     , Moptonoff , &Smoking    , 2 , MENUITEM);
      //MenuAddItem("            * Head Charms"  , Moptonoff , &Gaze       , 5 , MENUITEM);
}
/********************************************************************************/
PBYTE HookVTableFunction( PDWORD* dwVTable, PBYTE dwHook, INT Index )
{
    DWORD dwOld = 0;
    VirtualProtect((void*)((*dwVTable) + (Index) ), 0, PAGE_EXECUTE_READWRITE, &dwOld);

    PBYTE pOrig = ((PBYTE)(*dwVTable)[Index]);
    (*dwVTable)[Index] = (DWORD)dwHook;

    VirtualProtect((void*)((*dwVTable) + (Index)), 0, dwOld, &dwOld);

    return pOrig;
}
/********************************************************************************/
HRESULT RaffiTexture(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 DrawString(int x, int y, DWORD color, const char *fmt, ...)
{
    RECT FontPos = { x, y, x + 30, y + 20 };
    char buf[1024] = {'\0'};
    va_list va_alist;

    va_start(va_alist, fmt);
    vsprintf(buf, fmt, va_alist);
    va_end(va_alist);
   
    g_pFont2->DrawText(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
}
/********************************************************************************/
void Jam(int x,int y,D3DCOLOR color)
{
static float TimeElapsed = 0;
static char FinalString[MAX_PATH];
static time_t TimeValue;
static tm* timeinfo;

RECT FontPos = { x, y, x + 200, y + 16 };

time ( &TimeValue );
timeinfo = localtime ( &TimeValue );
sprintf(FinalString, " [ JAM : %d:%d:%d ]",timeinfo->tm_hour - 12,timeinfo->tm_min,timeinfo->tm_sec);
g_pFont->DrawTextA(NULL, FinalString, -1, &FontPos, DT_NOCLIP, color);
}
/********************************************************************************/
void Tanggal(int x,int y,D3DCOLOR color)
{
    static char cdate[20] = "" ;
    struct tm * current_tm;

    RECT FontPos = { x, y, x + 200, y + 16 };

    time_t current_time;
    time (&current_time);
    current_tm = localtime (&current_time);
    sprintf( cdate, " [ TANGGAL : %d-%02d-%d ]",current_tm->tm_mon+1,current_tm->tm_mday,current_tm->tm_year-100+2000);
    g_pFont->DrawTextA(NULL, cdate, -1, &FontPos, DT_NOCLIP, color);
}
/********************************************************************************/
void DrawSprite(LPDIRECT3DDEVICE9 pDevice)
{
    pHeader.x=10.0f; pHeader.y=-1.0f; pHeader.z=0.0f;

    /*if(txHeader == NULL)D3DXCreateTextureFromFileInMemoryEx(pDevice,&_Menu,sizeof(_Menu),280,440,D3DX_DEFAULT,0,D3DFMT_UNKNOWN,D3DPOOL_MANAGED,D3DX_DEFAULT,D3DX_DEFAULT,0,NULL,NULL,&txHeader);
    if(bbSprite == NULL)D3DXCreateSprite(pDevice, &bbSprite);*/

    bbSprite->Begin(D3DXSPRITE_ALPHABLEND);
    bbSprite->Draw(txHeader, 0, 0, &pHeader, 0xFFFFFFFF);
    bbSprite->End();
}
/********************************************************************************/
HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
    myfile << "EndScene is hooked\n";
    while(!npDevice) {
        npDevice = pDevice;
    }
/********************************************************************************/
if (Generate){
RaffiTexture(pDevice, &Blooderz , D3DCOLOR_ARGB(255,255,255,0));
RaffiTexture(pDevice, &TujuhX , D3DCOLOR_ARGB(255,255,192,203));
RaffiTexture(pDevice, &White,  WHITE2);
RaffiTexture(pDevice, &Red,    RED2);
RaffiTexture(pDevice, &Green,  GREEN2);
RaffiTexture(pDevice, &Blue,   BLUE2);
RaffiTexture(pDevice, &Black,  BLACK2);
RaffiTexture(pDevice, &Purple, PURPLE2);
RaffiTexture(pDevice, &Grey,   GREY2);
RaffiTexture(pDevice, &Yellow, YELLOW2);
RaffiTexture(pDevice, &Orange, ORANGE2);
Generate = false;
}
if (crosshair == 1)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec , D3DCLEAR_TARGET,WHITE,0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET,WHITE, 0, 0);
    }
/********************************************************************************/
if(g_pFont == NULL) D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &g_pFont); //Create fonts
if(g_pFont2 == NULL) D3DXCreateFont(pDevice, 16, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &g_pFont2); //Create fonts
if(g_pLine == NULL) D3DXCreateLine(pDevice, &g_pLine);

pDevice->GetViewport(&g_ViewPort);
pDevice->GetViewport(&g_ViewPort);

if(uyeh == 0)
  {
    DrawString(485, 10, 0xFFAAFFCC, "-===--->Gaze<---===-");
    DrawString(60, 280, 0xFF0000FF, "-=||Special For Public ||=-");
    DrawString(60, 295, 0xFFFF00FF, "");
    DrawString(10, 13, RED, "                    .::| Gaze |::.");
    Tanggal(570,55,0xFFFFFF00);
    Jam(580,70,0xFFFF0000);
if (Mmax==0)
    RebuildMenu();
    MenuShow(-20,35,g_pFont);
    MenuNav();
    DrawSprite(pDevice);
}
return oEndScene(pDevice);
}
/********************************************************************************/
HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{

    myfile << "DIP is hooked";                  //Check log
    if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
        Stream_Data->Release();

if(Smoking == 1)
{

        if(SMOKE)
    {
        return D3D_OK;
        }
       
if (asus)
    if (Stride==40) //Asus
         {           
    pDevice->SetRenderState( D3DRS_SRCBLEND, 3 );
    pDevice->SetRenderState( D3DRS_DESTBLEND, 4 );
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
         }
}
if (Weapon == 1)
    {
    if (Stride==32) CekHook=true;
                  
    if (CekHook==true){
        pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        pDevice->SetTexture(0, Purple);
        oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
        pDevice->SetTexture(0, Green);
        pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                   CekHook=false;
                 }
}
if (Phantom == 1)
    {
    if (Stride==52 || Stride==44) CekHook=true;
                  
    if (CekHook==true){
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
                pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCOLOR);
                pDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_INVSRCALPHA);
                pDevice->SetTexture(0, Black);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);                  
                CekHook=false;
                 }
}
if (Wireframe == 1)
    {
    if (Stride==52 || Stride==44) CekHook=true;
                  
    if (CekHook==true){
            pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );
            pDevice->SetTexture(0, Green);
            pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );
            pDevice->SetTexture(0, Black);
            pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );
             }
         else{        
            pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );
            CekHook=false;
                 }
}




    if (Gaze == 1)
    {
    if (Stride==52) CekHook=true;
                  
    if (CekHook==true){
        pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
        pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                   CekHook=false;
                 }
   
     if (Stride==44) {
        pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
        pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                 }   
    }

    if (Miniindo == 1)
    {
     if (Stride == 48 || Stride == 52) {
        pDevice->SetRenderState(D3DRS_ZENABLE, false);
        oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
        pDevice->SetRenderState(D3DRS_ZENABLE, true);
        pDevice->SetRenderState(D3DRS_ZENABLE,false);
                 }   
    }

    if (Comander == 1)
 {
 if (Stride == 52 || Stride == 44) {
 pDevice->SetRenderState(D3DRS_ZENABLE, false);
 oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
 pDevice->SetRenderState(D3DRS_ZENABLE, true);
 pDevice->SetRenderState(D3DRS_ZENABLE,false);
 }
    }
    if(color1)
    {
        if( (Stride == 44) )
        {
                if(color1==1) pDevice->SetTexture(0, White);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==2) pDevice->SetTexture(0, Red);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==3) pDevice->SetTexture(0, Green);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==4) pDevice->SetTexture(0, Blue);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==5) pDevice->SetTexture(0, Black);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==6) pDevice->SetTexture(0, Purple);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==7) pDevice->SetTexture(0, Grey);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==8) pDevice->SetTexture(0, Yellow);   
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color1==9) pDevice->SetTexture(0, Orange);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
        }
    }

    if(color2)
    {
        if( (Stride == 52) )
        {
                if(color2==1) pDevice->SetTexture(0, White);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==2) pDevice->SetTexture(0, Red);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==3) pDevice->SetTexture(0, Green);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==4) pDevice->SetTexture(0, Blue);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==5) pDevice->SetTexture(0, Black);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==6) pDevice->SetTexture(0, Purple);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==7) pDevice->SetTexture(0, Grey);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==8) pDevice->SetTexture(0, Yellow);   
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                if(color2==9) pDevice->SetTexture(0, Orange);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
        }
    }


   


    return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);

}
/********************************************************************************/
HRESULT WINAPI hkReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
{
    myfile << "Reset is hooked\n";
    if( g_pFont )
        g_pFont->OnLostDevice();

    if( g_pLine )
        g_pLine->OnLostDevice();

    HRESULT iReturnValue = oReset(pDevice, pPresentationParameters);

    if(iReturnValue == D3D_OK) {

        if( g_pFont )
            g_pFont->OnResetDevice();

        if( g_pLine )
            g_pLine->OnResetDevice();
    }

    return iReturnValue;
}
/********************************************************************************/
LRESULT CALLBACK MsgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam){return DefWindowProc(hwnd, uMsg, wParam, lParam);}
void DX_Init(DWORD* table)
{
    WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(NULL),NULL,NULL,NULL,NULL,"DX",NULL};
    RegisterClassEx(&wc);
    HWND hWnd = CreateWindow("DX",NULL,WS_OVERLAPPEDWINDOW,100,100,300,300,GetDesktopWindow(),NULL,wc.hInstance,NULL);
    LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory( &d3dpp, sizeof(d3dpp) );
    d3dpp.Windowed = TRUE;
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
    LPDIRECT3DDEVICE9 pd3dDevice;
    pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];

    table[ES]   = pVTable[22+66-6];                    //EndScene address
    table[DIP]  = pVTable[24*2-6];                     //DrawIndexedPrimitive address
    table[RES]  = pVTable[8*3-8];                    //Reset address

    DestroyWindow(hWnd);
}
/********************************************************************************/
DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching( LPVOID  Param )
{
    while(1) {
        Sleep(100);

        HookVTableFunction((PDWORD*)npDevice, (PBYTE)0x4FE787FB,34+48);
        HookVTableFunction((PDWORD*)npDevice, (PBYTE)0x4FE787F6,24+18);

        return (0);

    }

    return 1;
}
/********************************************************************************/
bool hooked = false;
DWORD WINAPI LoopFunction( LPVOID lpParam  )
{

    while(1) {

        if(GetAsyncKeyState(VK_INSERT)&1)
        {   
        uyeh = !uyeh;
        }


        if( hooked == false) {
            DWORD VTable[ES] = {0};

            while(GetModuleHandle("d3d9.dll")==NULL) {
                Sleep(36*66);
            }

            DX_Init(VTable);
            HOOK(EndScene,VTable[ES]);            //Hook EndScene as a device discovery hook

            while(!npDevice) {
                Sleep(30+20); //Sleep until npDevice is not equal to NULL
            }
            UNHOOK(EndScene, VTable[ES]);         //Unhook as soon as we have a valid pointer to pDevice

            GazeDetour(0x4FE787FB,(DWORD)hkDrawIndexedPrimitive,5*2-5);
            GazeDetour(0x4FE787F6,(DWORD)hkEndScene,4*2-3); 
           

            *(PDWORD)&oDrawIndexedPrimitive = VTable[DIP];
            *(PDWORD)&oEndScene = VTable[ES];
            *(PDWORD)&oReset = VTable[RES];

            CreateThread(0, 0, VirtualMethodTableRepatchingLoopToCounterExtensionRepatching, 0, 0, 0);

            hooked = true;

            Sleep(18*4);

        }
    }
    return 0;
}
/********************************************************************************/
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
        if(dwReason == DLL_PROCESS_ATTACH) {
    /*    if(strcmp(myip,output)== 1) {// VALUE 1 DI KIRI ITU BANYAK KOMPUTER HARUS SAMA DENGAN BANYAK KOPUTER DAN OUT PUT DI ATAS
        MessageBox(0, "Succeed","", MB_OK | MB_ICONINFORMATION);
        }
        else {
        MessageBox(0, "Failed","", MB_OK | MB_ICONINFORMATION);
        ExitProcess(0);
        }*/
        MessageBox (0,"Created By Gaze","-==|| Gaze ||==-", MB_OK);
        CreateThread(0, 0, LoopFunction, 0, 0, 0);

        myfile.open("c:\\D3DBangsad.log");
        myfile.clear();
        myfile << "----------Attached----------\n";
        myfile << "Gaze Log D3D bangsad\n";
    }
    else if(dwReason == DLL_PROCESS_DETACH) {
        myfile << "----------Detached----------";
        myfile.close();
    }

    return TRUE;
}
//-------------------------------



Jangan Lupa Di Include SDKnya

Posted in: Base atau Source Code
Posting Lebih Baru Posting Lama Beranda
Twitter Delicious Facebook Digg Stumbleupon Favorites More

Total Tayangan Halaman

Notice

Just Info Animation Loading Page Sedang Masa Perbaikan Jadi Fitur tersebut tidak bisa di akses sementara.

My Profile

Dery Sulaiman

Buat Lencana Anda

Chat Box

Buku Tamu

di like ea

Kalkulator

Categories

  • anti virus (3)
  • ayodance (8)
  • Base atau Source Code (12)
  • Call OF Duty (1)
  • cheat (2)
  • cross fire (1)
  • game offline (2)
  • hacking (12)
  • Idol street (1)
  • Info (1)
  • Jual (1)
  • Lagu (1)
  • Lowongan Staff (1)
  • nightclub city (1)
  • Ninja Saga (35)
  • Notice (1)
  • Point Blank (500)
  • poker (1)
  • seal online (1)
  • software (14)
  • sofware (2)
  • tutor (14)
  • tutorial (2)
  • TV online (1)
  • wild ones (1)

Blog Archive

  • ▼  2011 (311)
    • ►  11/27 - 12/04 (2)
    • ►  11/20 - 11/27 (1)
    • ►  11/13 - 11/20 (6)
    • ►  10/30 - 11/06 (3)
    • ▼  10/23 - 10/30 (9)
      • [Share]Base ammo + Damage SG
      • Source System IP (bagi yg ingin Jual cheat pake IP)
      • [Share] Base WH
      • [Share] Base WH bagi yg blom punya
      • Share Kumpulan Hotkey Untuk Cheat Game Online/Offline
      • [C++] Example for calling Message Box function
      • Base Ammo Global (Silahkan berkereasi Sendiri)
      • Simple Base D3D Menu
      • Base Logger By Me
    • ►  09/25 - 10/02 (1)
    • ►  09/18 - 09/25 (1)
    • ►  08/07 - 08/14 (1)
    • ►  07/10 - 07/17 (4)
    • ►  06/19 - 06/26 (8)
    • ►  06/12 - 06/19 (6)
    • ►  04/10 - 04/17 (8)
    • ►  04/03 - 04/10 (4)
    • ►  03/27 - 04/03 (5)
    • ►  03/20 - 03/27 (7)
    • ►  03/13 - 03/20 (4)
    • ►  03/06 - 03/13 (1)
    • ►  02/27 - 03/06 (12)
    • ►  02/20 - 02/27 (3)
    • ►  02/13 - 02/20 (30)
    • ►  02/06 - 02/13 (33)
    • ►  01/30 - 02/06 (59)
    • ►  01/23 - 01/30 (56)
    • ►  01/16 - 01/23 (21)
    • ►  01/09 - 01/16 (7)
    • ►  01/02 - 01/09 (19)
  • ►  2010 (325)
    • ►  12/26 - 01/02 (38)
    • ►  12/19 - 12/26 (13)
    • ►  12/12 - 12/19 (13)
    • ►  12/05 - 12/12 (19)
    • ►  11/28 - 12/05 (42)
    • ►  11/21 - 11/28 (35)
    • ►  11/14 - 11/21 (38)
    • ►  11/07 - 11/14 (37)
    • ►  10/31 - 11/07 (30)
    • ►  10/24 - 10/31 (36)
    • ►  10/17 - 10/24 (4)
    • ►  10/10 - 10/17 (20)

Saving Mode

Anonymous Cheater Energy Saving Mode menggunakan CSS3 Move your mouse to go back to the page! Gerakkan mouse anda dan silahkan nikmati kembali posting kami!

design by: www.banjarmasin-pb.co.cc - Anonymous Cheater - Copyright © 2011 - 2012

 
Copyright © 2011 Anonymous Cheater | Powered by Blogger
Design by Blogger | Bloggerized by Dery - N3 | The Largest Forum Cheater On Indonesian
Call Of Duty Modern Warfare 3