NFS Underground Money Editor
----------------------------

This small tool can change the amount of available money
in your bank during the Underground (career) play. It
patches directly game savefiles, so its even better, if
you do not run the game, but run it after patching :)
So, start MoneyEd, choose the folder, where player profiles
are stored (usually "C:Documents and SettingsAll Users
Application DataNFS Underground", there must be a few .ugd
files, which actually are player savegames), then pick up
savegame filename you want to change from the list, enter
new money count and press 'Change' button.


Technical Info
--------------
If you want to write another/better tools for savegame
patching, you might need to know, that savegames are actually
protected with a checksum, so if you make any changes to the
savefile, you must update the checksum. The structure of the
savegame file is as follows:

File Offset        Description
-----------------  -------------------------------------------
0...0x2F           Header (saving date/time, type, name, etc.)
0x2F...0xF68F      Binary saved data, length 0xF660
0xF68F...0xF693    4-byte checksum of the above block

Here I'll give sample code, that calculates the correct checksum.
This function has only one argument - pointer to the savegame
data, as it was read from the file:

int chksum(const unsigned char *savedata)
{
    int i, bt = 0, csum = 0, k = 1;
    if ( savedata != NULL )
    {
        savedata += 0x2F;
        for (i=0; i < 0xF660; i++)
        {
            bt = savedata[i];
            k = (bt + k) % 0xFFF1;
            csum = (csum + k) % 0xFFF1;
        }
        csum = (csum << 16) + k;
    }
    return csum;
}

I think the code is quite obvious if you took a look at
savefile format description.

                                     CoDe RiPPeR
mailto: This email address is being protected from spambots. You need JavaScript enabled to view it.
        This email address is being protected from spambots. You need JavaScript enabled to view it.