Author Topic: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA  (Read 6002 times)

0 Members and 1 Guest are viewing this topic.

FriendsKnow

  • Guest
[RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« on: October 15, 2014, 02:54:00 pm »
Download (waiting for approval):http://tkc-community.net/forum/index.php?action=downloads;sa=view;down=347


made for non-steam version
-Some functions might not work correctly on steam version (I am not able to check it out).


Instruction:
-Run game in directx9 with window mode
-Launch the cheat


Significant:
-do not close "WFAS 1.143 --> MULTIHACK 1.0 BETA" window while the game is running because the cheat will stop working.
-The game must be started earlier than the cheat.

Features:
-Autoblock
-ZoomHack
-Wallhack
-Crosshair (freezes its size)
-Fly Hack





Worm

  • Online Villain
  • ***
  • Posts: 169
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #1 on: October 15, 2014, 03:35:13 pm »
Looks shitty as always.

FriendsKnow

  • Guest
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #2 on: October 15, 2014, 03:40:46 pm »
Looks shitty as always.


poor worm has a complex about his miniature tool?  :icon_laugh


lol I love when people say different things depending on the people and situation  :icon_cool2

Worm

  • Online Villain
  • ***
  • Posts: 169
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #3 on: October 15, 2014, 03:43:10 pm »
Looks shitty as always.


poor worm has a complex about his miniature tool?  :icon_laugh


lol I love when people say different things depending on the people and situation  :icon_cool2
I bet you didn't even know what DIP was before my tutorial eh?
Fly hack is patched too - try flying on top of water.
10/10.

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #4 on: October 15, 2014, 10:13:57 pm »

worm your comeing across as a dickhead lately , the people that did respect you are losing it , very fast..

instead of relentlessly trying to act big which youl never be , eat humble pie , apologize .. and maybe we would all get along...after all we all want the same thing.

me and you both know i would smash the fuck out of you at programing and cheating , humble up kid and maybe we will all get along. :smile
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #5 on: October 15, 2014, 10:17:06 pm »
thanks for releasing it FriendsKnow  :icon_thumbsup .
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

FriendsKnow

  • Guest
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #6 on: October 15, 2014, 10:27:23 pm »
thanks for releasing it FriendsKnow  :icon_thumbsup .

Thanks for good words   :icon_xmas .I made it cuz there were no any cheats for WFAS besides autoblock.hope people will enjoy it though its not an aimbot which is the most wanted. (out of my ability atm)

also responded to your pm/  :jamaica

Worm

  • Online Villain
  • ***
  • Posts: 169
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #7 on: October 15, 2014, 10:28:33 pm »

worm your comeing across as a dickhead lately , the people that did respect you are losing it , very fast..

instead of relentlessly trying to act big which youl never be , eat humble pie , apologize .. and maybe we would all get along...after all we all want the same thing.

me and you both know i would smash the fuck out of you at programing and cheating , humble up kid and maybe we will all get along. :smile
-/ Sends me a PM.
-/ Puts me on the ignore list.
 :icon_laugh :icon_laugh

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #8 on: October 15, 2014, 10:30:12 pm »
thanks for releasing it FriendsKnow  :icon_thumbsup .

Thanks for good words   :icon_xmas .I made it cuz there were no any cheats for WFAS besides autoblock.hope people will enjoy it though its not an aimbot which is the most wanted. (out of my ability atm)

aimbot for wfas is pretty simple to do. not mocking your skills here just saying it is quite easy. im actually suprised no one has made one for it yet except me , it literally took me 5 minutes.
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

FriendsKnow

  • Guest
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #9 on: October 15, 2014, 10:33:58 pm »
thanks for releasing it FriendsKnow  :icon_thumbsup .

Thanks for good words   :icon_xmas .I made it cuz there were no any cheats for WFAS besides autoblock.hope people will enjoy it though its not an aimbot which is the most wanted. (out of my ability atm)

aimbot for wfas is pretty simple to do. not mocking your skills here just saying it is quite easy. im actually suprised no one has made one for it yet except me , it literally took me 5 minutes.

5 stars yet   :icon_cool2

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #10 on: October 15, 2014, 10:34:09 pm »

worm your comeing across as a dickhead lately , the people that did respect you are losing it , very fast..

instead of relentlessly trying to act big which youl never be , eat humble pie , apologize .. and maybe we would all get along...after all we all want the same thing.

me and you both know i would smash the fuck out of you at programing and cheating , humble up kid and maybe we will all get along. :smile
-/ Sends me a PM.
-/ Puts me on the ignore list.
 :icon_laugh :icon_laugh

actually you were put on ignore after i seen this post matey lol  :icon_laugh

Any chance for an offset? I am too lazy.
Please? :D

you can reply .. make it a good one or il block you again  :smile
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

Worm

  • Online Villain
  • ***
  • Posts: 169
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #11 on: October 15, 2014, 10:37:03 pm »

worm your comeing across as a dickhead lately , the people that did respect you are losing it , very fast..

instead of relentlessly trying to act big which youl never be , eat humble pie , apologize .. and maybe we would all get along...after all we all want the same thing.

me and you both know i would smash the fuck out of you at programing and cheating , humble up kid and maybe we will all get along. :smile
-/ Sends me a PM.
-/ Puts me on the ignore list.
 :icon_laugh :icon_laugh

actually you were put on ignore after i seen this post matey lol  :icon_laugh

Any chance for an offset? I am too lazy.
Please? :D

you can reply .. make it a good one or il block you again  :smile
You are so bad that it is not even funny.

So I found everything I needed.
Playerbase ptr, etc..
 :icon_thumbsup

well done. :icon_thumbsup

FriendsKnow

  • Guest
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #12 on: October 15, 2014, 10:44:54 pm »

worm your comeing across as a dickhead lately , the people that did respect you are losing it , very fast..

instead of relentlessly trying to act big which youl never be , eat humble pie , apologize .. and maybe we would all get along...after all we all want the same thing.

me and you both know i would smash the fuck out of you at programing and cheating , humble up kid and maybe we will all get along. :smile
-/ Sends me a PM.
-/ Puts me on the ignore list.
 :icon_laugh :icon_laugh

actually you were put on ignore after i seen this post matey lol  :icon_laugh

Any chance for an offset? I am too lazy.
Please? :D

you can reply .. make it a good one or il block you again  :smile
You are so bad that it is not even funny.

So I found everything I needed.
Playerbase ptr, etc..
 :icon_thumbsup

well done. :icon_thumbsup

how it feels to be a thief who can't steal?  :icon_laugh

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #13 on: October 15, 2014, 10:45:10 pm »
fail boat next stop for our pet worm :icon_laugh

infact i think worm is the captain of the fail boat he hasnt been performing well at all since he arrived, false promises and bullshit from the guy and to top it all off a wallhack that .. ' wallhacks ' rocks thats skill that is ...ahaha

reply worm show your 'friends' how untrollable you are.  :smile
« Last Edit: October 15, 2014, 10:52:00 pm by MrMedic »
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

Worm

  • Online Villain
  • ***
  • Posts: 169
    • View Profile
Re: [RELEASE] WFAS 1.143 --> MULTIHACK 1.0 BETA
« Reply #14 on: October 15, 2014, 10:52:25 pm »

worm your comeing across as a dickhead lately , the people that did respect you are losing it , very fast..

instead of relentlessly trying to act big which youl never be , eat humble pie , apologize .. and maybe we would all get along...after all we all want the same thing.

me and you both know i would smash the fuck out of you at programing and cheating , humble up kid and maybe we will all get along. :smile
-/ Sends me a PM.
-/ Puts me on the ignore list.
 :icon_laugh :icon_laugh

actually you were put on ignore after i seen this post matey lol  :icon_laugh

Any chance for an offset? I am too lazy.
Please? :D

you can reply .. make it a good one or il block you again  :smile
You are so bad that it is not even funny.

So I found everything I needed.
Playerbase ptr, etc..
 :icon_thumbsup

well done. :icon_thumbsup

how it feels to be a thief who can't steal?  :icon_laugh

Point that question to your friend - Medic the copy & paste master:
Here is a thread he posted in.
http://tkc-community.net/forum/index.php?topic=12821.msg118307#msg118307

The source code he published:

Code: [Select]
//-- ---------------------------------------------------------------------------------------------------------------------------------
//pastebin
//----------------------------------------------------------------------------------------------------------------------------------
#include <windows.h>
//----------------------------------------------------------------------------------------------------------------------------------
#include "Main.h"
//-----------------------------------------------------------------------------------------------------------------------------------
#include <mmsystem.h>
#pragma comment(lib, "winmm.lib")
//-----------------------------------------------------------------------------------------------------------------------------------
#include <stdio.h>
//-----------------------------------------------------------------------------------------------------------------------------------
#include <fstream>
//-----------------------------------------------------------------------------------------------------------------------------------
#include "detours.h"
#pragma comment(lib,"detours.lib")
//-----------------------------------------------------------------------------------------------------------------------------------
#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
//-----------------------------------------------------------------------------------------------------------------------------------
using namespace std;
//---------------------------------------------------------------------------------------------------------------------------------
#define HOOK(func,addy) o##func = (t##func)DetourFunction((PBYTE)addy,(PBYTE)hk##func) //Quick Hook using MS Detour
#define UNHOOK(func,addy) o##func = (t##func)DetourFunction((PBYTE)addy,(PBYTE)o##func) //Quick Unook using MS Detour
//---------------------------------------------------------------------------------------------------------------------------------
#define ES  0 //EndScene
#define DIP 1 //DrawIndexedPrimitive
#define RES 2 //Reset
//---------------------------------------------------------------------------------------------------------------------------------
LPDIRECT3DDEVICE9 npDevice; //pDevice is stored here so we can hook through the VTable
//---------------------------------------------------------------------------------------------------------------------------------
LPD3DXFONT      g_pFont = NULL; //D3D Font
LPD3DXLINE      g_pLine = NULL; //D3D Line
D3DVIEWPORT9    g_ViewPort; //ViewPort
//---------------------------------------------------------------------------------------------------------------------------------
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;
//---------------------------------------------------------------------------------------------------------------------------------
ofstream myfile; //Used for logging to a text file
//---------------------------------------------------------------------------------------------------------------------------------
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;

typedef HRESULT(WINAPI* tReset)(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters);
tReset oReset = NULL;
//---------------------------------------------------------------------------------------------------------------------------------
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;
}
//-----------------------------------------------------------------------------------------------------------------------------------
HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
    myfile << "EndScene is hooked\n";             //Check log
    while(!npDevice) {
        npDevice = pDevice;                       //Here we store pDevice so we can re-hook with a VTable hook later.
    }

                                                  
    if(g_pFont == NULL) D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Verdana", &g_pFont); //Create fonts
                                                  
    if(g_pLine == NULL) D3DXCreateLine(pDevice, &g_pLine); //Create lines

    pDevice->GetViewport(&g_ViewPort);

    return oEndScene(pDevice);
}
//---------------------------------------------------------------------------------------------------------------------------------
HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{

    myfile << "DIP is hooked\n";                  //Check log
    if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
        Stream_Data->Release();

    return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);

}
//---------------------------------------------------------------------------------------------------------------------------------
HRESULT WINAPI hkReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
{
    myfile << "Reset is hooked\n";                //Check log
    if( g_pFont )
        g_pFont->OnLostDevice();

    if( g_pLine )
        g_pLine->OnLostDevice();

    HRESULT iReturnValue = oReset(pDevice, pPresentationParameters);

    if(iReturnValue == D3D_OK) {

        if( g_pFont )
            g_pFont->OnResetDevice();

        if( g_pLine )
            g_pLine->OnResetDevice();
    }

    return iReturnValue;

}
//-----------------------------------------------------------------------------------------------------------------------------------
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,GetModuleHandle(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,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];

    table[ES]   = pVTable[42];                    //EndScene address
    table[DIP]  = pVTable[82];                    //DrawIndexedPrimitive address
    table[RES]  = pVTable[16];                    //Reset address

    DestroyWindow(hWnd);
}
//------------------------------------------------------------------------------------------------------------------------------------
DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching( LPVOID  Param )
{
    while(1) {
        Sleep(100);
        HookVTableFunction((PDWORD*)npDevice, (PBYTE)hkDrawIndexedPrimitive, 82); //Hook DrawIndexedPrimitive
        HookVTableFunction((PDWORD*)npDevice, (PBYTE)hkEndScene, 42); //Hook EndScene
        HookVTableFunction((PDWORD*)npDevice, (PBYTE)hkReset, 16); //Hook Reset

    }

    return 1;
}
//------------------------------------------------------------------------------------------------------------------------------------
bool hooked = false;
DWORD WINAPI LoopFunction( LPVOID lpParam  )
{

    while(1) {
        if( hooked == false) {
            DWORD VTable[3] = {0};

            while(GetModuleHandle("d3d9.dll")==NULL) {
                Sleep(250);
            }

            DX_Init(VTable);
            HOOK(EndScene,VTable[ES]);            //Hook EndScene as a device discovery hook

            while(!npDevice) {
                Sleep(50); //Sleep until npDevice is not equal to NULL
            }
            UNHOOK(EndScene, VTable[ES]);         //Unhook as soon as we have a valid pointer to pDevice

            *(PDWORD)&oDrawIndexedPrimitive = VTable[DIP];
            *(PDWORD)&oEndScene = VTable[ES];
            *(PDWORD)&oReset = VTable[RES];

            CreateThread(NULL,0,&VirtualMethodTableRepatchingLoopToCounterExtensionRepatching,NULL,0,NULL); //Create hooking thread

            hooked = true;

            Sleep(200);

        }
    }
    return 0;
}
//------------------------------------------------------------------------------------------------------------------------------------
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
    if(dwReason == DLL_PROCESS_ATTACH) {
        CreateThread(0, 0, LoopFunction, 0, 0, 0);
        myfile.open("c:\\dx.log");
        myfile.clear();
        myfile << "----------Attached----------\n";
        myfile << "\n";
    }
    else if(dwReason == DLL_PROCESS_DETACH) {
        myfile << "----------Detached----------";
        myfile.close();
    }

    return TRUE;
}
//------------------------------------------------------------------------------------------------------------------------------------


Ummm.

This seems interesting:

Code: [Select]
WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(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,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];

Oh wait that's right:
http://www.unknowncheats.me/forum/512785-post1.html
http://www.unknowncheats.me/wiki/Infestation_Survivor_Stories:Simple_Hack_2

^ I am quote it:
Mr Medic just took work from someone else.
How is that possible? LOL.
Anyways this shit was posted around 2010 & 2013.
Good game.
Code: [Select]

DWORD* FindDXVtable()
{
    WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(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,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
 
    DWORD* pVTable = (DWORD*)pd3dDevice;
    pVTable = (DWORD*)pVTable[0];
    DestroyWindow(hWnd);
    return pVTable;
}
 



Oh shit guys Mr Medic can't even code his own hooking function so he has to copy & paste it:
Proof:
Code: [Select]
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;
}
Seems familiar ? LOLS -> Medic can't stop copy & pasting.

It was originally published here:
Code: [Select]
https://github.com/Brandon-T/DXI/blob/master/Other%20Hook%20Styles/Detours.txt
« Last Edit: October 15, 2014, 10:57:34 pm by Worm »