Hacking Grand Theft Auto IV: Part III

Another feature set provided by the Games For Windows API is various functions for “protecting” data (hashing & validating). GTA IV uses these functions to hash and validate its save files. I’m not exactly sure how these functions work exactly — other than the fact that the one we are interested in, XLiveUnprotectData, is called in a peculiar way.

It’s called twice, with five arguments, none of these arguments point at the save data itself, but at the 360 byte blob at the end of the save file. I suspect that this process is actually decrypting some memory rather than hashing the save itself, the end result is that a CRC32 hash of a part of the save is extracted, then compared against. By hashing the save and providing the valid CRC32 in the result of a replaced XLiveUnprotectData we can get past this validation, allow us to load other people’s saves as well as letting us modify our saves.

For the new version of the wrapper:

  • Multiplayer functionality of GTA IV is now forcefully disabled, to prevent usage of my wrapper to cheat in multiplayer. Yeah, sorry, I’m not going to encourage it.
  • Protected buffers have slightly changed to better organize them, they are a single block of data rather than two now (this is only really useful if you’re writing a trainer for use with my wrapper).
  • A new tool, CopyXLiveResources, is now provided to fix the invisible Games For Windows interface in-game. You do not have to use this tool if you do not want to.
  • Save validation is now disabled, you can load any save. Note: This will not magically fix any form of corruption on your save files if they are corrupted.

Note: the save validation “feature” of this version of my wrapper now potentially makes it incompatible with any other game, and previous version of GTA IV. This version of the wrapper was made with GTA IV 1.0.1.0 in mind, if there are compatibility issues with previous versions I have no plans to support them.

XLive Wrapper (1.2.0.7) for GTA IV (1.0.1.0)

I have only tested my wrapper locally. There could be unforeseen issues that I have not expected, if you experience any bugs feel free to comment this post.

Tags: ,

241 Responses to “Hacking Grand Theft Auto IV: Part III”

  1. unknow says:

    where do i exstract the files to .. it says directory … (im new to this ) whats the directory??

  2. unknow says:

    and when the question comes up its says this wil copy rescores to ….
    to…. but its not gta its a weird load of numbers and $ …? anyone?

  3. Crank says:

    Hansi ich hab genau das gleiche problem, bin grad am ausprobieren, vllt find ich einen weg, wenn ja schreib ich ihn hier rein!!

  4. drbob says:

    Hey Rick!

    I don’t see the point why you don’t want to help with this ping issue (if you can)…not everyone using hamachi is a pirate, and I don’t wanna play through Microf*ckLi(v)es, ‘coz it’s not available in my country…so here I am, bought a GTA4, and can’t play online with my friends (who bought this game too) whe the live services will be available in Hungary, only God knows…so if you really have a soplution for this, then please help us

    –written in the name of all hungarian gamers, who are against piracy, but wanna enjoy dem game deh! raaasclaaat!

  5. GameKiller says:

    # Save validation is now disabled, you can load any save. Note: This will not magically fix any form of corruption on your save files if they are corrupted.

    So I got a problem with this. Usually, the savegame file is located C:\Users\%Active_User%\AppData\Local\Rockstar Games\GTA IV (Vista). But there isn’t a folder called “AppData”.

  6. Silent says:

    Thanks Rick!!
    After i lost my old saves due to system maintenance i was able to use some backups and gta runs again, thanks mate!! i jsut had to update to 1.0.1.0 and load the new “FeDor”!

  7. for lulz says:

    Hello, i’m not able to play in LAN with my brother as i found it’s ping issue,so i’m not sure waht to do…We have 4 computers connected though router via wifi,so first i was thinking that disconecting 2 of them will help to reduce lag, but it don’t…Does wrapper fix it?

  8. hansi says:

    @Crank: ja, bitte tu das ๐Ÿ™‚
    habe auch noch keine lรถsung gefunden, die ich prรคsentieren kรถnnte :-/

  9. Homeboy says:

    seitdem ich das savegame und den wrapper habe kann ich nicht mehr multiplayer spielen !!!
    warum ????

    nirgends in dem txt stand das das nicht mehr geht dann !!!!!

    was mach ich denn jetzt ?

    wie mach ich alles wieder korrekt rรผckgรคngig, damit ich wieder normal online spielen kann ???

    plzzzzz Help !!!!

  10. Gonzalo says:

    Hi all, i have a big problem with GTA IV and Xlive I don’t know if you can or know solve it. My problem is that i can’t play online to GTA IV because the game crash when it try to download the profile of xlive. I can play with profile in mode offline without problems.
    The game is original (i bought it) and I tried to update all, drivers, xlive versions, patch GTA IV etc now I have tried with your library but the problem is the same.
    i have that my problem is my S.O that is windows vista home 64, the log of error tell me some about “Title GTAIV.exe (1, 0, 1, 0) XLive 2.0.0673.0 (PANORAMA_V2.00_RTM.081028-1714) C:\Windows\system32\xlive.dll
    0x80151103

    XLive Logon Failed”

    the reality is that i can make logon from windows to xlive but doesn’t from GTA i believe that the problem is that W.vista has xlive.dll in other folder c:\windows\sysWOW64 and not C:\Windows\system32\

    any idea?
    thanks for all

  11. Gonzalo says:

    Other topic, yerterday when i tried to connect to mode online from my profile offline and crash i lost my profile offline with my savegames, do you know if is possible to restore it? i don’t know how but the profile now doesn’t exist.

    Thanks

  12. gcxd says:

    I got problems on Vista x64 :'(

  13. gcxd says:

    In fact, GTAIV crashes when it comes to an automatic save on my Vista x64 Ultimate SP1.

  14. inZa says:

    Works perfectly, thank you!!

  15. Southwind says:

    Thank you rick ๐Ÿ˜€
    You did a great job here ๐Ÿ˜€

  16. Lahiru says:

    Dude…i just want to know how this WRAPPER thing works!

    I have ma old saved files with me i got from “/Local Settings/Application Data/Rockstar Games”

    how can i restore those files to the game??

    NOTE: Im using a pirated version of GTA IV.

  17. […] permalink You can find the savegame files in Local SettingsApplication DataRockstar GamesGTA IV You’ll need the XLive Wrapper to use your older save games – Rick’s Game Stuff Blog Archive Hacking Grand Theft Auto IV: Part III […]

  18. super.gt says:

    THIS THING WORKS!!!! love u man, u are my fuckin hero ๐Ÿ˜›

  19. EN9800GT says:

    Hey.

    I want to reinstall my Windows XP. So I want to keep my savefile. And I still want to be able to play multiplayer. How can I do this? With this Wrapper? Because multiplayer is disabled… with this

    Also if I want to use my savegame on an another computer (I’ve 2 computers) with same account Windows Live and Social club, how can I do this without disabling multiplayer? And without having to change my account?

  20. Hari says:

    Y my screen starts shaking without drinking and man and car gone out of control when i m playing gta 4 with xlive.dll and when i delete that file that thing fixed and i am using gta 4 v1.0.1.0

  21. Eirik says:

    when i start the wrapper it says ”could not write program files/rockstar games/grand theft auto IV/xlive.dll”

    what do i do?

  22. Napalm_Death says:

    Worked fine on my recently installed vista ultimate x64.
    thank you very much

  23. babooom says:

    i got a problem to launch gta 4 when i click the play on RGSC this error comes up ”SecuLauncher: failed to start application. [2000]”

    what i do?

  24. Hondara says:

    great work, i love this xlive wrapper, works perfect for me (XP-SP3) even with my GTA4 1.0 without patch.
    And after patching GTA4 it still works perfect, great job!

    I also have a question: can you please make a tool for converting the .rpf files in pc/audio/Sfx to wav or mp3?
    Or do you now a way for doing this?
    I can’t figure out how. ๐Ÿ™
    Sorry for posting and asking this here, but i can’t find a email or contactform, any help would be appreciated, thanks a lot in advance!

  25. sna696 says:

    Hi Rick!
    Due to insane requests like “How to resume previous saved files” I’ve write a personal guide.
    My guide explain how to use your wrapper on Windows XP, Vista x86 and Vista x64 (x64 runs perfectly with some attention about).
    I tried to write as my best.
    I guess this will be useful ๐Ÿ™‚

    Download: http://rapidshare.com/files/182513676/gtaiv_restoresaves.rar

  26. Shun says:

    Do not use, it’ll copy itself in different places and fuck your game up. Deleting it wont do shit. Game still crashes, thanks.

  27. Rick says:

    It does not copy itself anywhere, it copies the xlive.dll to another location with a different name so that the normal xlive can be loaded without problems. It even ASKS you where it will copy it to.

  28. Shun says:

    It creates issues with bink32.dll loading, I have a trainer which uses bink32 to launch itself.

    Right now I can’t launch any bink32 other then the original. I’m trying to fix this with no avail.

  29. Shun says:

    Seemed to have something to do with trainer overlaying, I’ve fixed it somehow.

  30. zdenek says:

    THX for the wrapper, works perfectly. I had to reinstall my Vista, so it was VERY useful for me !!!!

  31. yannic says:

    GTA crashes after it asks me to log in into an windows live account(I’m using an offline account)… The problem is that the CopyXLiveResources.exe doesn’t work because the xlive.dll is located at C:\WINDOWS\SysWOW64\ not at system32.(OS: Windows xp x64). I copied the C:\WINDOWS\SysWOW64\xlive.dll to the system32 folder but CopyXLiveResources.exe still fails to load the file.
    CopyXLiveResources.exe modifies the xlive.dll in the gta folder , right ? So can somebody upload the modified ,please? Or has somebody another resolution?…

  32. […] Suche Spielstand / Savegame Der Link dort zum Wrapper stimmt aber nicht mehr, den gibt es hier: Rick’s Game Stuff Blog Archive Hacking Grand Theft Auto IV: Part III __________________ <— Holdrios blaue Geliebte […]

  33. Havoc says:

    Thanks. I have already started again, this “fix” has saved me from doing so again. The savegame location is not copied when you have a roaming profile. WTF rockstar your pissing off the people that made your company!

  34. hey dude,

    very nice program you created to use “old” savegames… i reinstalled the game and saved my saves but at first they didnt load… thanks to you i wont have to play it all again
    it works very nice and also with the newest game update

    thanks alot

    Robert-Jan

  35. User 101 says:

    WOW, you ROCK… you are my GOD!

    I was 3/4 done GTA and after a Windows reinstall I sure as hell did not want to do every mission all over again. Thank you so much. Works like a charm.

  36. User 442 says:

    Thanks so much for doing the work that Rockstar / Shit for Windows LIVE had been doing in the first place. Now i can use my old savegames. Thank you very much! It even worked with the 2nd patch, i had no problems afterall, and after deleting the files i can also play online. Nice Work!

  37. George says:

    Hi Rick…well i have downloaded your file to make a gta control center work…
    so i extracted the files in the gta directory and didn’t run the exe file….
    when i start the game it says: question : u want to copy the 2 files xlive.dll and xlive.dll.CAT in my C/documents and seetings/bla bla……if i press yes will the game play and my windows play normal?
    sorry if u dont understand….if u can reply to my mail..
    thnx

  38. Rick says:

    Yes it will work fine, that is normal behavior.

  39. ๋„ˆ๊ฑฐ์—„๋งˆ says:

    ๋‹ˆ๊ธฐ๋ฏธ ์”จ๋ฐœ๊บผ

  40. ๋„ˆ๊ฑฐ์—„๋งˆ says:

    ๋ณ‘์‹ ์ข†๊ฐ™์€ ์–‘ํ‚ค ์ฝ”์Ÿ์ด์ƒˆ๋ผ๋“ค ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹

  41. Noize says:

    nais tool! but does it work with v1.0.2.0 or does it need an update? would appreciate that!

  42. boogie101 says:

    Thou art my hero! I thought I was going to have to start the game from the beginning (after about 25 hours play time). Thanks dude!

  43. April18 says:

    Thanks. You just saved my day

  44. Teriyaki Asthma says:

    I heard it’s a great tool, but unfortunately it’s not working for me. I’m also getting the “Could not write program files/rockstar games/grand theft auto IV/xlive.dll” error. I’ve tried it several ways, always the same error. I also couldn’t find any solutions. I hope someone here can help me/us. I’m using Vista x64 and GTA IV with patch version #2.

  45. Rick says:

    Are you getting that error when you run CopyXLiveResources.exe? If you are, try running it as admin.

  46. Teriyaki Asthma says:

    Thanks for the quick answer Rick. That little trick worked out for me! I always thought I have an administrative account, but I still had to run the CopyXLiveResources.exe as admin, and it worked perfectly! Thanks again for your answer and the tool!

  47. Kaya says:

    This works! Thanks!

  48. Elgydium says:

    HEY RICK, I realised u dont answer to everyone, but i sat and read all the threads/quotes here and I found out I’m having the same problem as Pencil did, (i cant connect to multyplayer though im connected to live and i can talk thru messages to friends that are online) why is that? please help me or give me pencil’s mail.thx in advance

  49. Elgydium says:

    p.s. it’s a damn shame i spent 70euros on this game to play online and thx to ur xlive wrapper now that’s blown.

  50. Elgydium says:

    ok, thx to sna696 which i think he’s Italian, i owe him my gratitude, the last line of his guide for Windows XP really saved me, now i can play online!!!
    U MADE ONE MISTAKE THOUGH, INSTEAD OF SAYING:

    9) Now you can uninstall the wrapper for enable multiplayer game:
    – Copy CopyXLiveResources.exe and xlive.dll by the GTA IV installation folder to this path:
    C:\Document and Settings\\Local\Application Data\Rockstar Games\GTA IV\

    IT SHOULD BE:

    9) Now you can uninstall the wrapper for enable multiplayer game:
    – “CUT” CopyXLiveResources.exe and xlive.dll by the GTA IV WITHIN THE installation folder to this path:
    C:\Document and Settings\\Local\Application Data\Rockstar Games\GTA IV\

    cheers mate ๐Ÿ™‚
    gamertag: elgydium