mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
testing checksum after modify
This commit is contained in:
parent
6b4b0c564e
commit
521dfe12c6
@ -266,7 +266,7 @@ $fp = fopen($filename, "rb+");
|
|||||||
$filesize = filesize($filename);
|
$filesize = filesize($filename);
|
||||||
$pucData = file_get_contents($filename);
|
$pucData = file_get_contents($filename);
|
||||||
|
|
||||||
// ddump($pucData);
|
ddump(unpack('C*', $pucData));
|
||||||
|
|
||||||
// pucData - pointer to the byte stream of the .d2s file
|
// pucData - pointer to the byte stream of the .d2s file
|
||||||
// iSize - number of bytes in the stream ( filesize )
|
// iSize - number of bytes in the stream ( filesize )
|
||||||
@ -278,7 +278,8 @@ function checksum($fp, $pucData, $iSize, $xorTableHex) {
|
|||||||
|
|
||||||
$uVar = 0xFFFFFFFF;
|
$uVar = 0xFFFFFFFF;
|
||||||
for($i=0;$i<$iSize;$i++) {
|
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]))));
|
// dump((strtoupper(dechex($xorTableHex[$hex]))));
|
||||||
|
|
||||||
// uVar1 = uVar1 >> 8 ^ DWORD_ARRAY_6fd2a248[(uint)*param_1 ^ uVar1 & 0xff];
|
// uVar1 = uVar1 >> 8 ^ DWORD_ARRAY_6fd2a248[(uint)*param_1 ^ uVar1 & 0xff];
|
||||||
|
Loading…
Reference in New Issue
Block a user