diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index a79be494a..9beddeb7f 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -101,27 +101,24 @@ void __fastcall mpqapi_update_multi_creation_time(DWORD dwChar) { } -BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, int dwLen) +BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen) { - int v2; // ebx - char *v3; // ebp - char *v4; // edi - unsigned int v5; // esi - char *v6; // ecx + char *pbCurrentData; + DWORD i; + char *pbDataToXor; - v2 = dwLen; - v3 = pbData; - v4 = pbData; - if ((unsigned int)dwLen >= 8) { - v5 = (unsigned int)dwLen >> 3; + pbCurrentData = pbData; + if (dwLen >= 8) { + i = dwLen >> 3; do { - v6 = v4; - v4 += 8; - mpqapi_xor_buf(v6); - --v5; - } while (v5); + pbDataToXor = pbCurrentData; + pbCurrentData += 8; + mpqapi_xor_buf(pbDataToXor); + --i; + } while (i); } - return SRegSaveData("Diablo", "Video Player ", 0, (unsigned char *)v3, v2); + + return SRegSaveData("Diablo", "Video Player ", 0, (unsigned char *)pbData, dwLen); } void __fastcall mpqapi_remove_hash_entry(const char *pszName) diff --git a/Source/mpqapi.h b/Source/mpqapi.h index 5d6046ea8..71d2c05bc 100644 --- a/Source/mpqapi.h +++ b/Source/mpqapi.h @@ -11,7 +11,7 @@ void __fastcall mpqapi_store_creation_time(const char *pszArchive, int dwChar); BOOLEAN __fastcall mpqapi_reg_load_modification_time(char *dst, int size); void __fastcall mpqapi_xor_buf(char *pbData); void __fastcall mpqapi_update_multi_creation_time(DWORD dwChar); -BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, int dwLen); +BOOLEAN __fastcall mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen); _BLOCKENTRY *__fastcall j_mpqapi_remove_hash_entry(char *pszName); void __fastcall mpqapi_remove_hash_entry(const char *pszName); void __fastcall mpqapi_free_block(int block_offset, int block_size);