1. Pinoy Hideout is the Ultimate Pinoy Chat, Mobile and PC Community
    We have been leading the scene for over 7 years and currently offer:
    • latest and updated game cheats and softwares
    • internet tricks for your android phone, mobile network, and computer
    • a staff team who helps protect its members from malware while enforcing a great community

    • You must register an account before you can post, download files, and see any advanced features or content.

Dismiss Notice
Announcement!
Gusto mo bang makakuha ng VIP subcription ng libre? CLICK HERE<

Source Undetected Wallhack Source Code

Discussion in 'Specialforce Source Code & Tutorials' started by trismund, Jan 21, 2019.

  1. trismund

    trismund King in the East Staff Member Administrator ROS VIP

    Reputations:
    1,310
    Joined:
    Oct 28, 2012
    Posts:
    2,622
    Likes Received:
    600
    Trophy Points:
    30
    Location:
    Locating...

    DIP Midfunc hook currently undetected

    Code:
    //==============================================================================
    // CMain.cpp
    //==============================================================================
    #include "CTools.h"
    #pragma comment(lib, "d3dx9.lib")
    #pragma comment(lib, "d3d9.lib")
    //==============================================================================
    BOOL DrawIndexedPrimitive_Check = FALSE;
    DWORD DrawIndexedPrimitive_Hook, DrawIndexedPrimitive_Jump;
    BOOL DrawIndexedPrimitive_CheckPtr = FALSE;
    HRESULT (WINAPI* DrawIndexedPrimitive_Pointer)(LPDIRECT3DDEVICE9,D3DPRIMITIVETYPE,INT,UINT,UINT,UINT,UINT);
    //==============================================================================
    VOID WINAPI DrawIndexedPrimitive_Main(LPDIRECT3DDEVICE9 pDevice,D3DPRIMITIVETYPE Type,INT BaseVertexIndex,UINT MinIndex,UINT NumVertices,UINT StartIndex,UINT primCount)
    {
        LPDIRECT3DVERTEXBUFFER9 Stream;
        UINT Stride;
        UINT Offset;
        if ( pDevice->GetStreamSource(0,&Stream,&Offset,&Stride) == D3D_OK )
        {
            Stream->Release();
        }
            DrawIndexedPrimitive_CheckPtr = TRUE;
     
        if(Stride == 64 || Stride == 32)
        {
            pDevice->SetRenderState(D3DRS_ZENABLE,FALSE);
            pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);DrawIndexedPrimitive_Pointer(pDevice,Type,BaseVertexIndex,MinIndex,NumVertices,StartIndex,primCount);
            pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
        }
        
            DrawIndexedPrimitive_CheckPtr = FALSE;
    }
    //==============================================================================
    
        if (Tools.CheckWindowsVersion(6, 1, VER_NT_WORKSTATION) || Tools.CheckWindowsVersion(6, 0, VER_NT_WORKSTATION))
        {
            __asm
            {
                MOV EDI, DWORD PTR SS : [EBP + 0x8] // --- Vista and 7
                XOR EBX, EBX
                CMP EDI, EBX
                PUSHFD
                PUSHAD
                JMP PHOFORUM
            }
        }
    
        if (Tools.CheckWindowsVersion(5, 1, VER_NT_WORKSTATION) || Tools.CheckWindowsVersion(5, 2, VER_NT_WORKSTATION))
        {
            __asm
            {
                PUSH EBX // --- XP
                PUSH ESI
                MOV ESI, dword ptr ss : [ebp + 8]
                PUSHFD
                PUSHAD
                JMP PHOFORUM
            }
        }
    
        if (Tools.CheckWindowsVersion(6, 3, VER_NT_WORKSTATION))
    
        {
            __asm
            {
                MOV EDI, DWORD PTR SS : [EBP + 0x8] // --- Windows 8 / 8.1
                TEST EDI, EDI
                PUSHFD
                PUSHAD
                JMP PHOFORUM
            }
        }
    
        if (Tools.CheckWindowsVersion(6, 2, VER_NT_WORKSTATION))
        {
            __asm
            {
                MOV ESI, DWORD PTR SS : [EBP + 0x8] // --- Windows 10
                TEST ESI, ESI
                PUSHFD
                PUSHAD
                JMP PHOFORUM
            }
        }
    
    
        __asm
        {
            PHOFORUM:
            MOV EDX,[DrawIndexedPrimitive_CheckPtr]
            CMP EDX,0x0
            JG Jump
            PUSH [EBP+0x20]
            PUSH [EBP+0x1C]
            PUSH [EBP+0x18]
            PUSH [EBP+0x14]
            PUSH [EBP+0x10]
            PUSH [EBP+0xC]
            PUSH [EBP+0x8]
            CALL [DrawIndexedPrimitive_Main]
            Jump:
            POPAD
            POPFD
            CMP EDI,EBX
            JMP [DrawIndexedPrimitive_Jump]
        }
      
    }
    
    //==============================================================================
    VOID WINAPI DXHack()
    {
        PDWORD dwD3DVTable;
        do
        {
            *(DWORD*)&dwD3DVTable = *(DWORD*)Tools.D3D9VTable();
        }
        while ( !dwD3DVTable );
    
    
        if (Tools.CheckWindowsVersion(6, 3, VER_NT_WORKSTATION))
        {
        DrawIndexedPrimitive_Hook = (dwD3DVTable[82] + 0x2D);// ---Windows 8
        DrawIndexedPrimitive_Jump = (DrawIndexedPrimitive_Hook + 0x5);
        *(PDWORD)(&DrawIndexedPrimitive_Pointer) = (DWORD)dwD3DVTable[82];
        Tools.DetourCreate((BYTE*)DrawIndexedPrimitive_Hook, (BYTE*)DrawIndexedPrimitive_Call, 5);
        }
        else if (Tools.CheckWindowsVersion(6, 1, VER_NT_WORKSTATION) || Tools.CheckWindowsVersion(6, 0, VER_NT_WORKSTATION))
        {
        DrawIndexedPrimitive_Hook = (dwD3DVTable[82] + 0x2D);// ---Windows 7
        DrawIndexedPrimitive_Jump = (DrawIndexedPrimitive_Hook + 0x7);
        *(PDWORD)(&DrawIndexedPrimitive_Pointer) = (DWORD)dwD3DVTable[82];
        Tools.DetourCreate((BYTE*)DrawIndexedPrimitive_Hook, (BYTE*)DrawIndexedPrimitive_Call, 5);
        }
        else if (Tools.CheckWindowsVersion(5, 1, VER_NT_WORKSTATION) || Tools.CheckWindowsVersion(5, 2, VER_NT_WORKSTATION))
        {
        DrawIndexedPrimitive_Hook = (dwD3DVTable[82] + 0x1D);// ---Windows XP
        DrawIndexedPrimitive_Jump = (DrawIndexedPrimitive_Hook + 0x5);
        *(PDWORD)(&DrawIndexedPrimitive_Pointer) = (DWORD)dwD3DVTable[82];
        Tools.DetourCreate((BYTE*)DrawIndexedPrimitive_Hook, (BYTE*)DrawIndexedPrimitive_Call, 5);
        }
        else if (Tools.CheckWindowsVersion(6, 2, VER_NT_WORKSTATION))
        {
        //DrawIndexedPrimitive_Hook = (dwD3DVTable[82] + 0x30); // ---Windows 10 old version
        DrawIndexedPrimitive_Hook = (dwD3DVTable[82] + 0x2D);// ---Windows 10 old
        DrawIndexedPrimitive_Jump = (DrawIndexedPrimitive_Hook + 0x5);
        *(PDWORD)(&DrawIndexedPrimitive_Pointer) = (DWORD)dwD3DVTable[82];
        Tools.DetourCreate((BYTE*)DrawIndexedPrimitive_Hook, (BYTE*)DrawIndexedPrimitive_Call, 5);
        }
    
        else
        {
               ExitProcess(0);
        }
      
    }
    //==============================================================================
    BOOL WINAPI DllMain(HMODULE hModule,DWORD dwReason,LPVOID lpReserved)
    {
        UNREFERENCED_PARAMETER(lpReserved);
        if ( dwReason == DLL_PROCESS_ATTACH )
        {
            CreateThread(0,0,(LPTHREAD_START_ROUTINE)DXHack,0,0,0);
        }
            return ( TRUE );
    }
    //==============================================================================
    
    Code:
    //==============================================================================
    // CTools.cpp
    //==============================================================================
     
    #include "CTools.h"
     
    CTools Tools;
     
    //==============================================================================
     
    DWORD CTools::D3D9VTable()
    {
        DWORD dwObjBase = (DWORD)LoadLibraryA("D3D9.DLL");
        while ( dwObjBase++ < dwObjBase + 0x127850 )
        {
            if ( (*(WORD*)(dwObjBase + 0x00)) == 0x06C7 && (*(WORD*)(dwObjBase + 0x06)) == 0x8689 && (*(WORD*)(dwObjBase + 0x0C)) == 0x8689 )
            {
                dwObjBase += 2;
                break;
            }
        }
        return ( dwObjBase );
    }
     
    //==============================================================================
     
    BOOL CTools::CheckWindowsVersion(DWORD dwMajorVersion,DWORD dwMinorVersion,DWORD dwProductType)
    {
        OSVERSIONINFOEX VersionInfo;
        ZeroMemory(&VersionInfo,sizeof(OSVERSIONINFOEX));
        VersionInfo.dwOSVersionInfoSize = sizeof(VersionInfo);
        GetVersionEx((OSVERSIONINFO*)&VersionInfo);
        if ( VersionInfo.dwMajorVersion    == dwMajorVersion )
        {
            if ( VersionInfo.dwMinorVersion == dwMinorVersion )
            {
                if ( VersionInfo.wProductType == dwProductType )
                {
                    return ( TRUE );
                }
            }
        }
        return ( FALSE );
    }
     
    //==============================================================================
     
    void *CTools::DetourCreate(BYTE *src, const BYTE *dst, const int len)
    {
        BYTE *jmp = (BYTE*)malloc(len+5);
        DWORD dwBack;
     
        VirtualProtect(src, len, PAGE_EXECUTE_READWRITE, &dwBack);
        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=0x90;
        VirtualProtect(src, len, dwBack, &dwBack);
        return (jmp-len);
    }
     
    //==============================================================================
    


    Code:
    //==============================================================================
    // CTools.h
    //==============================================================================
     
    #include <windows.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    //#include "DXSDK\d3dx9.h"
     
    //==============================================================================
     
    class CTools
    {
        public:
        D3DVIEWPORT9  pViewport;
        DWORD    D3D9VTable();
        BOOL    CheckWindowsVersion(DWORD dwMajorVersion,DWORD dwMinorVersion,DWORD dwProductType);
        void    *DetourCreate( BYTE *src, const BYTE *dst, const int len );
        HRESULT GenerateTexture( IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32 );
    };
    extern CTools Tools;
     
    //==============================================================================
    
     
    Last edited: Jan 27, 2019
    andoks, Lilguinto1ne and cjmgalola like this.
  2. Baser amer

    Baser amer Newbie

    Reputations:
    0
    Joined:
    Aug 22, 2018
    Posts:
    12
    Likes Received:
    3
    Trophy Points:
    2

    Paano gagawin dito sir?
     
  3. Zyrxxxx

    Zyrxxxx Leecher

    Reputations:
    0
    Joined:
    Jan 14, 2019
    Posts:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Marikina City

    Hmm, wala ako idea sa kung ano gagawin dito., but still waiting for update sa next pub hack.
     
  4. Baser amer

    Baser amer Newbie

    Reputations:
    0
    Joined:
    Aug 22, 2018
    Posts:
    12
    Likes Received:
    3
    Trophy Points:
    2

    Paano po paganahin?
     
  5. Vergil

    Vergil Alpha & Omega Staff Member Moderator SF2 VIP SF1 VIP

    Reputations:
    1,237
    Joined:
    Jul 12, 2015
    Posts:
    727
    Likes Received:
    332
    Trophy Points:
    30
    Location:
    Demon World

    mag dl kayo ng vissual studio, C++ yan ung source ng hack pwede kau manuod sa youtube para malaman nyo.
     
  6. BioFlu

    BioFlu Leecher

    Reputations:
    0
    Joined:
    Jan 21, 2019
    Posts:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Batanes

    Working paba to?
     
  7. white

    white Leecher

    Reputations:
    0
    Joined:
    Oct 17, 2018
    Posts:
    4
    Likes Received:
    0
    Trophy Points:
    0

    Yan yung codes. copy paste lang sa c++
     
  8. Roylhine06™

    Roylhine06™ ROYLHINE06 IS MY NAME Staff Member Moderator

    Reputations:
    101
    Joined:
    Apr 14, 2018
    Posts:
    82
    Likes Received:
    20
    Trophy Points:
    5
    Location:
    Locating...

    specialforce 1 bato tris or anong laro to !
     
  9. NoBodyHere

    NoBodyHere Leecher

    Reputations:
    0
    Joined:
    Dec 1, 2016
    Posts:
    1
    Likes Received:
    0
    Trophy Points:
    1

    Ako'y nagbabalik hahaha! Hi PHO! Namiss ko to.
     
  10. trismund

    trismund King in the East Staff Member Administrator ROS VIP

    Reputations:
    1,310
    Joined:
    Oct 28, 2012
    Posts:
    2,622
    Likes Received:
    600
    Trophy Points:
    30
    Location:
    Locating...

    all d3d9 games
     
  11. Roylhine06™

    Roylhine06™ ROYLHINE06 IS MY NAME Staff Member Moderator

    Reputations:
    101
    Joined:
    Apr 14, 2018
    Posts:
    82
    Likes Received:
    20
    Trophy Points:
    5
    Location:
    Locating...

    salamat dito tris try ko nalang mamaya
     
  12. bansuhan1

    bansuhan1 Leecher

    Reputations:
    15
    Joined:
    Mar 7, 2019
    Posts:
    5
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Davao City

    Let me try this one hahahaha thanks tris !
     
  13. cjmgalola

    cjmgalola Leecher

    Reputations:
    0
    Joined:
    Jun 15, 2018
    Posts:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Philippines

    Sir @trismund meron po ba akong dapat idagdag na SDK na ka undefined "#include <d3dx9.h>" or kahit "#include <d3d9.h>" lang po lagay ko ?
     
  14. trismund

    trismund King in the East Staff Member Administrator ROS VIP

    Reputations:
    1,310
    Joined:
    Oct 28, 2012
    Posts:
    2,622
    Likes Received:
    600
    Trophy Points:
    30
    Location:
    Locating...

    Include directx sdk include and library to vc++ directories
     
    cjmgalola likes this.
  15. cjmgalola

    cjmgalola Leecher

    Reputations:
    0
    Joined:
    Jun 15, 2018
    Posts:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Philippines

    salamat po sir
    ttry ko po
     
  16. oonalang123

    oonalang123 Newbie

    Reputations:
    0
    Joined:
    Jul 15, 2014
    Posts:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bulacan

    sir @trismund ? notice naman po
    upload_2019-5-28_8-3-11.png upload_2019-5-28_8-2-10.png

    EDIT: BAKIT DI BINABASA YUNG BOOL? DAHIL BA OUTDATED VERSION ? 2010 PA KASI
    PAYO NAMAN PO :(
     
    Last edited: May 29, 2019
  17. andoks

    andoks Leecher

    Reputations:
    5
    Joined:
    Jun 5, 2019
    Posts:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    cavite

    "fatal error: CTools.h: No such file or directory|" pano po ito ayusin?
     
  18. trismund

    trismund King in the East Staff Member Administrator ROS VIP

    Reputations:
    1,310
    Joined:
    Oct 28, 2012
    Posts:
    2,622
    Likes Received:
    600
    Trophy Points:
    30
    Location:
    Locating...

    Wala kayong CTools.h
    Tatlong files lang naman yan, CMain.cpp, CTools.cpp, Ctools.h
     
  19. Jhunz1337

    Jhunz1337 Excommunicado Banned! Established Member

    Reputations:
    25
    Joined:
    Jul 4, 2014
    Posts:
    201
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Planet X

    add ka new item tapos name mo ng CTools.h

    e2 code nun
    Code:
    #include <windows.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    //#include "DXSDK\d3dx9.h"
     
    //==============================================================================
     
    class CTools
    {
        public:
        D3DVIEWPORT9  pViewport;
        DWORD    D3D9VTable();
        BOOL    CheckWindowsVersion(DWORD dwMajorVersion,DWORD dwMinorVersion,DWORD dwProductType);
        void    *DetourCreate( BYTE *src, const BYTE *dst, const int len );
        HRESULT GenerateTexture( IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32 );
    };
    extern CTools Tools;
     
     
    andoks likes this.
  20. andoks

    andoks Leecher

    Reputations:
    5
    Joined:
    Jun 5, 2019
    Posts:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    cavite

    Thanks po
     

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Share This Page

Top
Pinoy Hideout