Help with figuring out the checksum in this save...
I'm trying to write a save editor for the newly released PC version of Agarest Generations of war, and it was going well until I realised there's some kind of checksum on the save and so far I have not been able to figure out which algorithm it is. I believe its the last 4 bytes but not 100% sure.
If anyone can offer help in figuring it, I would appreciate it.
I have attached a save.
Thanks :)
10-04-2013
kill_seth
Re: Help with figuring out the checksum in this save...
It's a fairly easy hash, you just need to add up each uint32 till you reach the hash.
public uint Compute(byte[] data)
{
uint sum = 0;
for (int i = 0; i < data.Length - 4; i+=4)
{
sum += BitConverter.ToUInt32(new byte[] { data[i], data[i + 1], data[i + 2], data[i + 3] }, 0);
}
return sum;
}
10-04-2013
Emerald Lance
Re: Help with figuring out the checksum in this save...
You're right that the hash is the last four bytes at the end. But it either doesn't match any 32-bit signature I have on hand (that is to say it isn't Adler32, checksum, or CRC32) or it doesn't read the whole file (either including or excluding the zeroed out hash bytes, I checked both). It could just be an addition hash. JizzaBeez released an awesome algorithm tool (here: http://www.360haven.com/forums/threa...lgorithm-tool/) and if your hash is a standard one then his tool WILL find it. Otherwise, somebody will have to crack the executable, and that's hard work.
10-05-2013
Killermiles
Re: Help with figuring out the checksum in this save...
Quote:
Originally Posted by kill_seth
It's a fairly easy hash, you just need to add up each uint32 till you reach the hash.
public uint Compute(byte[] data)
{
uint sum = 0;
for (int i = 0; i < data.Length - 4; i+=4)
{
sum += BitConverter.ToUInt32(new byte[] { data[i], data[i + 1], data[i + 2], data[i + 3] }, 0);
}
return sum;
}
What can I say, it's simple and it works! Thank you so much :)
Thanks also to Emerald Lance for taking the time to look for me :)
10-05-2013
Drinkie
Re: Help with figuring out the checksum in this save...
When you manage to get the editor up and running any chance we'll be able to modify our alignment, items, EP and TP?