View Full Version : Help with figuring out the checksum in this save...
Killermiles
10-04-2013, 08:06 PM
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 :)
kill_seth
10-04-2013, 09:37 PM
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;
}
Emerald Lance
10-04-2013, 09:46 PM
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/threads/1320-algorithm-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.
Killermiles
10-05-2013, 04:15 AM
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 :)
Drinkie
10-05-2013, 11:04 AM
When you manage to get the editor up and running any chance we'll be able to modify our alignment, items, EP and TP?
vBulletin Solutions, Inc. All rights reserved.