testing checksum after modify

This commit is contained in:
Hash Borgir 2022-06-04 05:55:41 -06:00
parent 6b4b0c564e
commit 521dfe12c6

View File

@ -266,7 +266,7 @@ $fp = fopen($filename, "rb+");
$filesize = filesize($filename);
$pucData = file_get_contents($filename);
// ddump($pucData);
ddump(unpack('C*', $pucData));
// pucData - pointer to the byte stream of the .d2s file
// iSize - number of bytes in the stream ( filesize )
@ -278,7 +278,8 @@ function checksum($fp, $pucData, $iSize, $xorTableHex) {
$uVar = 0xFFFFFFFF;
for($i=0;$i<$iSize;$i++) {
// $hex = strtoupper(bin2hex($pucData[$i])); // getting correct bytes here, matches file in hex editor
// $hex = strtoupper(bin2hex($pucData[$i]));
// getting correct bytes here, matches file in hex editor
// dump((strtoupper(dechex($xorTableHex[$hex]))));
// uVar1 = uVar1 >> 8 ^ DWORD_ARRAY_6fd2a248[(uint)*param_1 ^ uVar1 & 0xff];