|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Detecting corrupt race files |
Sat, 15 May 2021 02:34 |
|
ricks03 | | | Messages: 225
Registered: January 2012 Location: NC | |
|
Testing with the decrypted data for Block 8, block 6, and Block 0
Some notes for the r file:
Block 8 in the race file changes bytes 12/13 when you save (the encryption seed). Saving a race again, even if you don't change anything, generates different Byte 12/13 in block 8.
Identical races create identical checksums in Block 0, even if the Block 8 byte 12/13 are different.
Conclusion: Block 8 doesn't matter for the checksum, it's only Block 6
Let's say the race name is "0".
Adding the same character ("0") at a time to the singular name, the two bytes in block 0 (the checksum) changes the value(s) in a VERY consistent pattern. So singular race name "0", "00", "000", "0000", etc to 16 characters
a b
a c
d c
d b
a b
a c
d c
d b
a b
a c
d c
etc
With a name of "0", add a 0 to the name ("00") makes the checksum:
BLOCK:0,Offset:138,Bytes:2 DATA DECRYPTED:248 92
If instead adding a 1 to the same name ("01") makes the checksum
BLOCK:0,Offset:138,Bytes:2 DATA DECRYPTED:248 93
If instead adding a 2 to the same name ("02") makes the checksum
BLOCK:0,Offset:138,Bytes:2 DATA DECRYPTED:248 94
So the second byte is increasing by the same amount as the value of the new character.
Adding a "Z" ("0Z")
BLOCK:0,Offset:138,Bytes:2 DATA DECRYPTED:248 54
adding a "!" ("0!")
BLOCK:0,Offset:138,Bytes:2 DATA DECRYPTED:248 77
Conclusion: the second byte is directly related to the value of the character added to the name, in the "0100000000000000" position in this case
A name of 1010101010101010 generates a value of
BLOCK:0,Offset:151,Bytes:2 DATA DECRYPTED:200 92
Where a name of 0101010101010101
BLOCK:0,Offset:151,Bytes:2 DATA DECRYPTED:200 93
The difference in the offset of 1s is the same difference as between "00" and "01".
https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHostReport message to a moderator
|
|
|
|