Posts Tagged ‘Tools’

Hacking Grand Theft Auto IV: Part II

Tuesday, December 16th, 2008

One of the features the Games For Windows API provides is protected buffers. These buffers can be allocated by games that use the API, and data can be copied back and forth from them. GTA IV uses this for a bunch of the game memory, for example, your current cash.

The following functions (thanks, xlive.pdb!), are what provide this feature to games:

  • int XLivePBufferAllocate(int size, XLiveProtectedBuffer **pbuffer)
  • int XLivePBufferGetByte(XLiveProtectedBuffer *pbuffer, int offset, unsigned char *value)
  • int XLivePBufferGetDWORD(XLiveProtectedBuffer *pbuffer, int offset, unsigned int *value)
  • int XLivePBufferGetByteArray(XLiveProtectedBuffer *pbuffer, int offset, void *destination, int size)
  • int XLivePBufferSetByte(XLiveProtectedBuffer *pbuffer, int offset, unsigned char value)
  • int XLivePBufferSetDWORD(XLiveProtectedBuffer *pbuffer, int offset, unsigned int value)
  • int XLivePBufferSetByteArray(XLiveProtectedBuffer *pbuffer, int offset, void *source, int size)
  • int XLivePBufferFree(XLiveProtectedBuffer *pbuffer)

By creating a fake xlive.dll which wraps the real xlive.dll, we can serve ‘unprotected’ versions of these 8 functions. In doing this, we can now freely modify at runtime the data that the game wants to be protected, including your current cash.

XLive Wrapper for GTA IV 1.0.0.1

Drop this into your GTA IV game directory (where GTAIV.exe resides), start the game, viola, unprotected memory!

(The first time you run the game, the wrapper will prompt you if it is OK to copy the original xlive.dll/xlive.dll.CAT unmodified to another location with a new name)

If you encounter any issues with the wrapper aside from the UI issue, please let me know!

The only side effect that I’ve seen so far is that the in-game UI for Games For Windows no longer appears, although the game continues to function normally (including multiplayer).

Part III will talk about save validation and include version 1.1.0.0 of the wrapper with this disabled :) .

GCFScape now supports VPK archives

Monday, November 24th, 2008

GCFScape can be found here.

Left4Dead is out

Monday, November 17th, 2008

And I’ve updated the Steam Achievement Manager games list to remove the demo & add the full game.

Left4Dead *.vpk Extraction Tools, now with UI

Friday, November 14th, 2008

A newer build of my VPK tool that now includes a UI. It also fixes handling of the ‘small data’ in the directory file that most *.vmt files were using instead of real files in one of the other package files. Please report any issues in comments, thanks. Edit: See this newer post for a newer build of tools.

The code for this is also now available on SVN.

Left4Dead *.vpk Extraction Tools Test

Thursday, November 13th, 2008

Here are some test binaries for extracting data from the *.vpk packages recently seen in the Left4Dead demo. Edit: See this newer post for a newer build of tools.

To use:

  1. Extract the *.dll and *.exe files to a directory, it doesn’t matter where.
  2. Click + dragdrop a _dir.vpk file onto Gibbed.Valve.ExtractPackage.exe.
  3. Files will be extracted to the directory the file you dragged is in, or the current directory if you invoke ExtractPackage in a console window.

I will probably get around to making a tool with a UI, but for now, this works. Source will also be provided pretty soon.

If any of you encounter any bugs please leave a comment here with information. This tool was tested with the most recent version of the Left4Dead demo, and may break with the full game files once it is out.

Steam Achievement Manager 4.0

Monday, November 10th, 2008

With a recent update to Steam, Steam Achievement Manager was broken again due to a change in the Steam API which requires a valid application ID in order to initialize the API. I’ve redone Steam Achievement Manager from scratch (well, reusing the older code in a new project) to reorganize it into a functional state again. There’s been a good amount of changes since 3.1, that include, but not limited to:

  1. The game picker now downloads a list of games that have achievements from my site which allows me to update the list of games without having to release a new version.
  2. The game picker downloads game logo images from the Steam website, and it looks pretty snazzy.
  3. It’s been broken up into two executables, SAM.Picker.exe and SAM.Game.exe, Picker is what lists and allows you to select a game, when a game is selected (double-clicked), it launches Game which allows you to alter the state of your achievements.

Now in version 4.0!

Lots of good changes. You can download the new version of Steam Achievement Manager on its page.

Also, new games listed as of 4.0:

  1. Bullet Candy
  2. D.I.P.R.I.P. Warm Up
  3. Galactic Bowling
  4. Gravitron 2
  5. Left 4 Dead Demo
  6. Mr. Robot
  7. Penny Arcade Adventures: On the Rain-Slick Precipice of Darkness, Episode Two
  8. Space Trader
  9. Spectraball
  10. Starscape
  11. Tank Universal
  12. World of Goo

Unstable FC2 tool binaries from SVN revision 4

Tuesday, October 28th, 2008

ArchiveViewer (and associated binaries). This fixes incompatability with x64 systems (an oversight on my part).

binaries-svn-rev4.zip