I dont want to ask for help without showing how far I came by myself, so this is what I have so far:
The file of interest is an encrypted/obfuscated .bin script, which cotains information on certain weaponstats eg. damage or accuracy. It is part of an older computergame. The raw file containts only hexvalues, which I "converted" to their Characters using extended ASCII. The output wasnt satisfying at all, untill I found out, that it was obfuscated using single byte XOR. Since there are only 256 different possible ways I went manually through all of them and had success with Key 42. This is what the decrypted script looks like:
I made my own small Tool, which decrypts the file hex -> ascii -> xor decrypt and saves the changes with hex <- ascii <- xor encrypt. So right now I am able to manipulate some weaponstats and save the file into its previous format.
When I try to start the game with my manipulated file it appears a CRC checksum error and it wont start. I was aware about this and did some research already, the checksum used is definitely CRC32 and I found out, that you can force a files checksum to any value by appending 4 bytes, but it obviously wont work due to the file format:
The CRC32 checksum is now similar to the untouched file, but the game cant read it and doesnt start and this is where Im stuck.
So what to do now? In theory I should be able to make some changes with getting the same checksum using gaussian elimination, but I really need some help to point me into the right direction. It would be enough to change 1 hex-value as a first try and see what to change next to get the same CRC checksum. From there I could think about changing stuff, which makes sense in terms of manipulating weapons. So what if I change the very first hex-value in the file "16" to "17", what do I have to change next to get the old checksum back? Is that the right attemp? I am quiet new to all this, but I dont want to give up yet.
This folder contains the original file (items.bin) .txt to show in browser, an at 2 values maniuplated one and the plain text script. Original checksum is '3DD1ECB7'
Thanks in advance.
I add the file to here: http://www.mc-rp.net/crc/crc/ Seems like I have 2 approaches now, but Im stuck on both of them. Maybe some of you have trained eyes and can guess what stands behind this just by taking a look. I cant think of how this should end in 3DD1ECB7.
– dontjudge May 15 '15 at 23:05