Browse Source

mpq_rename bin exact

pull/78/head
JustAnotherGuid 7 years ago committed by Anders Jenbo
parent
commit
fc5468db3c
  1. 27
      Source/mpqapi.cpp

27
Source/mpqapi.cpp

@ -449,21 +449,18 @@ int __fastcall mpqapi_find_free_block(int size, int *block_size)
void __fastcall mpqapi_rename(char *pszOld, char *pszNew) void __fastcall mpqapi_rename(char *pszOld, char *pszNew)
{ {
char *v2; // esi int index, block;
int v3; // eax _HASHENTRY *hashEntry;
_HASHENTRY *v4; // eax _BLOCKENTRY *blockEntry;
int v5; // ST00_4
_BLOCKENTRY *v6; // edx index = mpqapi_get_hash_index_of_path(pszOld);
if (index != -1) {
v2 = pszNew; hashEntry = &sgpHashTbl[index];
v3 = mpqapi_get_hash_index_of_path(pszOld); block = hashEntry->block;
if (v3 != -1) { blockEntry = &sgpBlockTbl[block];
v4 = &sgpHashTbl[v3]; hashEntry->block = -2;
v5 = v4->block; mpqapi_add_file(pszNew, blockEntry, block);
v6 = &sgpBlockTbl[v5]; save_archive_modified = TRUE;
v4->block = -2;
mpqapi_add_file(v2, v6, v5);
save_archive_modified = 1;
} }
} }
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;

Loading…
Cancel
Save