google-site-verification: googlebaca44933768a824.html C++ Steam DLL Redirection - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

C++ Steam DLL Redirection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    C++ Steam DLL Redirection

    Steam DLL Redirection

    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.

    Code:
    #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;
    }
    Also here is the fULL Source Code if you would like to take a look thank you.

    #2
    Re: C++ Steam DLL Redirection

    EDIT: Nevermind
    Last edited by mencore; 12-06-2012, 12:16 PM.
    lolmaoman: Germans are born with a lifetime x22 login engraved into their birth certificates. True story.
    I DONT HAVE TEAMVIEWER AND IM NOT GOING TO GIVE ANY 24/7 ONLINE SUPPORT VIA STEAM, XFIRE OR OTHER IM PROGRAMS SO DONT BOTHER ASKING. THANKS.

    Comment

    Working...
    X