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 in mind, if there are compatibility issues with previous versions I have no plans to support them.

XLive Wrapper ( for GTA IV (

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. nocookies says:

    still no good on vista x64 system.

  2. Rick says:

    Do you get any dialog prompts before it crashes?
    Does a file called xlive_wrapper.log exist in the game directory, C:\Users\Your User\AppData\Rockstar Games\GTA IV, or your temp directory? If so, what are its contents?

  3. nocookies says:

    heh…i guess i should give more detail..lol yeah, see nothing. hd goes crazy. xlive_wrapper.log file exists but blank.

  4. ASM says:

    @Rick: Where did you get the xlive.pdb from?

  5. CaptBLK says:

    @Rick: Just thought I’d let you know your wrapper does work on A vista 64bit system, as this is what I am running. Fixing to try out your newest version. I’ll let you know if I run into any problems. Oh and I am running Vista home premium 64bit, if that helps any. Thanks again for all the hard work.

  6. Rick says:

    ASM: From Microsoft’s symbol server.
    CaptBLK: Oh, wonder what nocookies’s issue is then, odd.

  7. Zerofreeze says:

    Damn i never thought someone could hack the save validation
    This works like a charm i tested it out with one of gcw’s savegame
    Thanx alot now i never have to start from scratch 😀

  8. Zerofreeze says:

    Forgot to tell This Works on Windows XP SP3

  9. TOPEIRA says:


    i used this tool to import saves from my offline account to my online account and now i can play my offline saves in my online account BUT I CANT PLAY ONLINE!

    i want to undo the changes so i can play multiplayer again. how do i do this?!

  10. Rick says:

    Remove the xlive.dll that you extracted? Duh?

  11. sirConnel says:

    first great job rick 😉
    i got one problem.. if i put the xlive.dll in the gta directory, gtaiv.exe wont start anymore. how i can slove this? any ideas ?
    maybe SecuROM protect the directory ?


  12. Rick says:

    I havn’t had that issue myself, I don’t know. You are using GTA IV right?

  13. sirConnel says:

    yes im using orginal GTA IV v

  14. Rick says:

    The original version is, not And sorry I don’t know what’s wrong, it starts fine for me and I guess, everyone else.

  15. TOPEIRA says:

    ok, i deleted both xlive.dll AND xlive_wrapper.txt adn now i can play online was well.

    thanks for that tool, mate. really helped! u r a saint.

  16. Rob says:

    Hi Rick.
    Do you work with Cheathappens?
    Your technology works well and I believe if you do not, you should apply to work with them directly on their projects.
    Memory protection is going to get much more complicated in the near future and we need to bring everyone together communicating.

  17. Rick says:

    I have an account there but no I don’t work with them.

  18. Craig says:

    My game crashes at the black screen that asks to load my gamer profile.. says this under details of crash:
    Critical runtime problem
    Problem signature:
    Problem Event Name: APPLICATION CRASH

    Running vista home premium x86

  19. Rick says:

    What black screen that asks you to load your gamer profile? Try doing that before using the wrapper.

  20. Craig says:

    This black screen:

    If I click enter, with the wrapper, the game crash.
    Without the wrapper it loads up the games for windows menu and shows me my profile so I can login it.
    do I need to login my profile another way?

  21. Rick says:

    Try logging in with a profile before using the wrapper so it’s logged into that when you start the game with the wrapper.

  22. Rick says:

    Oh, I suspect why it crashes: did you run CopyXLiveResources? If you didn’t, then the wrapper will not have the resources to display the Games For Windows interface, and this is probably why it crashes.

  23. Craig says:

    I see, yeah I didn’t run it, but instead I just linked my social club account to my profile so it would be logged in before I entered the game with the wrapper. Didn’t think about it before lol.
    Anyway now the new saves work perfectly. Thank you for this awesome tool.

  24. mikbelo says:

    HI Rick , i wanna ask u about the problem of ping limit in gta iv , when someone try to enter in a server wich has more than 24 ms ( ping ), then he is kicked out . so any solution for this ? ( i know its a big job that i ask u about , but plz i m dreaming of having a solution for this )

  25. i think that this is not cleint part , and if im a right – we have no chance to remove this sh*t

  26. mikbelo says:

    Strange ! maybe i haven t understood , we could save game before, why this wrappper , the one who gives it to me though it was the fix for the ping limit ! and gives me the site gamecopyworld to download it from !!!

  27. mikbelo says:

    someguys had problem while trying to save ? and this wrappper fix it ! so if it is like that then the ping limit guesss has a relation with xlive so maybe u can do something to fix problem of guys like me ‘ping limit ‘ plz plz plz try to do something .

  28. mikbelo says:

    hey Gears Of War has the same problem ( evryone get kicked because they haven t less than 25 ms like in gta IV) but now there is a fix for it , maybe it will help u for fixing gta iv AND THANK U SO MUCH

  29. sirConnel says:

    nmh :/ someone got the same problem ?? that GTA don’t start with the xlive.dll

  30. asd says:

    “hey Gears Of War has the same problem ( evryone get kicked because they haven t less than 25 ms like in gta IV) but now there is a fix for it , maybe it will help u for fixing gta iv AND THANK U SO MUCH”

    yeah that would be great^^

  31. Rick says:

    I’m going to assume you’re talking about LAN play, in which case, I’m not going to help you disable the ping limit so you can play over Hamachi.

  32. mikbelo says:

    Rick , Why Not ?! many guys have problem while trying to connect with each other via lan ( i mean the real local area network ) kuz they use WIFI so they get kicked ! and if u r talking about hamachi ! there is many guys playing it via hamachi with ping less than 25 ms but me i can t !!! it s like i m 1 % and they r 99 % so just save the 1 per cent Brotha :'(

  33. gaga11 says:

    by putting the xlive.dll in my gta directory and accepting the file copy request i should be able to load savegames that were made with a different account?
    i have tried it but it didnt work, gave me that standart error when i was trying to load the savegame.

    i made a backup of my savegames before upgrading my OS to vista x64

    so does this actually work on 64bit OS or am i doing something wrong?

  34. gaga11 says:


  35. pajikA says:

    Hi, i can´t load the savegame i wanted, when xlive.dll is in game´s directory i cannot login because the game will crash,i have yes, what can i do? is there a way to apply the changes made by xlive.dll again?thank you

  36. pajikA says:

    hi, i really cant load the savegame, it says “load failed.please check your hard drive and try again”. what can i do? how did you guys do?can someone help me?many thanks

  37. Cesar says:

    i have a problem with games for windows live.i’ve updated this program and gta IV still tells me to update.what should i do?

  38. […] laden und danach mit speichern zum "eigenen" machen kann. Hier den XLive Wrapper saugen: Rick’s Game Stuff Blog Archive Hacking Grand Theft Auto IV: Part III Hier gibts eine gute Anleitung, nur der Link zum Trainer ist falsch, man braucht den Wrapper oben. […]

  39. zm says:

    the wrapper caused my GTAIV to have that black screen after intro screen delay.
    Process Explorer shows large number of ylive.dll being loaded, trashing hard disk.

  40. zm says:

    .. never mind. it’s not the wrapper.

    dont know what’s causing it though.

  41. dom says:

    Hi rick !

    i m having problems puting the files in the correct place. Please assist me from the start . pleaseee 🙁

  42. Ricardo says:

    sorry, but what this really does?
    please answear 🙂

  43. Vince says:

    invalid argument = value of 3567472 is not legal for selectedIndex
    parameter name : selected index

    ??? is some kind of error in gta IV control center.

    Do you know anything about ?

    Please reply at @-mail

  44. Pencil says:

    I have a problem after using your xlive.dll and the CopyXlive thing.
    I successfully load my old save in offline account to my xlive online account and I’m happy but I found out that I can’t go to play multiplayer. WHen I bring up the phone it says I need to be connected to Windows LIVE, but the problem is I’m ALREADY connected to live in order to load the save.

    Is there a solution to that?
    THanks for the dll anyway, I finally resurrect my old save.

  45. Pencil says:

    well, I just read your article and you said you disable multiplayer. But I want multiplayer I just use your xlive to load my old save, email me and I can show you the prove that I have legit copy and I need multiplayer. Please~

  46. Pencil says:

    hahahaha, nvm Rick. I solved it myself. I don’t need your dll now. *YAYA*

  47. nikes says:

    ei rick!!Thanks a lot,it works on my GTA4 saves with vista 64bit.I reformatted my pc and only backed up the save game and not the xlive files,but with your wrapper,it now works!!thanks a lot!!saved a lot of time repeating all the missions thanks to you,more power!!!you rock!!

  48. unknow says:

    im also having trouble in were i put the x live ??? can u help ??

  49. mike says:

    come on PLEASE fix the LAN ping limiter???

  50. hansi says:

    happy new year!! 2 everyone here.

    on xp64 (sp3, german) CopyXLiveResources.exe does not work.

    it says:
    Failed to Load:

    after pressing “Ja” (Yes) on the Question-Dialogue:

    This will copy resources from

    Is this OK?

    [Ja] [Nein]

    it worked on xp32 (sp3, german) on the same computer. but i now installed xp64 and wonder, why its not working.

    any ideas?

Leave a Reply