Results 1 to 8 of 8
  1. #1
    llvengancell's Avatar
    Join Date
    May 2007
    Posts
    390
    Reputation
    12
    Thanks
    5

    Lightbulb D3D hooking tutorial 5 i think

    i will put the upload up if enough people post they want this

    Undetected] - Direct3D8 Interface Hooking
    I was planning on maybe releasing some hacks but atm i just don't have the time, so i'm releasing one of my undetected d3d8 bases as i have other methods to fall back on.

    BeginScene, EndScene, DrawIndexedPrimitive and SetStreamSource are already hooked as a example..

    I'm sure once you have read the source and understand it, you wont have any problems adding other member functions using d3d8.h as a reference to the device interface.

    Code:

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

    /* Roverturbo | www.*************.com | www.darkhex.us */

    #include <windows.h>
    #include <detours.h>

    #include <d3d8.h>
    #pragma comment(lib, "d3d8.lib")


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


    typedef HRESULT (WINAPI* BeginScene_t)(LPDIRECT3DDEVICE8 pDevice);

    BeginScene_t pBeginScene;

    HRESULT WINAPI nBeginScene(LPDIRECT3DDEVICE8 pDevice)
    {

    return pBeginScene(pDevice);

    }


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


    typedef HRESULT (WINAPI* EndScene_t)(LPDIRECT3DDEVICE8 pDevice);

    EndScene_t pEndScene;

    HRESULT WINAPI nEndScene(LPDIRECT3DDEVICE8 pDevice)
    {

    return pEndScene(pDevice);

    }


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


    typedef HRESULT (WINAPI* DrawIndexedPrimitive_t)(LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType,
    unsigned int uiMinIndex, unsigned int uiNumVertices,
    unsigned int uiStartIndex, unsigned int uiPrimitiveCount);

    DrawIndexedPrimitive_t pDrawIndexedPrimitive;

    HRESULT WINAPI nDrawIndexedPrimitive(LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType,
    unsigned int uiMinIndex, unsigned int uiNumVertices,
    unsigned int uiStartIndex, unsigned int uiPrimitiveCount)
    {

    return pDrawIndexedPrimitive(pDevice, pType, uiMinIndex, uiNumVertices, uiStartIndex, uiPrimitiveCount);

    }


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


    typedef HRESULT (WINAPI* SetStreamSource_t)(LPDIRECT3DDEVICE8 pDevice, unsigned int uiStreamNumber,
    LPDIRECT3DVERTEXBUFFER8 pStreamData, unsigned int uiStride);

    SetStreamSource_t pSetStreamSource;

    HRESULT WINAPI nSetStreamSource(LPDIRECT3DDEVICE8 pDevice, unsigned int uiStreamNumber,
    LPDIRECT3DVERTEXBUFFER8 pStreamData, unsigned int uiStride)
    {

    return pSetStreamSource(pDevice, uiStreamNumber, pStreamData, uiStride);

    }


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


    typedef HRESULT (WINAPI* CreateDevice_t)(void* pDirect3D, unsigned int uiAdapter, D3DDEVTYPE pDeviceType,
    HWND hFocusWindow, unsigned long ulBehaviorFlags,
    D3DPRESENT_PARAMETERS* pPresentationParameters,
    LPDIRECT3DDEVICE8* ppReturnedDeviceInterface);

    CreateDevice_t pCreateDevice;

    HRESULT WINAPI nCreateDevice(void* pDirect3D, unsigned int uiAdapter, D3DDEVTYPE pDeviceType, HWND hFocusWindow,
    unsigned long ulBehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters,
    LPDIRECT3DDEVICE8* ppReturnedDeviceInterface)
    {

    HRESULT hrReturn = pCreateDevice(pDirect3D, uiAdapter, pDeviceType, hFocusWindow, ulBehaviorFlags,
    pPresentationParameters, ppReturnedDeviceInterface);

    if(hrReturn == D3D_OK)
    {

    unsigned long* pInterface = (unsigned long*)*(unsigned long*)*ppReturnedDeviceInterface;

    pBeginScene = (BeginScene_t)DetourFunction((unsigned char*)pInterface[34],
    (unsigned char*)&nBeginScene);

    pEndScene = (EndScene_t)DetourFunction((unsigned char*)pInterface[35],
    (unsigned char*)&nEndScene);

    pDrawIndexedPrimitive = (DrawIndexedPrimitive_t)DetourFunction((unsigned char*)pInterface[71],
    (unsigned char*)&nDrawIndexedPrimitive);

    pSetStreamSource = (SetStreamSource_t)DetourFunction((unsigned char*)pInterface[83],
    (unsigned char*)&nSetStreamSource);

    }

    return hrReturn;

    }


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


    DETOUR_TRAMPOLINE(LPDIRECT3D8 WINAPI pDirect3DCreate8(unsigned int SDKVersion), Direct3DCreate8);

    LPDIRECT3D8 WINAPI nDirect3DCreate8(unsigned int SDKVersion)
    {

    LPDIRECT3D8 pDirect3D = pDirect3DCreate8(SDKVersion);

    if(pDirect3D != NULL)
    {

    unsigned long* ulObject = (unsigned long*)pDirect3D;

    ulObject = (unsigned long*)ulObject[0];

    *(unsigned long*)&pCreateDevice = ulObject[15];


    unsigned long ulProtect;

    VirtualProtect(&ulObject[15], 4, PAGE_EXECUTE_READWRITE, &ulProtect);

    *(unsigned long*)&ulObject[15] = (unsigned long)nCreateDevice;

    VirtualProtect(&ulObject[15], 4, ulProtect, &ulProtect);

    }

    DetourRemove((unsigned char*)pDirect3DCreate8, (unsigned char*)nDirect3DCreate8);

    return pDirect3D;

    }


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


    unsigned int APIENTRY DllMain(HMODULE hModule, unsigned long ulReason, void* vpReserved)
    {

    if(ulReason == DLL_PROCESS_ATTACH)
    {

    unsigned int uiReturn = DetourFunctionWithTrampoline((unsigned char*)pDirect3DCreate8,
    (unsigned char*)nDirect3DCreate8);

    return uiReturn;

    }

    return 0;

    }

    If you don't know how to use it then you need to learn some basic c++ and direct3d...

    Please don't post my stuff on other sites, you can link to this post only...

    By using this source you automatically agree to not use it in any form of pay hack...

    Finally, thanks to msdn, directx sdk and google.

  2. #2
    dezer's Avatar
    Join Date
    Nov 2006
    Gender
    male
    Posts
    285
    Reputation
    12
    Thanks
    4
    My Mood
    Aggressive
    WTF MAN STOP SPAMMING ************* TUTS! most arent for warrock ... :/
    Quote Originally Posted by killerofsake987 View Post
    wuts search button
    owned

  3. #3
    Design's Avatar
    Join Date
    Jun 2007
    Posts
    31
    Reputation
    10
    Thanks
    0
    Yea Dezer You Right , he spam so much !
    Dont Make So much tread's!

    STOP THE SPAM!

  4. #4
    llvengancell's Avatar
    Join Date
    May 2007
    Posts
    390
    Reputation
    12
    Thanks
    5
    If you cant see this is usefull information you an build off of if u have any kowledge of coding at all the dont read these fkn topics but if u like to grow in knowledge and possibly improve warrock hacking then read all these they are tutorials that will help u Universaly with any game using pb as a anti cheat engine so dont flame me for trying to help out fellow coders get some knowledge about d3d hacking /hooking!! if i find enough info on this people can make VIP hacks like ******

  5. #5
    dezer's Avatar
    Join Date
    Nov 2006
    Gender
    male
    Posts
    285
    Reputation
    12
    Thanks
    4
    My Mood
    Aggressive
    wanna make things better? start from urself
    Quote Originally Posted by killerofsake987 View Post
    wuts search button
    owned

  6. #6
    smartie's Avatar
    Join Date
    Mar 2007
    Location
    Holland
    Posts
    434
    Reputation
    15
    Thanks
    30
    Quote Originally Posted by Design View Post
    Yea Dezer You Right , he spam so much !
    Dont Make So much tread's!

    STOP THE SPAM!
    You are just spamming to say: stop the spam, in all his topics...

    I don't see you making any tut's around. so gtfo his post, and don't reply to them.

  7. #7
    llvengancell's Avatar
    Join Date
    May 2007
    Posts
    390
    Reputation
    12
    Thanks
    5
    id much rather post on the site that has taught me so much so im giving back if u just want warrock hacks give to u then i suggest u stop posting and reading threads called TUTORIALS

  8. #8
    Design's Avatar
    Join Date
    Jun 2007
    Posts
    31
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by smartie View Post
    You are just spamming to say: stop the spam, in all his topics...

    I don't see you making any tut's around. so gtfo his post, and don't reply to them.
    wat jij wil maar hij moet gwn ze'n bek houden

Similar Threads

  1. WR D3D Hook - =o - 09/21/07
    By Dave84311 in forum Hack/Release News
    Replies: 26
    Last Post: 05-16-2008, 04:01 PM
  2. WR D3D Hook - =o - 09/25/07
    By Dave84311 in forum Hack/Release News
    Replies: 13
    Last Post: 11-29-2007, 09:00 AM
  3. WR D3D Hook - =o - 03/22/07
    By Dave84311 in forum Hack/Release News
    Replies: 14
    Last Post: 10-06-2007, 09:59 AM
  4. WR D3D Hook Updated to include Punkbuster Hardware Bypass!
    By Dave84311 in forum Hack/Release News
    Replies: 3
    Last Post: 10-05-2007, 01:33 AM
  5. WR D3D Hook - =o - 09/23/07
    By Dave84311 in forum Hack/Release News
    Replies: 3
    Last Post: 09-25-2007, 07:57 AM