Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    1

    SoldierFront source code [detected]

    hello guys, im new here im newbie in c++ coding, i have a project in Specialforce (FPS Game)
    i have a source code, im using this in almost 5-6months.. this source is working on DFI PSF Philippines version
    guard by hackshield

    now i have a problem, after hackshield patch, my hack is doesn't work, im always getting detected.. i don't know how to update..
    my friend tell to me , i need to update my DIP function to make undetected..also my detour

    here's my BASE.CPP:

    Code:
    //////////////////////////////////////////////////////////
    /////// Project: ELEKTRO D3D Menu            //////////////
    //////  DFI PSF PUBLIC HACK Project          /////////////
    /////                                       ///////////
    //////////////////////////////////////////////////////
    
    #include <d3d9.h>
    #include <d3dx9.h>
    #include "Fuente.h"
    #include "color.h"
    #include "detour.h"
    #include "Base.h"
    #include "opciones.h"
    #include "Hacks.h"
    #include "d3dmenu.h"
    #include "d3dmenu.h"
    #include "plugin.h"
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "D3DX9.LIB")
    #pragma comment (lib, "detours.lib")
    
    D3D9Menu *pMenu = NULL;
    CD3DFont*  pFont;
    
    bool Color = true;
    bool Create;
    
    int iCenterX;
    int iCenterY;
    
    int SRCBLENDINT=5;
    int DESTBLENDINT=2;
    int Details;
    
    char value1[250];
    char value2[250]; 
    
    //=====================================================================================================================================================================================================================================================================================================================//
    //==================================Defines============================================
    //==================================Defines============================================
    #define ForceRecon (NumVertices == 83 && PrimitiveCount == 137 || NumVertices == 79 && PrimitiveCount == 105 || NumVertices == 142 && PrimitiveCount == 174 || NumVertices == 278 && PrimitiveCount == 462 || NumVertices == 263 && PrimitiveCount == 290 || NumVertices == 316 && PrimitiveCount == 556)
    #define ForceReconAddons (NumVertices == 432 && PrimitiveCount == 354 || NumVertices == 144 && PrimitiveCount == 136 || NumVertices == 299 && PrimitiveCount == 311 || NumVertices == 167 && PrimitiveCount == 252 || NumVertices == 298 && PrimitiveCount == 506 || NumVertices == 168 && PrimitiveCount == 254 || NumVertices == 860 && NumVertices == 778 || NumVertices == 648 && PrimitiveCount == 710 || NumVertices == 113 && PrimitiveCount == 189 || NumVertices == 142 && PrimitiveCount == 172 || NumVertices == 87 && PrimitiveCount == 90 || NumVertices == 79 && PrimitiveCount == 105 || NumVertices == 84 && PrimitiveCount == 110 || NumVertices == 70 && PrimitiveCount == 70 || NumVertices == 860 && PrimitiveCount == 778 || NumVertices == 85 && PrimitiveCount == 137 || NumVertices == 256 && PrimitiveCount == 254 || NumVertices == 170 && PrimitiveCount == 254 ||NumVertices == 335 && PrimitiveCount == 548 || NumVertices == 115 && PrimitiveCount == 168 ||NumVertices == 135 && PrimitiveCount == 176)
    #define Mulan (NumVertices == 118 && PrimitiveCount == 126|| NumVertices == 121 && PrimitiveCount == 180|| NumVertices == 124 && PrimitiveCount == 126|| NumVertices == 295 && PrimitiveCount == 482|| NumVertices == 299 && PrimitiveCount == 452|| NumVertices == 474 && PrimitiveCount == 728)
    #define MulanAddons (NumVertices == 162 && PrimitiveCount == 200|| NumVertices == 120 && PrimitiveCount == 188|| NumVertices == 167 && PrimitiveCount == 276|| NumVertices == 108 && PrimitiveCount == 198|| NumVertices == 512 && PrimitiveCount == 728|| NumVertices == 790 && PrimitiveCount == 881|| NumVertices == 619 && PrimitiveCount == 800||  NumVertices == 399 && PrimitiveCount == 532|| NumVertices == 402 && PrimitiveCount == 580|| NumVertices == 102 && PrimitiveCount == 170|| NumVertices == 125 && PrimitiveCount == 98|| NumVertices == 116 && PrimitiveCount == 128|| NumVertices == 160 && PrimitiveCount == 174 || NumVertices == 283)  
    #define SRG (NumVertices == 159 && PrimitiveCount == 200 || NumVertices == 100 && PrimitiveCount == 121 || NumVertices == 132 && PrimitiveCount == 180 || NumVertices == 338 && PrimitiveCount == 534 || NumVertices == 105 && PrimitiveCount == 168 || NumVertices == 804 && PrimitiveCount == 1016 || NumVertices== 448 && PrimitiveCount == 776 )
    #define SRGAddons (NumVertices == 566 && PrimitiveCount == 611 || NumVertices == 112 && PrimitiveCount == 188 || NumVertices == 116 && PrimitiveCount == 180 || NumVertices == 171 && PrimitiveCount == 278 || NumVertices == 104 && PrimitiveCount == 190 || NumVertices == 146 && PrimitiveCount == 198 || NumVertices == 182 && PrimitiveCount == 266 || NumVertices == 191 && PrimitiveCount == 106 || NumVertices == 311 && PrimitiveCount == 398 || NumVertices == 308 && PrimitiveCount == 380 || NumVertices == 90 && PrimitiveCount == 146 || NumVertices == 394 && PrimitiveCount == 640 || NumVertices == 793 && PrimitiveCount == 995 || NumVertices == 133 && PrimitiveCount == 138 || NumVertices == 132 && PrimitiveCount == 180 || NumVertices == 62 && PrimitiveCount ==64|| NumVertices ==227 && PrimitiveCount ==250 || NumVertices == 336 || NumVertices == 336 || NumVertices == 122 || NumVertices == 173 || NumVertices == 88 || NumVertices == 107 || NumVertices ==  72 || NumVertices == 285 ||NumVertices == 169 || NumVertices == 185 || NumVertices == 287 || NumVertices == 187)
    #define KSF (NumVertices == 75 && PrimitiveCount ==121|| NumVertices == 92 && PrimitiveCount == 115 || NumVertices == 124 && PrimitiveCount ==168|| NumVertices ==301 && PrimitiveCount ==522|| NumVertices ==187 && PrimitiveCount == 288 || NumVertices == 353 && PrimitiveCount == 556)
    #define KSFAddons (NumVertices == 566 && PrimitiveCount== 611|| NumVertices == 112 && PrimitiveCount ==188 || NumVertices == 65 && PrimitiveCount == 110 || NumVertices == 129 && PrimitiveCount == 208 || NumVertices == 303 && PrimitiveCount == 460 || NumVertices == 162 && PrimitiveCount == 246 || NumVertices == 85 && PrimitiveCount == 137 || NumVertices == 847 && PrimitiveCount == 776 || NumVertices == 365 && PrimitiveCount == 606 || NumVertices == 631 && PrimitiveCount == 646 || NumVertices == 183 && PrimitiveCount == 163 || NumVertices == 70 && PrimitiveCount == 66 || NumVertices == 162 && PrimitiveCount == 246 || NumVertices == 303 && PrimitiveCount == 460 || NumVertices == 162 && PrimitiveCount == 246 || NumVertices == 150 && PrimitiveCount == 246)
    #define TheRetard (NumVertices == 117 && PrimitiveCount== 190 || NumVertices == 91 && PrimitiveCount == 118 || NumVertices == 125 && PrimitiveCount == 170 || NumVertices == 370 && PrimitiveCount == 634 || NumVertices == 417 && PrimitiveCount == 516 || NumVertices == 409 && PrimitiveCount == 594)
    #define SAS (NumVertices == 75 && PrimitiveCount == 121 || NumVertices == 85 && PrimitiveCount == 105 || NumVertices == 124 && PrimitiveCount == 168 || NumVertices == 370 && PrimitiveCount == 650 || NumVertices == 180 && PrimitiveCount == 274 || NumVertices == 367 && PrimitiveCount == 612)
    #define SASAddons (NumVertices == 96 && PrimitiveCount == 172 || NumVertices == 142 && PrimitiveCount == 236 || NumVertices == 378 && PrimitiveCount == 552 || NumVertices == 281 && PrimitiveCount == 486 || NumVertices == 164 && PrimitiveCount == 248 || NumVertices== 624 && PrimitiveCount == 752 || NumVertices == 279 && PrimitiveCount == 456 || NumVertices == 457 && PrimitiveCount == 654 || NumVertices == 92 && PrimitiveCount == 100 || NumVertices == 48 && PrimitiveCount == 40 || NumVertices == 40 && PrimitiveCount == 44 || NumVertices == 398 && PrimitiveCount == 532)
    #define ROKMC (NumVertices == 365 && PrimitiveCount == 642 || NumVertices == 194 && PrimitiveCount == 260 || NumVertices== 379 && PrimitiveCount == 592)
    #define ROKMCAddons ( NumVertices == 287 && PrimitiveCount == 374 ||NumVertices == 120 && PrimitiveCount == 194 || NumVertices == 310 && PrimitiveCount == 470 || NumVertices == 271 && PrimitiveCount == 394 || NumVertices == 347 && PrimitiveCount == 470 || NumVertices == 51 && PrimitiveCount == 56)
    #define GSG9 (NumVertices == 88 && PrimitiveCount == 105 || NumVertices == 124 && PrimitiveCount == 168 || NumVertices == 369 && PrimitiveCount == 650 || NumVertices == 196 && PrimitiveCount == 315 || NumVertices == 355 && PrimitiveCount ==568 || NumVertices == 22 && PrimitiveCount == 24 || NumVertices ==196 && PrimitiveCount == 314)
    #define GSG9Addons (NumVertices == 164 && PrimitiveCount == 266 || NumVertices == 162 && PrimitiveCount == 243 || NumVertices == 332 && PrimitiveCount == 492 || NumVertices == 193 && PrimitiveCount == 342 || NumVertices == 836 && PrimitiveCount == 752 || NumVertices == 334 && PrimitiveCount == 477 || NumVertices == 381 && PrimitiveCount == 666 || NumVertices == 110 && PrimitiveCount == 100 || NumVertices == 458 && PrimitiveCount == 676 || NumVertices == 457 && PrimitiveCount == 676)
    #define GIGN (NumVertices == 212 && PrimitiveCount == 306 || NumVertices == 362 && PrimitiveCount == 604)
    #define GIGNAddons (NumVertices == 213 && PrimitiveCount == 290 || NumVertices == 178 && PrimitiveCount == 292 || NumVertices == 357 && PrimitiveCount ==558 || NumVertices == 221 && PrimitiveCount == 396 || NumVertices == 297 && PrimitiveCount== 492 || NumVertices == 458 || NumVertices == 164 || NumVertices == 152 || NumVertices == 392 || NumVertices == 164 )
    #define Delta (NumVertices == 349 && PrimitiveCount == 580)
    #define DeltaAddons (NumVertices == 132 && PrimitiveCount == 212 || NumVertices == 352 && PrimitiveCount == 552 || NumVertices == 195 && PrimitiveCount ==352 || NumVertices == 849 && PrimitiveCount == 778 || NumVertices == 275 && PrimitiveCount == 442 || NumVertices == 428 && PrimitiveCount == 576)
    #define Spetsnaz (NumVertices == 380 && PrimitiveCount == 658 || NumVertices == 183 && PrimitiveCount == 268 || NumVertices ==361 && PrimitiveCount == 604)
    #define SpetsnazAddons (NumVertices == 122 && PrimitiveCount == 196 || NumVertices == 271 && PrimitiveCount ==484 || NumVertices == 336 && PrimitiveCount == 552 || NumVertices == 441 && PrimitiveCount == 646)
    #define Smokes (NumVertices == 271 && PrimitiveCount == 257 || NumVertices == 171 && PrimitiveCount == 143)
    #define Nades (NumVertices == 338 && PrimitiveCount == 339 || NumVertices == 213 && PrimitiveCount == 174)
    #define Flash (NumVertices == 158 && PrimitiveCount == 131)  
    #define BlackDevil (NumVertices == 1091 && PrimitiveCount == 1702 || NumVertices == 1322 && PrimitiveCount == 1674)  
    #define PSU (NumVertices == 87 && PrimitiveCount == 139 || NumVertices == 79 && PrimitiveCount == 105 || NumVertices == 155 && PrimitiveCount == 208 || NumVertices == 126 || NumVertices == 499 || NumVertices == 523 || NumVertices == 555)  
    #define PSUAddons (NumVertices == 176 && PrimitiveCount == 258 || NumVertices == 601 && PrimitiveCount == 723 || NumVertices == 103 && PrimitiveCount == 170 || NumVertices == 193 && PrimitiveCount == 252  ||NumVertices == 261 && PrimitiveCount == 148  ||NumVertices == 505 && PrimitiveCount == 628  ||NumVertices == 108 && PrimitiveCount == 158  ||NumVertices == 108 && PrimitiveCount == 156  ||NumVertices == 177 && PrimitiveCount == 224  ||NumVertices == 84 && PrimitiveCount == 132 || NumVertices == 177 && PrimitiveCount == 224 || NumVertices == 193 && PrimitiveCount == 234 ||NumVertices == 332 && PrimitiveCount == 302 ||NumVertices == 176 && PrimitiveCount == 220 ||NumVertices == 92 && PrimitiveCount == 84 )
    #define DevilWings (NumVertices ==  104 && PrimitiveCount == 155 || NumVertices == 998 && PrimitiveCount == 1116 )   //Devil Wings
    #define AngelWings (NumVertices == 404 && PrimitiveCount == 492)
    #define ZombieGirl (NumVertices == 349 && PrimitiveCount == 436 || NumVertices == 196 && PrimitiveCount == 256 || NumVertices == 70 || NumVertices == 230 || NumVertices == 238 || NumVertices == 713 && PrimitiveCount == 1036 || NumVertices == 930 || NumVertices == 35)
    #define ZombieMale (NumVertices == 299 && PrimitiveCount == 358 || NumVertices == 164 && PrimitiveCount ==214 || NumVertices == 331 || NumVertices == 357 || NumVertices == 201 ||NumVertices == 156 || NumVertices == 76)
    #define Tanker ( NumVertices == 362 && PrimitiveCount == 550 || NumVertices == 276 || NumVertices == 294 || NumVertices == 368 || NumVertices == 444)
    #define Risa (NumVertices == 713 && PrimitiveCount == 962 || /*Head*/NumVertices == 1516 && PrimitiveCount ==2122)// Body& goggle
    #define BackPack (NumVertices == 197 && PrimitiveCount == 262 || NumVertices == 275 && PrimitiveCount == 262 || NumVertices == 6 && PrimitiveCount == 4 )
    #define CombatTowerWall (PrimitiveCount == 118 || PrimitiveCount == 188 )
    #define Guns (NumVertices == 498 && PrimitiveCount == 338  || NumVertices == 1868 && PrimitiveCount == 968 || NumVertices == 407 && PrimitiveCount == 292 || NumVertices == 509 && PrimitiveCount == 385 || NumVertices == 587 && PrimitiveCount == 457 || NumVertices == 812 && PrimitiveCount == 523 || NumVertices == 620 && PrimitiveCount == 416 || NumVertices == 812 && PrimitiveCount == 523 || NumVertices == 664 && PrimitiveCount == 495 || NumVertices == 1122 && PrimitiveCount == 585 || NumVertices == 216 && PrimitiveCount == 84  || NumVertices == 1014 && PrimitiveCount == 754 || NumVertices == 454 && PrimitiveCount == 240 || NumVertices == 459 && PrimitiveCount == 271 || NumVertices == 582 && PrimitiveCount == 345 || NumVertices == 84 && PrimitiveCount == 44 || NumVertices == 650 && PrimitiveCount == 394 || NumVertices == 876 && PrimitiveCount == 515 || NumVertices == 676 && PrimitiveCount == 452 || NumVertices == 719-444477 && PrimitiveCount == 459 || NumVertices == 650 && PrimitiveCount == 394 || NumVertices == 331 && PrimitiveCount == 237 || NumVertices == 526 && PrimitiveCount == 417 || NumVertices == 512 && PrimitiveCount == 302 || NumVertices == 486 && PrimitiveCount == 260 || NumVertices == 287 && PrimitiveCount == 124 || NumVertices == 391 && PrimitiveCount == 233 || NumVertices == 490 && PrimitiveCount == 352 || NumVertices == 798 && PrimitiveCount == 559 || NumVertices == 872 && PrimitiveCount == 500 || NumVertices == 1493 && PrimitiveCount == 1099 || NumVertices == 1497 && PrimitiveCount == 1124 || NumVertices == 1615 && PrimitiveCount == 751 || NumVertices == 1872 && PrimitiveCount == 968 || NumVertices == 2325 && PrimitiveCount == 1431 || NumVertices == 422 && PrimitiveCount == 339 || NumVertices == 23 && PrimitiveCount == 12 || NumVertices == 503 && PrimitiveCount == 349 || NumVertices == 96 && PrimitiveCount == 42 || NumVertices == 498 && PrimitiveCount == 61 || NumVertices == 607 && PrimitiveCount == 349 || NumVertices == 477 && PrimitiveCount == 227 || NumVertices == 405 && PrimitiveCount == 383 || NumVertices ==158 && PrimitiveCount == 79 || NumVertices == 70 && PrimitiveCount == 34 || NumVertices == 462 && PrimitiveCount == 348 || NumVertices ==18 && PrimitiveCount == 8 || NumVertices ==270 && PrimitiveCount == 133 || NumVertices == 806 && PrimitiveCount == 442 || NumVertices ==6 && PrimitiveCount == 2|| NumVertices ==54 && PrimitiveCount == 18 ||  NumVertices ==176 && PrimitiveCount == 66 || NumVertices == 791 && PrimitiveCount == 469 || NumVertices == 1459 && PrimitiveCount == 805 || NumVertices == 719 && PrimitiveCount == 459 ||  NumVertices ==167 && PrimitiveCount == 83 ||  NumVertices ==18 && PrimitiveCount == 8 || NumVertices ==203 && PrimitiveCount == 83 || NumVertices == 663 && PrimitiveCount == 527 || NumVertices == 652 && PrimitiveCount == 444 || NumVertices == 652 && PrimitiveCount == 444 || NumVertices == 963 && PrimitiveCount == 588 || NumVertices == 659 && PrimitiveCount == 444 || NumVertices == 1832 && PrimitiveCount == 865 || NumVertices == 717 && PrimitiveCount == 464 || NumVertices == 617 && PrimitiveCount == 509 || NumVertices == 717 && PrimitiveCount == 422 || NumVertices == 763 && PrimitiveCount == 433 || NumVertices == 537 && PrimitiveCount == 373 || NumVertices == 1152 && PrimitiveCount == 840 || NumVertices == 961 && PrimitiveCount == 588 || NumVertices == 760 && PrimitiveCount == 431 || NumVertices == 2390 && PrimitiveCount == 1276 || NumVertices == 1074 && PrimitiveCount == 724 || NumVertices == 468 && PrimitiveCount == 367 || NumVertices == 188 && PrimitiveCount == 92|| NumVertices == 34 && PrimitiveCount == 12 /*|| NumVertices == 8 && PrimitiveCount == 4  || NumVertices == 791 && PrimitiveCount == 469 || NumVertices == 42 && PrimitiveCount == 10 || NumVertices == 128 && PrimitiveCount == 50  || NumVertices == 168 && PrimitiveCount == 62*/  )
    //===================================================================================================
    //===================================================================================================
    LPDIRECT3DTEXTURE9 Red,Yellow,Blue,Purple,Pink,Orange,Black,White, Gold, SkyBlue, Green, LightBlue;
    
    int texnum;
    int m_Stride;
    int PrimitiveCount;
    int NumVertices;
    
    DWORD BeginJMPBack;
    DWORD MemWrite;
    
    D3DCOLOR colRed = D3DCOLOR_XRGB(255, 0, 0);
    D3DCOLOR colYellow = D3DCOLOR_ARGB (255,255,255,0);
    D3DVIEWPORT9 g_ViewPort;
    float ScreenCenterX = 0.0f;
    float ScreenCenterY = 0.0f;
    
    oEndScene       pEndScene; 
    oReset          pReset;
    oDrawIndexedPrimitive    pDrawIndexedPrimitive;
    
    
    
    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;
    }
    
    
    HRESULT WINAPI myEndScene (PDEVICE pDevice)
    {           
    
    
    /*
    //if (GetAsyncKeyState(VK_NUMPAD1)&1) //Hotkey for Crosshair
    { xhair = !xhair; }
    
    //if (GetAsyncKeyState(VK_NUMPAD2)&1) //Hotkey for Crosshair
    { xhair1 = !xhair1; }
    
    //if (GetAsyncKeyState(VK_NUMPAD3)&1) //Hotkey for Naked 
    { naked = !naked; }
    
    //if (GetAsyncKeyState(VK_NUMPAD4)&1) // Hotkey for chams
    { chams= !chams; }
    
    //if (GetAsyncKeyState(VK_NUMPAD5)&1) // Hotkey for fullbright
    { fullbright= !fullbright; }
    
    
    if (GetAsyncKeyState(VK_NUMPAD6)&1) // Hotkey for Playerwireframe
    { playerwireframe= !playerwireframe; }
    */
    if (GetAsyncKeyState('E')&1) // Hotkey for WireFrame
    { worldwireframe = !worldwireframe; }
    
    
     return pEndScene (pDevice);
    }
    
    //==================================DIP START========================================//
    HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseIndex, 
    UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
    {
            _asm pushad;
    LPDIRECT3DVERTEXBUFFER9 Stream_Data;
    UINT Offset = 0;
    UINT Stride = 0;
    UINT pType  = 0;
    
    if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
    Stream_Data->Release();
    //--------------------Player Wallhack ----------------------------------------------
    
    if (chams==1)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Guns)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0,Yellow);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0,Blue);
    }
    }
    //---------------chams2--------------//
    if (chams == 2)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Guns)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0,Black);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0,Purple);
    }
    }
    //---------------chams3--------------//
    if (chams == 3)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Guns)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0,Gold);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0,SkyBlue);
    }
    }
    //----------------chams4---------------//
    if (chams == 4)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Guns)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0,Green);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0,Pink);
    }
    }
    //--------------------------------------------WireFrame-----------------------
    if(worldwireframe==1) // if wireframe on, render the game in wireframe
         {
             
             if (Stride==40)
             {  
                 pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); //Draw all models with stride 40 in wireframe fill.
             } 
    }
    
    if(!worldwireframe==1)
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID ); 
    }
    
    //-----------------------WireFrame End------------
    
    //----------------------Player Wireframe---------------
    if (playerwireframe==1) // if the player WireFrame is activated
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Guns)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
            {
    DWORD dwZEnable = D3DZB_TRUE;
            pDevice->SetTexture(0, Yellow);// color of back chams
    pDevice->SetRenderState(D3DRS_FOGENABLE, false);
    pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
            pDevice->GetRenderState(D3DRS_ZENABLE, &dwZEnable); 
            pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
            pDevice->SetRenderState(D3DRS_ZENABLE, dwZEnable);
            pDevice->SetTexture(0, Red);} // color of front chams
    }
    else{      
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );
    }
    }
    //----------------Player Wireframe End------------------
    
    //-----------------------------------------FullBright--------------------
    if(fullbright==1)
    {
    if(Stride == 40)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false); //d3d lighting off
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); // use all colors to glow up the lighting ingame
    
    }
    
    }
    
    //--------------------------------FullBright End-------------------
    
    
    //-------------------  Naked  Start------------------------------------------
    
    if(naked==1)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Guns)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    DWORD dwZEnable = D3DZB_TRUE;
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    }
    else{         
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    }
    }
    //-------------------------Other D3dhack------------------------/
    if(clearscope==1)
    {
    if(texnum==40200001 && Stride == 40)
    {
    return D3D_OK;
    }
    }
    //-------------------------------------
    if(nofog==1) // if nofog on
    { // then
    pDevice->SetRenderState(D3DRS_FOGENABLE, false); // Disable the Fog
    } // end of nofog
    //--------------------------------------
    if(whitewalls)
    {
    if(Stride == 40)
    {
    pDevice->SetTexture(0, White);
    }
    }
    //--------------------------------------
    if(xray==1)
    {
    if(Stride == 40) //you can define the stride like this to        
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);   
    }
    }
    //---------------------------------------
    if(asus==1)
    {
    pDevice->SetRenderState( D3DRS_SRCBLEND, 0x5 );
    pDevice->SetRenderState( D3DRS_DESTBLEND, 0x2 );
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    }
    //------------------------------------
    if(fullbright)
    {
    if(Stride == 40)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false);
    }
     
    }
    //-----------------------------------
    if(glasschams)
    {
    if(Stride == 40 && Blue && Yellow)
    {
    pDevice->SetRenderState( D3DRS_SRCBLEND, 0x5 );
    pDevice->SetRenderState( D3DRS_DESTBLEND, 0x2 );
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    } 
    
    }
    //------------------------------------------
    _asm popad;
      return pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    }
    
    //===========================================DIP END======================================//
    //----------------------------------Menu Hack----------------------------------
    // none standard options
    char *Moptfolder[]      =       {"+", "-"};
    char *Moptonoff[]       =       {"OFF", "ON"};
    char *MoptCRSHAR[]  = { ("OOFF"),("Blue"),("Green"),("Red")};
    char *Moptchams[]       = { ("OFF"),("1"),("2"),("3"),("4")};
    char *Ctest[]  = { "11/28/2011" };
    char *Ctest1[] = { "[uN]Team" };
    char *Ctest2[] = { "v4.0[Public]" };
    char *Ctest3[] = { "Jhapoy021" };
    
    /////////////////////////
    // item  states
    int             a[15], b[15], c[15];
    
    void RebuildMenu(void)
    {
      
       pMenu->AddFolder("[Player Hack]", Moptfolder, &playerhack, 2);
       if (playerhack); 
       pMenu->AddItem("Player Chams"                        , Moptchams     , &chams        , 5);
       pMenu->AddItem("Naked Chams"                         , Moptonoff     , &naked        , 2);
       
       pMenu->AddFolder("[Crosshair]"                       , Moptfolder, &crosshair, 2);
       if (crosshair);
       pMenu->AddItem("Basic Xhair"                         , Moptonoff     , &xhair        , 2);
       pMenu->AddItem("Super Xhair"                         , Moptonoff     , &xhair1       , 2);
       pMenu->AddItem("Rainbow Xhair"                       , Moptonoff     , &rainbowxhair , 2);
    
       pMenu->AddFolder("[D3D hacks]"                       , Moptfolder, &d3dhack, 2);
       if (d3dhack);
    
       pMenu->AddItem("Asus Wallhack"                       , Moptonoff     , &asus , 2);
       pMenu->AddItem("White Walls"                         , Moptonoff     , &whitewalls   , 2);
       pMenu->AddItem("X-ray Hack"                          , Moptonoff     , &xray , 2);
       pMenu->AddItem("Clear Scope"                         , Moptonoff     , &clearscope   , 2);
       pMenu->AddItem("No Fog"                                      , Moptonoff     , &nofog        , 2);
       pMenu->AddItem("Full Bright"                         , Moptonoff     , &fullbright   , 2);
       pMenu->AddItem("Glass Chams"                         , Moptonoff     , &glasschams   , 2);
       
       pMenu->AddFolder("[INFO]"                    , Moptfolder, &info, 2);
       pMenu->AddItem("Date:"                         , Ctest , &test       ,1);
       pMenu->AddItem("Group:"              , Ctest1 , &test        ,1);
       pMenu->AddItem("Version:"           , Ctest2 , &test ,1);
       pMenu->AddItem("Coded by:"          , Ctest3 , &test ,1);
       
    }       
    
    typedef HRESULT ( WINAPI* oPresent ) ( LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
    oPresent pPresent;
    
    void RenderMenu(PDEVICE pDev){
    
                    
            
                               D3DCOLOR xcolor;
    
                               switch(a[6]){
            case 0: xcolor = D3DCOLOR_ARGB( 255, 0, 0, 255 );
                break;
            case 1: xcolor = D3DCOLOR_ARGB( 255, 0, 0, 255 );
                break;
            case 2: xcolor = D3DCOLOR_ARGB( 255, 0, 255, 0 );
                break;
            case 3: xcolor = D3DCOLOR_ARGB( 255, 255, 0, 0 );
                break;
                               }
            if( a[6] > 0 ){
    
                int size = 10, strong = 1;
                D3DVIEWPORT9 viewP; 
                pDev->GetViewport( &viewP );
                int iCenterX = (viewP.Width / 2) - 1;
                int iCenterY = (viewP.Height / 2) -1; 
                if( iCenterX < 10 && iCenterY < 10 );
                    }
                    iCenterX = ( GetSystemMetrics( 0 ) / 2 );
                    iCenterY = ( GetSystemMetrics( 1 ) / 2 );
                                    {
               D3DRECT rec2 = {ScreenCenterX-8, ScreenCenterY, ScreenCenterX+8, ScreenCenterY+1};
                       D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-8, ScreenCenterX+1, ScreenCenterY+8};
                pDev->Clear(1, &rec2, D3DCLEAR_TARGET, xcolor, 0,  0);
                pDev->Clear(1, &rec3, D3DCLEAR_TARGET, xcolor, 0,  0);
                            }
    }
    
             
    HRESULT WINAPI myPresent ( LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
    {
            pDevice->GetViewport(&g_ViewPort);
    ScreenCenterX = (float)g_ViewPort.Width / 2;
    ScreenCenterY = (float)g_ViewPort.Height / 2;
    
    if(Color)
    { 
    GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255 , 255 , 0 , 0 ));
    GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255 , 255 , 255 , 0 ));
    GenerateTexture(pDevice, &Blue,D3DCOLOR_ARGB(255,0,0,255));
    GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255 , 102 , 0 , 153 ));
    GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255 , 255 , 20 , 147 ));
    GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255 , 255 , 165 , 0 ));
    GenerateTexture(pDevice, &Black, D3DCOLOR_ARGB (255 , 0 , 0 , 0 ));
    GenerateTexture(pDevice, &White, D3DCOLOR_ARGB (255 , 255 , 255 , 255 ));
    GenerateTexture(pDevice, &LightBlue , D3DCOLOR_ARGB(255,26,140,306));
    GenerateTexture(pDevice, &Gold , D3DCOLOR_ARGB(255,255, 215, 0));
    GenerateTexture(pDevice, &SkyBlue , D3DCOLOR_ARGB(255,0,191,255));
    GenerateTexture(pDevice, &Green , D3DCOLOR_ARGB(255,0,255,0));
    Color=false; 
    }
    
    if(xhair==1)
    {
    D3DRECT rec2 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+8, ScreenCenterY+1};
    D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-8, ScreenCenterX+1, ScreenCenterY+8};
    pDevice->Clear(1, &rec2, D3DCLEAR_TARGET,colRed, 0, 0);
    pDevice->Clear(1, &rec3, D3DCLEAR_TARGET,colRed, 0, 0);
    }
    
    if(xhair1==1)
    {
    D3DRECT rec12 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 8, ScreenCenterY+1};
    D3DRECT rec13 = {ScreenCenterX, ScreenCenterY-8, ScreenCenterX+ 1,ScreenCenterY+8}; 
    pDevice->Clear( 1, &rec12, D3DCLEAR_TARGET,colYellow, 0, 0);
    pDevice->Clear( 1, &rec13, D3DCLEAR_TARGET,colYellow, 0, 0);
    }
    
    if (xhair1==1) 
    { 
        D3DRECT rec1 = {ScreenCenterX-25, ScreenCenterY, ScreenCenterX+ 25, ScreenCenterY+1}; 
        D3DRECT rec2 = {ScreenCenterX, ScreenCenterY-25, ScreenCenterX+ 1,ScreenCenterY+25};   
        pDevice->Clear( 1, &rec1, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 ); 
        pDevice->Clear( 1, &rec2, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 ); 
    //red 
    
         
        D3DRECT rec3 = {ScreenCenterX-15, ScreenCenterY, ScreenCenterX+ 15, ScreenCenterY+1}; 
        D3DRECT rec4 = {ScreenCenterX, ScreenCenterY-15, ScreenCenterX+ 1,ScreenCenterY+15};   
        pDevice->Clear( 1, &rec3, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0,  0 ); 
        pDevice->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0,  0 ); 
    // black 
         
        D3DRECT rec5 = {ScreenCenterX-3, ScreenCenterY, ScreenCenterX+ 3, ScreenCenterY+1}; 
        D3DRECT rec6 = {ScreenCenterX, ScreenCenterY-3, ScreenCenterX+ 1,ScreenCenterY+3};   
        pDevice->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 ); 
        pDevice->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 ); 
    // black 
    } 
    
    if(rainbowxhair)
            {
            
            D3DRECT rec4 = {ScreenCenterX-35, ScreenCenterY, ScreenCenterX+ 35, ScreenCenterY+1};
            D3DRECT rec5 = {ScreenCenterX, ScreenCenterY-35, ScreenCenterX+ 1,ScreenCenterY+35};  
            pDevice->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 );//purple
            pDevice->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 );
    
            D3DRECT rec6 = {ScreenCenterX-30, ScreenCenterY, ScreenCenterX+ 30, ScreenCenterY+1};
            D3DRECT rec7 = {ScreenCenterX, ScreenCenterY-30, ScreenCenterX+ 1,ScreenCenterY+30};  
            pDevice->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 );//blue
            pDevice->Clear( 1, &rec7, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 );
    
            D3DRECT rec8 = {ScreenCenterX-25, ScreenCenterY, ScreenCenterX+ 25, ScreenCenterY+1};
            D3DRECT rec9 = {ScreenCenterX, ScreenCenterY-25, ScreenCenterX+ 1,ScreenCenterY+25};  
            pDevice->Clear( 1, &rec8, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );//cyan
            pDevice->Clear( 1, &rec9, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );
    
            D3DRECT rec10 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+1};
            D3DRECT rec11 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 1,ScreenCenterY+20};  
            pDevice->Clear( 1, &rec10, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );// green
            pDevice->Clear( 1, &rec11, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );
    
            D3DRECT rec12 = {ScreenCenterX-15, ScreenCenterY, ScreenCenterX+ 15, ScreenCenterY+1};
            D3DRECT rec13 = {ScreenCenterX, ScreenCenterY-15, ScreenCenterX+ 1,ScreenCenterY+15};  
            pDevice->Clear( 1, &rec12, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );// yellow
            pDevice->Clear( 1, &rec13, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );
            
            D3DRECT rec14 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 10, ScreenCenterY+1};
            D3DRECT rec15 = {ScreenCenterX, ScreenCenterY-10, ScreenCenterX+ 1,ScreenCenterY+10};  
            pDevice->Clear( 1, &rec14, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );// orange
            pDevice->Clear( 1, &rec15, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );
    
            D3DRECT rec16 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+ 5, ScreenCenterY+1};
            D3DRECT rec17 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+ 1,ScreenCenterY+5};  
            pDevice->Clear( 1, &rec16, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );//red
            pDevice->Clear( 1, &rec17, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );
            }
    
            pFont = new CD3DFont("Tahoma", 8, D3DFONT_BOLD);
            pFont->InitDeviceObjects(pDevice);
            pFont->RestoreDeviceObjects();
    
            if(pMenu == NULL)
            {
                            pMenu = new D3D9Menu("Untagged-Network");
    
                    }else{
                            pMenu->MenuShow(12,10,pFont,pDevice);
                            if(pMenu->Mmax==0) RebuildMenu();
                            pMenu->MenuNav();
    
    
                    
            }
    
            HacksInGame();
            
            delete pFont;
    
            return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    
    
    
    /*int D3D(void)
    {
            HINSTANCE       hD3D;
            DWORD           vTable[105];
            hD3D=0;
            do {
                    hD3D = GetModuleHandle("d3d9.dll");
                    if (!hD3D) Sleep(10);
            } while(!hD3D);
    
            if (D3Ddiscover((void *)&vTable[0],420)==0) return 0;
            {
                    
    
                    pPresent = (oPresent)DetourCreate((DWORD)vTable[17], (DWORD)myPresent,12);
                    //pEndScene                       = (oEndScene)                         DetourFunction((PBYTE)vTable[42]        , (PBYTE)myEndScene     );
                    //pDrawIndexedPrimitive = (oDrawIndexedPrimitive) DetourFunction((PBYTE)vTable[82]  , (PBYTE)myDrawIndexedPrimitive);
    
                            
                    Sleep(100);
            }
    
            return 0;
    }       
    */
    
    void __cdecl SingleStepDetectionEHS ()
    {
        __asm cmp eax,0x10501
        __asm jmp detectiondone1
        __asm cmp esi,0x10705
        __asm jmp detectiondone2
        __asm cmp ecx,0x10703
        __asm jmp detectiondone2
        detectiondone1:
        __asm mov eax,0
        detectiondone2:
        __asm mov esi,0
        detectiondone3:
        __asm mov ecx,0
        __asm jmp dword ptr [BeginJMPBack];
    }
    
    int __stdcall DetouringHackShield ( DWORD Details , DWORD CrcCheck )
    {
        DWORD dwEhSvc = 0;
        do{
                dwEhSvc = (DWORD)GetModuleHandle("EhSvc.dll");
                Sleep(1000);
          }     while(!dwEhSvc);
    
    
                BeginJMPBack, (dwEhSvc+0x71936);
                    DetourCreate((DWORD)(dwEhSvc+0x71691),(DWORD)SingleStepDetectionEHS,5);
    
            __asm
            {
                push eax
                push edx
                mov  eax,CrcCheck
                mov  edx,[eax+0xC]
                mov  Details,edx
                pop  edx
                pop  eax
            }
    
            if ( CrcCheck == 0x12  && Details == 0x0A )
            {
                 MemWrite,((void*)(dwEhSvc+0x09F10),(void*)"\xC2\x04\x00",3);
            }
    
    
            return (1);
    }
    
    
    int Hooking(void)
    {       
            PDWORD VTable;
    
        *(DWORD*)&VTable = *(DWORD*)FindDevice(0x128000);
    
        if(VTable == NULL)
            {
                    //MessageBox(NULL,L"D3DDevice Pointer Not Found!",0,MB_IConstop);
            ExitProcess(0);
            }
    
            DWORD dwDrawIndexedPrimitive = GetAddressPtr(82);
            pPresent = (oPresent)DetourCreate((DWORD)VTable[17], (DWORD)myPresent,12);
            //pReset = (oReset)DetourCreateE9((DWORD)VTable[16], (DWORD)myReset, 12);
            if(memcmp((void*)dwDrawIndexedPrimitive,(void*)"\x8B\xFF",2)==0)
            //pDrawIndexedPrimitive = (oDrawIndexedPrimitive) CreateDetour(dwDrawIndexedPrimitive,(DWORD)myDrawIndexedPrimitive,7);
            pDrawIndexedPrimitive = (oDrawIndexedPrimitive)CreateDetour((DWORD)myDrawIndexedPrimitive,(DWORD)VTable[82],Detour_Type_0xB8,7);
            Sleep(890.90);
    
    //pPresent = (oPresent)CreateDetour((DWORD)myPresent,(DWORD)VTable(17),Detour_Type_0xE9,5);
            return 0;
    }
    DWORD WINAPI InstallHook(LPVOID)
    {       
            PDWORD VTable;
    
        *(DWORD*)&VTable = *(DWORD*)FindDevice(0x128000);
            HMODULE D3D9;
            do
            {
                    D3D9 = GetModuleHandle("d3d9.dll");
                    Sleep(20);
            }
            
            while(!D3D9);
    
            
    
            DWORD dwDrawIndexedPrimitive = GetAddressPtr(82);
            pPresent = (oPresent)DetourCreate((DWORD)VTable[17], (DWORD)myPresent, 12);
            //pReset = (oReset)DetourCreateE9((DWORD)VTable[16], (DWORD)myReset, 12);
    
                    while(8)
            {
                    if(memcmp((void*)dwDrawIndexedPrimitive,(void*)"\x8B\xFF",2)==0)
                    //pDrawIndexedPrimitive = (oDrawIndexedPrimitive) CreateDetour(dwDrawIndexedPrimitive,(DWORD)myDrawIndexedPrimitive, 7);
                    pDrawIndexedPrimitive = (oDrawIndexedPrimitive)CreateDetour((DWORD)myDrawIndexedPrimitive,(DWORD)VTable[82],Detour_Type_0xB8,7);
                    Sleep(890.90);
                    //Sleep(20);
            }
            Sleep(10);
            return TRUE;
    }
    
    BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
    {
        DisableThreadLibraryCalls(hDll);
        if (dwReason == DLL_PROCESS_ATTACH) 
                            HideModule(hDll);
        //CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D, NULL, NULL, NULL);
                            CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)InstallHook,NULL,NULL,NULL);//
        return TRUE;
    }
    anybody help me or teach me how to update my DIP Mid function?
    i try so many method in uc-forum, but still detected..
    to people want to help me but want to private..
    if you have undetected DIP midfunction working on winXP and win7,
    and you want to keep on private... PM me and i'll keep on private too,

    don't worry my hack is my personal use only not for public....
    thanks anyway..
    Last edited by BraveBeast; June 6th, 2012 at 12:56. Reason: Added [code] tags.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •