Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    [Blackshot] D3D VMT Hook


    Gordon`
     Share

    Recommended Posts

    DWORD* GetDevicePointerFunction(int i)
    {
    DWORD dwPtr = *(DWORD*)0x7E6764;
    if(dwPtr == 0) return 0;
    
    dwPtr = *(DWORD*)(dwPtr+0x38);
    if(dwPtr == 0) return 0;
    
    dwPtr = *(DWORD*)(dwPtr+0x10);
    if(dwPtr == 0) return 0;
    
    return (DWORD*) ((*(DWORD*)(dwPtr))+4*i);
    }

    while(!GetDevicePointerFunction(0)) Sleep(100);
    
    DWORD* dwEndScene = GetDevicePointerFunction(42);
    DWORD* dwReset = GetDevicePointerFunction(16);
    
    #define HOOK(name) p##name = (name##_t)*dw##name; *dw##name = (DWORD)&hk##name;
    
    while(1)
    {
    if(*dwEndScene != (DWORD)&hkEndScene) HOOK(EndScene)
    if(*dwReset != (DWORD)&hkReset) HOOK(Reset)
    
    Sleep(50);
    }

    typedef HRESULT (D3DAPI* EndScene_t)(IDirect3DDevice9* pDevice);
    typedef HRESULT (D3DAPI* Reset_t)(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters);
    
    EndScene_t pEndScene = 0;
    Reset_t pReset = 0;

    HRESULT D3DAPI hkReset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
    {
    return pReset(pDevice, pPresentationParameters);
    }
    
    HRESULT D3DAPI hkEndScene(IDirect3DDevice9* pDevice)
    {
    return pEndScene(pDevice);
    }

    Edited by Gordon`
    Link to comment
    Share on other sites

    • 1 month later...
    • 2 years later...
    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...