Hello, before I start i Would just like to say that I am a noob at c++ and have only been doing it for about a week now, so if some of my code isn't perfect or, just not Making Any cents, Please just give me a break lol.
I've been following this Tutorial on DLL Redirection, but change it obviously to work with Steam.
But now I'm running into issues, the Proxy Steam DLL works perfectly, but I still can't get my hijacked functions to work.
Now I read some where, most steam content has used interfaces to call the underlying functions for some time, which means that your hijacked functions will never be called unless you build and maintain your own classes and hijack export _f.
This is where I get confused as I said before I'm very new too c++ and still learning the basics, I found this bit of code to hijack _f the function, but it still isn't working, any ideas.
#define S_API extern "C" __declspec( dllexport ) #define STEAM_NAKED __declspec(naked) HMODULE SteamDll; FARPROC fp_f; #define STEAM_INTERFACE_VERSION_006 "Steam006" #define STEAM_INTERFACE_VERSION_005 "Steam005" #define STEAM_INTERFACE_VERSION_004 "Steam004" #define STEAM_INTERFACE_VERSION_003 "Steam003" S_API void STEAM_NAKED _f(const char* cszSteamInterfaceVersion) { if(cszSteamInterfaceVersion != NULL) { if(strcmp(cszSteamInterfaceVersion, STEAM_INTERFACE_VERSION_006) == 0) { __asm jmp fp_f; } else if(strcmp(cszSteamInterfaceVersion, STEAM_INTERFACE_VERSION_005) == 0) { __asm jmp fp_f; } else if(strcmp(cszSteamInterfaceVersion, STEAM_INTERFACE_VERSION_004) == 0) { __asm jmp fp_f; } else if(strcmp(cszSteamInterfaceVersion, STEAM_INTERFACE_VERSION_003) == 0) { __asm jmp fp_f; } } __asm jmp fp_f; } BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved) { if(dwReason == DLL_PROCESS_ATTACH) { SteamDll = LoadLibraryA("ValveSteam.dll"); fp_f = GetProcAddress(SteamDll, "_f"); } return 1; }
Comment