Okay, I've made some progress, but not alot. Something that is completely confusing me is the checksums that are supposedly getting generated. The code is as follows:
(= checkSum1 checkSumKey)
(for ((= whichSkill 0)) (< whichSkill (+ NUMSTATS CHECK_DATA)) (+= whichSkill 2))
(= [statsKey (+ whichSkill 1)] (& [statsKey (+ whichSkill 1)] 127))
(+= checkSum1 [statsKey (+ whichSkill 1)])
)
Now checkSumKey is a predetermined value, so don't worry about that. But I interpret this code as looping while whichSkill is less than NUMSTATS + CHECK_DATA, each loop incrementing whichSkill by 2. That's pretty staight foward, however the actual code in the loop:
(= [statsKey (+ whichSkill 1)] (& [statsKey (+ whichSkill 1)] 127))
(+= checkSum1 [statsKey (+ whichSkill 1)])
isn't quite as clear. It looks to me that the first line is setting the whichSkill + 1 element of statsKey equal to the logical AND of that exact same element and 127. But 127 is 1111111 in binary... so ANDing that with any other number will yield the same number! (i.e. 100 & 127 = 100). So why is this line being run? It seems to be doing nothing (unless my interpretation is wrong). At least the next line makes sense. I'm just continually adding the value stored in the whichSkill + 1 element of statsKey to the checksum, which will end up giving me something, but I haven't gotten as far as using actualy values to determine a checksum yet.
Anyone have any ideas?