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.

  2. How to avail PHO VIP hack/s?
    Click here for more Info!
    [PHO] VIP Hacks Price

      SF1 VIP|ROS VIP

    • 7 Days = php 150
    • 15 Days = php 200
    • 1 Month = php 300

      SF2 VIP

    • 7 Days = php 200
    • 15 Days = php 250
    • 1 Month = php 500
    Dismiss Notice
Dismiss Notice
Announcement!
Gusto mo bang makakuha ng VIP subcription ng libre? CLICK HERE<

Source D3D Hook Xigncode

Discussion in 'Specialforce Source Code & Tutorials' started by killovehack123, Oct 7, 2019.

  1. killovehack123

    Reputations:
    20
    Joined:
    Feb 14, 2019
    Posts:
    14
    Likes Received:
    4
    Trophy Points:
    3

    Code:
    #include <stdlib.h>     /* exit, EXIT_FAILURE */
    #include <cstdlib>
    void __cdecl nReset ( void )
    {
       _asm pushad
      _asm popad
    }
    void __cdecl nEndScene ( void )
    {
         _asm pushad
      _asm popad
    }
    void __cdecl nDrawIndexedPrimitive ( void )
    {
         _asm pushad
     
    _asm popad
    }
    static DWORD hHooking           = NULL;
    static DWORD hEndScene          = NULL;
    static DWORD hReset             = NULL;
    static DWORD hDrawIndexPrimtive = NULL;
    
    typedef void ( WINAPI * EnterCriticalSection_t ) ( LPCRITICAL_SECTION lpCriticalSection );
                EnterCriticalSection_t  pEnterCriticalSection;
    void WINAPI nEnterCriticalSection ( LPCRITICAL_SECTION lpCriticalSection )
    {
    _asm
    {
      MOV EAX, [EBP+0x4]
      MOV hHooking, EAX
    }
    // EndScene
    if ( hHooking == hEndScene )
    {
         __asm call [nEndScene]
    }
    //Reset
    if ( hHooking == hReset )
    {
      __asm call [nReset]
    }
    // DIP
    if ( hHooking == hDrawIndexPrimtive )
    {
         __asm call [nDrawIndexedPrimitive];
    }
    return pEnterCriticalSection(lpCriticalSection);
    }
    BOOL bCompare1 ( const BYTE* pData, const BYTE* bMask, const char* szMask )
    {
        for ( ;*szMask; ++szMask, ++pData, ++bMask )
        {
            if ( *szMask == 'x' && *pData != *bMask )
                 return 0;
        }
        return (*szMask) == NULL;
    }
    DWORD FindPattern1 ( DWORD dwStartAddress,DWORD dwSize, BYTE *bMask, char * szMask, int codeOffset, BOOL extract )
    {
        for ( DWORD i = 0; i < dwSize; i++ )
        {
            if ( bCompare1((BYTE*)(dwStartAddress + i),bMask,szMask) )
            {
                if ( extract )
                {
                    return *(DWORD*)(dwStartAddress+i+codeOffset);
                } else {
                    return  (DWORD)(dwStartAddress+i+codeOffset);
                }
            }
        }
        return NULL;
    }
    #define EXIT_FAILURE 1
    DWORD WINAPI Start ( LPVOID lpArg )
    {
       DWORD hD3D,hCriticalSection;
       do
       {
         hD3D = (DWORD)GetModuleHandle("d3d9.dll");
         Sleep(100);
       }    while(!hD3D);
    
       MEMORY_BASIC_INFORMATION D3D9Info;
       VirtualQuery((void*)(hD3D+0x1000),&D3D9Info,sizeof(D3D9Info));
       hCriticalSection = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x74\x07\x00\xFF\x15\x00\x00\x00\x00\x8D\x00\x00","xx?xx????x??",5,true);
       if ( !hCriticalSection )
       {
        MessageBox(NULL,"Error Code (0)","Error",MB_ICONERROR);
        exit(1);
       }
       if ( !hReset )
           hReset  = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\xFF\x15\x00\x00\x00\x00\x3B\x43\x20\x74\x1B\x8B\x46\x18\x85\xC0\x74\x07\x56","xx????xxxxxxxxxxxxx",0,false);// Win XP
       if ( !hReset  )
                    hReset  = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x57\xFF\x15\x00\x00\x00\x00\x8B\x45\x0C\x33\xF6\x39\x70\x20","xxx????xxxxxxxx",7,false);// Vista - Win7
       if ( !hReset  )
                    hReset  = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x33\xC9\x39\x4F\x20\x75\x79\x8D\x44\x24\x38\x89\x44\x24\x1C\x32\xC0\x8B\xDE","xxxxxxxxxxxxxxxxxxx",0,false);// Win 8.0
       if ( !hReset  )
                    hReset  = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x8B\xCE\xE8\x00\x00\x00\x00\x8B\x4E\x0C\x48\xF7\xD8","xxx????xxxxxx",0,false);// Win 8.1
       if ( !hReset  )
       {
        MessageBox(NULL,"Error Code (1)","Error",MB_ICONERROR);
        exit(1);
       }
                if ( !hEndScene )
           hEndScene = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x57\xFF\x15\x00\x00\x00\x00\xF6\x46\x00\x00\x89\x5D\xFC\x75\x0E\x8B\x86\x00\x00\x00\x00\xA8\x01\xC6\x45\x00\x00\x75\x24","xxx????xx??xxxxxxx????xxxx??xx",7,false); // Win XP
       if ( !hEndScene )               
          hEndScene = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x57\xFF\x15\x00\x00\x00\x00\xE9\x00\x00\x00\x00\x39\x5F\x18\x74\x07\x57\xFF\x15\x00\x00\x00\x00\xB8\x00\x00\x00\x00\x8B\x4D\xF4\x64\x89\x0D\x00\x00\x00\x00\x59\x5F\x5E\x5B\x8B\xE5\x5D\xC2\x04\x00\x68\xAD\x06\x00\x00","xxx????x????xxxxxxxx????x????xxxxxx????xxxxxxxxxxxxx??",7,false); // Vista Win7
       if ( !hEndScene )
          hEndScene = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x33\xC0\xE8\x00\x00\x00\x00\xC2\x04\x00\x8B\xDF\xEB\x8E\x53\xFF\x15\x00\x00\x00\x00\xEB\x90","xxx????xxxxxxxxxx????xx",21,false);// Win8 8.0 + 8.1   
       if ( !hEndScene )
       {
        MessageBox(NULL,"Error Code (2)","Error",MB_ICONERROR);
        exit(1);
       }
       if ( !hDrawIndexPrimtive )
          hDrawIndexPrimtive = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x53\xFF\x15\x00\x00\x00\x00\xF6\x46\x00\x00\x89\x7D\xFC\x74\x24\x39\x7B\x18\x74\x07\x53\xFF\x15\x00\x00\x00\x00\xB8\x00\x00\x00\x00\x8B\x4D\xF4\x64\x89\x0D\x00\x00\x00\x00\x5F\x5E\x5B\x8B\xE5\x5D\xC2\x1C\x00","xxx????xx??xxxxxxxxxxxxx????x????xxxxxx????xxxxxxxxx",7,false);// Win XP
       if ( !hDrawIndexPrimtive )
          hDrawIndexPrimtive = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\x56\xFF\x15\x00\x00\x00\x00\xE9\x00\x00\x00\x00\x39\x5E\x18\x74\x07\x56\xFF\x15\x00\x00\x00\x00\xB8\x00\x00\x00\x00\x8B\x4D\xF4\x64\x89\x0D\x00\x00\x00\x00\x59\x5F\x5E\x5B\x8B\xE5\x5D\xC2\x1C\x00\x39\x9E\x00\x00\x00\x00","xxx????x????xxxxxxxx????x????xxxxxx????xxxxxxxxxxxx????",7,false);// Vista - Win7
       if ( !hDrawIndexPrimtive )
          hDrawIndexPrimtive = FindPattern1((DWORD)D3D9Info.BaseAddress,D3D9Info.RegionSize,(PBYTE)"\xE9\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\xE9\x00\x00\x00\x00\xC7\x45\x00\x00\x00\x00\x00\x8D\x4D\x00\xE8\x00\x00\x00\x00\xB8\x00\x00\x00\x00\xE9\x00\x00\x00\x00\x83\xBA\x00\x00\x00\x00\x00\x74\x00","x?????x?????x????xx?????xx?x????x????x????xx?????x?",12,false); // Win8 8.0 + 8.1
       if ( !hDrawIndexPrimtive )
       {
        MessageBox(NULL,"Error Code (3)","Error",MB_ICONERROR);
        exit(1);
       }
       if ( hReset && hEndScene && hDrawIndexPrimtive )
       {
          DWORD dwBack;
          VirtualProtect((void*)(hCriticalSection),4,PAGE_EXECUTE_READWRITE,&dwBack);
          pEnterCriticalSection       = (EnterCriticalSection_t) *(DWORD*)(hCriticalSection);
          *(DWORD*)(hCriticalSection) = (DWORD)nEnterCriticalSection;
          VirtualProtect((void*)(hCriticalSection),4,dwBack,&dwBack);
             return EXIT_SUCCESS;
       }
       return EXIT_FAIULURE;
        //exit (EXIT_FAILURE);
     
    imnotlucky likes this.
  2. felixingal

    felixingal Leecher

    Reputations:
    0
    Joined:
    Aug 28, 2014
    Posts:
    4
    Likes Received:
    0
    Trophy Points:
    1

    c++ bato sir. ma try nga
     
  3. boomboompow03

    boomboompow03 Leecher

    Reputations:
    0
    Joined:
    Apr 25, 2019
    Posts:
    5
    Likes Received:
    0
    Trophy Points:
    1

    idol pwede paturo panu gumamit ng source code ?
     
  4. trismund

    trismund King in the East
    Staff Member Administrator

    Reputations:
    1,793
    Joined:
    Oct 28, 2012
    Posts:
    2,665
    Likes Received:
    686
    Trophy Points:
    30

    magaral ka ng C++
     
  5. boomboompow03

    boomboompow03 Leecher

    Reputations:
    0
    Joined:
    Apr 25, 2019
    Posts:
    5
    Likes Received:
    0
    Trophy Points:
    1

    idol panu ayusin ung may mga error may MVS nako e nailagay ko naung mga codes pero may mga error sa codes ? pa help po para matuto idol
     
  6. trismund

    trismund King in the East
    Staff Member Administrator

    Reputations:
    1,793
    Joined:
    Oct 28, 2012
    Posts:
    2,665
    Likes Received:
    686
    Trophy Points:
    30

    Anong error? ipost mo ang error or igoogle mo
     
  7. trismund

    trismund King in the East
    Staff Member Administrator

    Reputations:
    1,793
    Joined:
    Oct 28, 2012
    Posts:
    2,665
    Likes Received:
    686
    Trophy Points:
    30

    Kulang yang code ba yan wala yan dllmain, lagyan mo nalang
     
  8. kewltrainer

    kewltrainer Leecher

    Reputations:
    0
    Joined:
    Nov 4, 2019
    Posts:
    1
    Likes Received:
    0
    Trophy Points:
    1

    nice mabilisan no need to update :)
     
  9. valtik

    valtik SF1 VIP
    SF1 VIP

    Reputations:
    0
    Joined:
    Oct 21, 2019
    Posts:
    11
    Likes Received:
    0
    Trophy Points:
    1

    mahirap parin intindihin s mga di nkakaalam
     

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

Share This Page

Pinoy Hideout