Results 1 to 8 of 8
  1. #1
    blackgaming's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    72
    Reputation
    10
    Thanks
    6
    My Mood
    Aggressive

    Soldier Front DFI Undetected Source Code/Base (NOOB PROOF)

    PLEASE GIVE CREDITS IF YOU USE THIS ^_^
    Okay today im gonna release my Source code in public.

    This is my first tutorial ^_^.

    ~Features:

    ~xhair~F1
    ~XQZ WallHack~F2
    ==main.h===
    #include <d3dx9.h>
    #include <vector>
    #include <windows.h>
    #include <stdlib.h>
    #pragma comment (lib, "d3dx9.lib")
    #pragma warning(disable:4102 4005)

    #define Detour_Type_0xE9 1
    #define Detour_Type_0xB8 2
    #define Detour_Type_0x68 3
    #pragma comment(lib,"d3dx9.lib")
    //--------------------------------------------------------------------------------------------------------------------------------- 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; //---------------------------------------------------------------------------------------------------------------------------------


    void *DetourCreate(BYTE *src, const BYTE *dst, const int len)
    {
    BYTE *jmp;
    DWORD dwback;
    DWORD jumpto, newjump;

    VirtualProtect(src,len,PAGE_READWRITE,&dwback);

    if(src[0] == 0xE9)
    {
    jmp = (BYTE*)malloc(10);
    jumpto = (*(DWORD*)(src+1))+((DWORD)src)+5;
    newjump = (jumpto-(DWORD)(jmp+5));
    jmp[0] = 0xE9;
    *(DWORD*)(jmp+1) = newjump;
    jmp += 5;
    jmp[0] = 0xE9;
    *(DWORD*)(jmp+1) = (DWORD)(src-jmp);
    }
    else
    {
    jmp = (BYTE*)malloc(5+len);
    memcpy(jmp,src,len);
    jmp += len;
    jmp[0] = 0xE9;
    *(DWORD*)(jmp+1) = (DWORD)(src+len-jmp)-5;
    }
    src[0] = 0xE9;
    *(DWORD*)(src+1) = (DWORD)(dst - src) - 5;

    for(int i = 5; i < len; i++)
    src[i] = 0x90;
    VirtualProtect(src,len,dwback,&dwback);
    return (jmp-len);
    }
    //================================================== ===========================
    PBYTE ProtectHook( PDWORD* dwVTable, PBYTE dwHook, INT Index )
    {
    DWORD d = 0;
    DWORD ds = 0;
    // VirtualProtect((PVOID*)((*dwVTable) + (Index*4)), 4, PAGE_EXECUTE_READWRITE, &d);
    Sleep(-0);
    PBYTE pOrig = ((PBYTE)(*dwVTable)[Index]);
    (*dwVTable)[Index] = (DWORD)dwHook;
    memcpy(pOrig, dwVTable, ds);
    Sleep(-0);
    // VirtualProtect((PVOID*)((*dwVTable) + (Index*4)), 4, d, &ds);
    Sleep(-0);
    //2X
    //VirtualProtect((void*)(dwVTable), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(pOrig,(void*)(pOrig), 4);
    // VirtualProtect((void*)(dwHook), 4, d, &ds);
    //
    return pOrig;
    }
    //================================================== ==========================
    DWORD CreateDetour(DWORD dwThread,DWORD dwAdress,DWORD dwType,DWORD dwSize)
    {
    DWORD dwDetour,dwProtect,i;
    if (dwAdress&&dwThread&&dwSize>= dwSize)
    {
    dwDetour = (DWORD)VirtualAlloc(0,dwSize+dwSize,0x1000,0x40);
    if (dwDetour&&VirtualProtect((VOID*)dwAdress,dwSize,0 x40,&dwProtect))
    {
    for (i=0;i<dwSize;i++)
    {
    *(BYTE*)(dwDetour+i)=*(BYTE*)(dwAdress+i);
    }
    switch (dwType)
    {
    case Detour_Type_0xE9:
    {
    *(BYTE*)(dwDetour+dwSize+0)=0xE9;
    *(DWORD*)(dwDetour+dwSize+1)=(dwAdress-dwDetour-dwSize);
    *(BYTE*)(dwAdress+0)=0xE9;
    *(DWORD*)(dwAdress+1)=(dwThread-dwAdress-dwSize);
    }
    break;
    case Detour_Type_0xB8:
    {
    *(BYTE*)(dwDetour+dwSize+0+0)=0xB8+(DWORD)0;
    *(DWORD*)(dwDetour+dwSize+1+(DWORD)0)=(dwAdress+dw Size);
    *(WORD*)(dwDetour+dwSize+3+1+(DWORD)1+(DWORD)0)=0x E0FF+(DWORD)0;
    *(BYTE*)(dwAdress+0+(DWORD)0)=0xB8+(DWORD)0;
    *(DWORD*)(dwAdress+1+(DWORD)0+(DWORD)0)=(dwThread) ;
    *(WORD*)(dwAdress+3+1+(DWORD)1+(DWORD)0)=0xE0FF+(D WORD)0;
    }
    break;
    case Detour_Type_0x68:
    {
    *(BYTE*)(dwDetour+dwSize+0)=0x68;
    *(DWORD*)(dwDetour+dwSize+1)=(dwAdress+dwSize);
    *(WORD*)(dwDetour+dwSize+3+1+(DWORD)1)=0xC3;
    *(BYTE*)(dwAdress+0)=0x68;
    *(DWORD*)(dwAdress+(DWORD)1)=(dwThread);
    *(WORD*)(dwAdress+3+1+(DWORD)1)=0xC3;
    }
    break;
    }
    VirtualProtect((VOID*)dwAdress,dwSize,dwProtect,&d wProtect);
    VirtualProtect((VOID*)dwDetour,dwSize+dwSize,0x20, &dwProtect);
    return dwDetour;
    }
    }
    Sleep(-0);
    return (0);
    }
    ==MAIN.CPP==
    // Project : Soldier Front Undetected Hook
    // ================================================== =============
    // Revised : Jomel, Cryophoenix, BlackGaming and ScienceClub20
    // ====================All=of=them=is=me============= =============
    // Date: 5/20/2012
    //================================================== =

    #include "main.h"
    #pragma warning(disable: 4244)
    #define hD3D "d3d9.dll"

    DWORD d3d9= NULL;
    DWORD Base;


    #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)
    #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)
    #define SF ("Release by Jomel for Public")

    #define ES 0
    #define DIP 1
    #define RES 2
    int m_Stride;
    int texnum;

    float ScreenCenterX = 0.0f;
    float ScreenCenterY = 0.0f;

    FONT pFont = NULL;

    bool Color = true;

    int xhair;
    int xqz;

    D3DVIEWPORT9 g_ViewPort;

    PBYTE HookVTableFunction( PDWORD* dwVTable, PBYTE dwHook, INT Index )
    {
    DWORD dwOld = 0;
    VirtualProtect((void*)((*dwVTable) + (Index*4) ), 4, PAGE_EXECUTE_READWRITE, &dwOld);

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

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

    return pOrig;
    }
    //================================================== ================================================== =============================//
    #define HOOK(func,addy) o##func = (t##func)CreateDetour((DWORD)hk##func,(DWORD)addy, Detour_Type_0xB8,7)//Quick Hook using CreateDetour *********
    #define UNHOOK(func,addy) o##func = (t##func)CreateDetour((DWORD)o##func,(DWORD)addy,D etour_Type_0xB8,7)//Quick Unook using CreateDetour *********
    //================================================== ================================================== =============================//

    void GetD3DBase()
    {
    while(!Base){
    Base = (DWORD)GetModuleHandle(d3d9)
    }
    }
    //================================================== ================================================== =============================//
    void IsD3DModuleLoaded()
    {
    while(GetModuleHandle("d3d9.dll") == 0){
    Sleep(100);
    }
    }
    //================================================== ================================================== =============================//
    HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
    {
    while(!npDevice) { npDevice = pDevice; }


    pDevice->GetViewport(&g_ViewPort);
    ScreenCenterX = (float)g_ViewPort.Width / 2;
    ScreenCenterY = (float)g_ViewPort.Height / 2;
    //================================================== =====JAM========================================== ================================================== ===============================//
    if(pFont == NULL) D3DXCreateFont(pDevice, 25, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Tahoma", &pFont);

    //================================================== ================================================== ================================================== ==============================//

    if (xhair1)
    {
    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 (GetAsyncKeyState(VK_F1)&1) //XHair
    { xhair = !xhair; {

    if (GetAsyncKeyState(VK_F2)&1) //XQZ
    { xqz = !xqz; }


    return oEndScene(pDevice);
    }

    HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
    {

    HRESULT hRet = oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    //------------------XQZ-CHAMS---------------------------------------------------

    if(xqz)
    }
    texnum=(NumVertices*100000)+primCount;
    if (m_Stride==40 &&
    (texnum==11800126)||// MULAN Left Boot
    (texnum==12100180)||// MULAN Hands
    (texnum==29900452)||// MULAN Legs
    (texnum==12400126)||// MULAN Right Boot
    (texnum==29500482)||// MULAN Chest
    (texnum==47400728)||// MULAN Head
    (texnum==16000174)||// MULAN Battle Suit Arms
    (texnum==11600128)||// MULAN Battle Suit Boots
    (texnum==39900532)||// MULAN Battle Suit Legs
    (texnum==40200580)||// MULAN Battle Suit Chest
    (texnum==34900580)||// Delta Force Head
    (texnum==36100604)||// Spetsnaz Head
    (texnum==38000658)||// Spetsnaz Legs
    (texnum==18300268)||// Spetsnaz Body
    (texnum==36200604)||// GIGN Head
    (texnum==21200306)||// GIGN Body
    (texnum==35500568)||// GSG9 Head
    (texnum==2200024)||// GSG9 Bangs
    (texnum==8800105)||// GSG9 Feet
    (texnum==36900650)||// GSG9 Legs
    (texnum==19600314)||// GSG9 Body
    (texnum==36700612)||// SAS Head
    (texnum==8500105)||// SAS Feet
    (texnum==37000650)||// SAS Legs
    (texnum==18000274)||// SAS Body
    (texnum==35300556)||// KSF Head
    (texnum==7500121)||// KSF Arms
    (texnum==9200115)||// KSF Feet
    (texnum==12400168)||// KSF Hands
    (texnum==30100522)||// KSF Legs
    (texnum==18700288)||// KSF Body
    (texnum==40900594)||// ARTC Head
    (texnum==11700190)||// ARTC Arms
    (texnum==9100118)||// ARTC Feet
    (texnum==12500170)||// ARTC Hands
    (texnum==37000634)||// ARTC Legs
    (texnum==41700516)||// ARTC Body
    (texnum==19400260)||// ROKMC Body
    (texnum==37900592)||// ROKMC Head
    (texnum==36500642)||// ROKMC Legs
    (texnum==44800776)||// SRG Head
    (texnum==15900200)||// SRG Left Arm
    (texnum==10500168)||// SRG Right Arm
    (texnum==80401016)||// SRG Body
    (texnum==10000121)||// SRG Feet
    (texnum==13200180)||// SRG Hands
    (texnum==33800534)||// SRG Leg
    (texnum==8300137)||// FORCE RECON Arms
    (texnum==7900105)||// FORCE RECON Feet
    (texnum==14200174)||// FORCE RECON Hands
    (texnum==27800462)||// FORCE RECON Legs
    (texnum==26300290)||// FORCE RECON Body
    (texnum==31600556)||// FORCE RECON Head
    (ForceRecon)|| // ForceRecon
    (Mulan)||
    (texnum==16200200)||// MULAN Battle Cap
    (texnum==12000188)||// MULAN Boonie Hat
    (texnum==16700276)||// MULAN Helmet
    (texnum==10800198)||// MULAN Beret
    (texnum==51200728)||// MULAN Gas Mask
    (texnum==79000881)||// MULAN Clan BDU #1
    (texnum==900008)||// MULAN Clan BDU #2
    (texnum==61900800)||// MULAN Bulletproof Vest
    (texnum==10200170)||// MULAN Elbow Protector
    (texnum==12500102)||// MULAN Holster
    (texnum==7400098)||// MULAN Pouch
    (texnum==16700252)||// FORCE RECON Combat Helmet
    (texnum==16800254)||// FORCE RECON Clan T-Shirt 1
    (texnum==8500137)||// FORCE RECON Clan T-Shirt 2
    (texnum==10300170)||// FORCE RECON Red Beret
    (texnum==11900192)||// FORCE RECON Red Bandana
    (texnum==13500176)||// FORCE RECON Boonie Hat
    (texnum==10300170)||// FORCE RECON Beret
    (texnum==16700252)||// FORCE RECON Helmet
    (texnum==14400136)||// FORCE RECON Mid-Class Sunglasses
    (texnum==34100534)||// FORCE RECON Gas Mask
    (texnum==33500548)||// FORCE RECON Gas Mask 2
    (texnum==29800506)||// FORCE RECON Balaclava
    (texnum==86000778)||// FORCE RECON Clan BDU
    (texnum==64800710)||// FORCE RECON Bulletproof Vest
    (texnum==11300189)||// FORCE RECON Advanced Tattoo
    (texnum==14200174)||// FORCE RECON Tactical Gloves
    (texnum==8700090)||// FORCE RECON Holster
    (texnum==8400110)||// FORCE RECON Pouch
    (texnum==7300116)||// FORCE RECON Winter Earflaps
    (texnum==18500208)||// FORCE RECON Trooper Hat
    (texnum==43200354)||// FORCE RECON Night Vision Goggles
    (texnum==29900311)||// FORCE RECON Headset
    (texnum==10000153)||// FORCE RECON Winter Parka Sleeves
    (texnum==26600406)||// FORCE RECON Winter Parka Jacket
    (texnum==20300242)||// FORCE RECON Winter Parka Pockets/Hood
    (texnum==7700129)||// FORCE RECON Combat Liner Sleeves
    (texnum==25200294)||// FORCE RECON Combat Liner Jacket
    (texnum==11900187)||// FORCE RECON Combat Parka Sleeves
    (texnum==44700594)||// FORCE RECON Combat Parka Vest
    (texnum==12800108)||// FORCE RECON Combat Parka Jacket
    (texnum==15500214)||// FORCE RECON Winter Gloves
    (texnum==13200212)||// Delta Force Helmet
    (texnum==13200212)||// Delta Force Helmet 2
    (texnum==34700538)||// Delta Force Gas Mask
    (texnum==35200552)||// Delta Force Gas Mask 2
    (texnum==19500352)||// Delta Force Balaclava
    (texnum==84900778)||// Delta Force Clan BDU
    (texnum==27500442)||// Delta Force Body Armor
    (texnum==42800576)||// Delta Force Body Armor 2
    (texnum==52100658)||// Delta Force Tactical Vest
    (texnum==12200196)||// Spetsnaz Helmet
    (texnum==27100464)||// Spetsnaz Gas Mask
    (texnum==27100484)||// Spetsnaz Gas Mask 2
    (texnum==33600552)||// Spetsnaz Body Armor
    (texnum==44100646)||// Spetsnaz Tactical Vest
    (texnum==44900596)||// Spetsnaz Combat Parka Vest
    (texnum==17800292)||// GIGN Red Bandana
    (texnum==21300290)||// GIGN Helmet
    (texnum==2800036)||// GIGN Helmet Lens
    (texnum==35700558)||// GIGN Gas Mask
    (texnum==22100396)||// GIGN Balaclava
    (texnum==29700492)||// GIGN Body Armor
    (texnum==11200188)||// ROKMC Beret
    (texnum==12000194)||// ROKMC Helmet
    (texnum==29800450)||// ROKMC Gas Mask
    (texnum==31000470)||// ROKMC Gas Mask 2
    (texnum==27100394)||// ROKMC Body Armor
    (texnum==28700374)||// ROKMC X Harness
    (texnum==34700470)||// ROKMC X Harness
    (texnum==5100056)||// ROKMC Pouch
    (texnum==9900163)||// ROKMC Left Arm
    (texnum==18300163)||// ROKMC Right Arm
    (texnum==19000280)||// ROKMC Combat Liner Jacket
    (texnum==37700592)||// GSG9 Skull Mask
    (texnum==16400266)||// GSG9 Red Bandana
    (texnum==16200243)||// GSG9 Helmet
    (texnum==31900466)||// GSG9 Gas Mask
    (texnum==33200492)||// GSG9 Gas Mask 2
    (texnum==19300342)||// GSG9 Balaclava
    (texnum==83600752)||// GSG9 Clan BDU
    (texnum==33400477)||// GSG9 Body Armor
    (texnum==10500163)||// GSG9 Rolled Up Sleeves
    (texnum==38100666)||// GSG9 Tactical Knee Pads
    (texnum==11000100)||// GSG9 Water Canteen
    (texnum==18600210)||// GSG9 Trooper Hat
    (texnum==19000280)||// GSG9 Combat Liner Jacket
    (texnum==8500137)||// SAS Clan T-Shirt 1
    (texnum==16400248)||// SAS Clan T-Shirt 2
    (texnum==9600172)||// SAS Boonie Hat
    (texnum==14200236)||// SAS Helmet
    (texnum==37800552)||// SAS Gas Mask
    (texnum==7000070)||// SAS Water Canteen
    (texnum==28100486)||// SAS Balaclava
    (texnum==62400752)||// SAS Clan BDU
    (texnum==27900456)||// SAS Body Armor
    (texnum==45700654)||// SAS Tactical Vest
    (texnum==39800532)||// SAS Tactical Vest 2
    (texnum==9200100)||// SAS Holster
    (texnum==4800040)||// SAS Magazine Pouch
    (texnum==4000044)||// SAS Pouch
    (texnum==21000280)||// SAS Combat Liner Jacket
    (texnum==15800218)||// SAS Winter Gloves
    (texnum==6500110) ||// KSF Boonie Hat
    (texnum==8500137) ||// KSF Clan T-Shirt 1
    (texnum==16200246) ||// KSF Clan T-Shirt 2
    (texnum==12900208)||// KSF Helmet
    (texnum==29600448)||// KSF Gas Mask
    (texnum==30300460)||// KSF Gas Mask 2
    (texnum==31100398)||// KSF Sunglasses
    (texnum==84700776)||// KSF Clan BDU
    (texnum==600004)||// KSF Clan BDU Logo
    (texnum==36500606)||// KSF Body Armor
    (texnum==63100646)||// KSF Tactical Vest
    (texnum==19800163)||// KSF Rolled Up Sleeves
    (texnum==7000066)||// KSF Holster
    (texnum==20100240)||// KSF Winter Parka Pockets/Hood
    (texnum==20800278)||// KSF Combat Liner Jacket
    (texnum==44500592)||// KSF Combat Parka Vest
    (texnum==10400190)||// SRG Beret
    (texnum==9000146)||// SRG Clan T-Shirt 1
    (texnum==39400640)||// SRG Clan T-Shirt 2
    (texnum==23800294)||// SRG Deer Head
    (texnum==11600180)||// SRG NIJ IIIA Helmet
    (texnum==17100278)||// SRG Red Bandana
    (texnum==14600198)||// SRG Battle Cap
    (texnum==18200266)||// SRG Helmet
    (texnum==19100106)||// SRG Gas Mask
    (texnum==54300350)||// SRG Sunglasses
    (texnum==30800380)||// SRG Mid Class Sunglasses
    (texnum==79300995)||// SRG Clan BDU 1
    (texnum==13300138)||// SRG Clan BDU 2
    (texnum==300001)||// SRG Clan BDU 3
    (texnum==1200012)||// SRG Clan BDU Logo
    (texnum==10900110)||// SRG Bulletproof Vest
    (texnum==6200064)||// SRG Holster
    (texnum==22700250)||// SRG Pouch
    (texnum==56600611)||// SRG Combat Helmet
    (texnum==5800084)||// SRG Winter Earflaps
    (texnum==18700210)||// SRG Trooper Hat
    (texnum==23700288)||// SRG Winter Parka Pockets/Hood
    (texnum==38700602)||// SRG Combat Liner Jacket
    (ForceReconAddons)||
    (MulanAddons)||
    (texnum==34900580)|| // Delta Force Head
    (texnum==36100604)|| // Spetsnaz Head
    (texnum==38000658)|| // Spetsnaz Legs
    (texnum==18300268)|| // Spetsnaz Body
    (texnum==36200604)|| // GIGN Head
    (texnum==21200306)|| // GIGN Body
    (texnum==35500568)|| // GSG9 Head
    (texnum==2200024)|| // GSG9 Bangs
    (texnum==8800105)|| // GSG9 Feet
    (texnum==36900650)|| // GSG9 Legs
    (texnum==19600314)|| // GSG9 Body
    (texnum==36700612)|| // SAS Head
    (texnum==8500105)|| // SAS Feet
    (texnum==37000650)|| // SAS Legs
    (texnum==18000274)|| // SAS Body
    (texnum==35300556)|| // KSF Head
    (texnum==7500121)|| // KSF Arms
    (texnum==9200115)|| // KSF Feet
    (texnum==12400168)|| // KSF Hands
    (texnum==30100522)|| // KSF Legs
    (texnum==18700288)|| // KSF Body
    (texnum==40900594)|| // ARTC Head
    (texnum==11700190)|| // ARTC Arms
    (texnum==9100118)|| // ARTC Feet
    (texnum==12500170)|| // ARTC Hands
    (texnum==37000634)|| // ARTC Legs
    (texnum==41700516)|| // ARTC Body
    (texnum==19400260)|| // ROKMC Body
    (texnum==37900592)|| // ROKMC Head
    (texnum==36500642)|| // ROKMC Legs
    (texnum==44800776)|| // SRG Head
    (texnum==15900200)|| // SRG Left Arm
    (texnum==10500168)|| // SRG Right Arm
    (texnum==80401016)|| // SRG Body
    (texnum==10000121)|| // SRG Feet
    (texnum==13200180)|| // SRG Hands
    (ForceRecon)|| // ForceRecon
    (Mulan)||
    (texnum==33800534) // SRG Leg
    (texnum==47700604))// SRG Combat Parka Vest
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    }
    }
    return hRet;
    }

    #define _CDETOURS_H

    #include <windows.h>

    class cDetours
    {
    public:
    DWORD CreateJMP_EAX( DWORD SrcVA, DWORD DstVA, DWORD Size );
    DWORD CreateJMP_REL( DWORD SrcVA, DWORD DstVA, DWORD Size );
    void * CreateJMP(BYTE *org, CONST BYTE *det, INT len);
    LPVOID CreateJZ(LPVOID lpFuncOrig, LPVOID lpFuncDetour);
    void *memcpy_s( void* pvAddress, const void* D3DPERF_QueryRepeatFrame, size_t stLen );
    private:
    INT GetDetourLenAuto(PBYTE &pbFuncOrig,INT minDetLen);

    };


    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,GetMo duleHandle(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,hW nd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3 dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];

    table[ES] = pVTable[42]; //EndScene address
    table[DIP] = pVTable[82]; //DrawIndexedPrimitive address
    table[RES] = pVTable[16]; //DrawIndexedPrimitive address
    DestroyWindow(hWnd);
    }
    //------------------------------------------------------------------------------------------------------------------------------------
    DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtension Repatching( LPVOID Param )
    {
    while(1) {
    Sleep(100);

    HookVTableFunction((PDWORD*)npDevice, (PBYTE)Base + 1024, 82);
    HookVTableFunction((PDWORD*)npDevice, (PBYTE)Base + 1036, 42);
    }

    return 1;
    }

    bool hooked = false;
    DWORD WINAPI LoopFunction(LPVOID lpParam)
    {
    while(1){
    if( hooked == false) {
    DWORD VTable[3] = {0};

    IsD3DModuleLoaded();
    GetD3DBase();
    DX_Init(VTable);
    HOOK(EndScene,VTable[ES]);

    while(!npDevice) {
    Sleep(50);
    }
    UNHOOK(EndScene, VTable[ES]);

    void* d3DIP = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1024);//0x4FF50A4B[82]
    void* d3ES = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1036);//0x4FF19FEA[42]
    {
    int i;
    for (i = 0 ; i <= 0 ; i++){
    DWORD d,ds;
    VirtualProtect((void*)(d3ES), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(d3ES,(void*)(d3ES), 4);
    VirtualProtect((void*)(d3ES), 4, d, &ds);
    }
    }
    int C;
    for (C = 0 ; C <= 0 ; C++){
    {
    DWORD d,ds;
    VirtualProtect((void*)(d3DIP), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(d3DIP,(void*)(d3DIP), 4);
    VirtualProtect((void*)(d3DIP), 4, d, &ds);
    }
    }
    //------------------//
    CreateDetour((DWORD)hkDrawIndexedPrimitive, (DWORD)d3DIP*C,Detour_Type_0xB8,7);
    CreateDetour((DWORD)hkEndScene, (DWORD)d3ES*C,Detour_Type_0xB8,7);


    *(PDWORD)&oDrawIndexedPrimitive = VTable[DIP];
    *(PDWORD)&oEndScene = VTable[ES];
    //-----------------//
    CreateThread(NULL,0,&VirtualMethodTableRepatchingL oopToCounterExtensionRepatching,NULL,0,NULL); //Create hooking thread
    hooked = true;
    }
    Sleep(10);
    void* d3DIP = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1024);//0x4FF505B0[82]
    void* d3ES = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1036);//0x4FF50260[42]
    {
    DWORD Dark,ds;
    VirtualProtect((void*)(d3ES), 4, PAGE_EXECUTE_READWRITE, &Dark);
    memcpy((void*)d3ES, (const void*)d3ES, 4);
    VirtualProtect((void*)(d3ES), 4, Dark, &ds);
    }
    int i;
    for (i = 0 ; i <= 15 ; i++){
    {
    DWORD d,ds;
    VirtualProtect((void*)(d3DIP), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy((void*)d3DIP, (const void*)d3DIP, 4);
    VirtualProtect((void*)(d3DIP), 4, d, &ds);
    }
    }
    while( 1 )
    {
    Sleep(200);



    int i;
    for (i = 0 ; i <= 15 ; i++){
    if(memcmp((void *)d3DIP, (void *)d3DIP, 82) == 0 ) // Protect Hook Draw Indexed Primitive
    ProtectHook((LPDWORD*)npDevice, (PBYTE)d3DIP, 82);
    }


    for (i = 0 ; i <= 15 ; i++){
    if(memcmp((void *)d3ES, (void *)d3ES, 42) == 0 ) // Protect Hook End Scene
    ProtectHook((LPDWORD*)npDevice, (PBYTE)d3ES, 42);
    }
    }
    Sleep(10);
    }
    return 0;
    }


    BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
    {
    if(dwReason == DLL_PROCESS_ATTACH) {
    Beep(1000,100);
    CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)LoopFu nction,NULL,0,NULL);
    MessageBox(0, SF,"Special Force DFI PH", MB_OK);
    }
    return TRUE;
    }
    Please kindly rename the PrimitiveCount to primCount i am so lazy to rename it..

    Sources & Credits:
    Roverturbo,Azorbix,TopBlast,Hans,Fatboy
    Shadow, Firefox800 ,JoshRose
    Strife, R4z8r, Zoomgod, MSDN, Croner, CyberRazzer, learn_more and
    to all guys here ^_^.

    IF YOUR NAME IS NOT INCLUDED IN THE CREDITS PLEASE PM ^_^
    Last edited by blackgaming; 05-30-2012 at 03:55 AM.

  2. The Following User Says Thank You to blackgaming For This Useful Post:

    teoyzaa (07-15-2012)

  3. #2
    TheMaTriX's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    0
    thx : )
    but please put it between a code tags

  4. #3
    alvin12345's Avatar
    Join Date
    Jun 2012
    Gender
    female
    Posts
    35
    Reputation
    10
    Thanks
    0
    visual c++ or visual 2010 give me link visual 2010
    Last edited by alvin12345; 07-30-2012 at 08:24 AM.

  5. #4
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    My eyes are bleeding!! Use [code ] [/code ] tags for God's Sake.


    CoD Minion from 09/19/2012 to 01/10/2013

  6. #5
    PheonX's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    C|WINDOWS|System32
    Posts
    76
    Reputation
    10
    Thanks
    431
    My Mood
    Dead
    use Code tag man ...
    R.A Memory of Hacking : MPGH.NET

    Like Pheonx Eye's
    Like Pheonx Wing

    Pascal Hacking Coder



  7. #6
    I love myself
    나도 너를 사랑해

    Former Staff
    Premium Member
    Jhem's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Location
    167,646,447
    Posts
    5,150
    Reputation
    1220
    Thanks
    7,394
    My Mood
    Stressed
    And Add A Picture!

  8. #7
    -Dant10's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Wonderland with Amy
    Posts
    40
    Reputation
    10
    Thanks
    2
    My Mood
    Cold
    Quote Originally Posted by Jheamuel123 View Post
    And Add A Picture!
    That He say ^^
    p2s

  9. #8
    ivhan8172's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    in The Matrix!
    Posts
    10
    Reputation
    10
    Thanks
    0
    My Mood
    Cheerful
    how to use this??

Similar Threads

  1. [Help] Hack Source Code (Base)
    By A$IAN in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 15
    Last Post: 03-10-2011, 05:55 PM
  2. Working Base Source Code
    By CrossFireAccountGenerator in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 5
    Last Post: 02-23-2011, 12:51 PM
  3. [Request] Working d3d base (source code)
    By ii LeDgEnz x in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 5
    Last Post: 11-23-2010, 12:46 PM
  4. Sudden Attack NA Base Source Code tut (:
    By AznPwnage in forum Programming Tutorial Requests
    Replies: 0
    Last Post: 07-23-2010, 01:54 PM
  5. hey all you noobs free hack source codes here!!
    By cnttuchme in forum C++/C Programming
    Replies: 6
    Last Post: 10-22-2009, 05:52 PM