Browse Source

Clean up mpqapi_store_modified_time.

pull/133/head
Sergey Semushin 7 years ago
parent
commit
b0e75bc028
  1. 22
      Source/mpqapi.cpp

22
Source/mpqapi.cpp

@ -574,28 +574,20 @@ void CloseMPQ(const char *pszArchive, BOOL bFree, int dwChar)
void mpqapi_store_modified_time(const char *pszArchive, int dwChar) void mpqapi_store_modified_time(const char *pszArchive, int dwChar)
{ {
int v2; // esi HANDLE handle;
const char *v3; // ebx struct _WIN32_FIND_DATAA FindFileData;
HANDLE v4; // eax char dst[160];
int v5; // esi
struct _WIN32_FIND_DATAA FindFileData; // [esp+8h] [ebp-1E0h]
char dst[160]; // [esp+148h] [ebp-A0h]
v2 = dwChar;
v3 = pszArchive;
if (gbMaxPlayers != 1) { if (gbMaxPlayers != 1) {
mpqapi_reg_load_modification_time(dst, 160); mpqapi_reg_load_modification_time(dst, 160);
v4 = FindFirstFile(v3, &FindFileData); handle = FindFirstFile(pszArchive, &FindFileData);
if (v4 != INVALID_HANDLE_VALUE) { if (handle != INVALID_HANDLE_VALUE) {
FindClose(v4); FindClose(handle);
v5 = 16 * v2; *((FILETIME*) (dst) + dwChar * 2 + 1) = FindFileData.ftLastWriteTime;
*(_DWORD *)&dst[v5 + 8] = FindFileData.ftLastWriteTime.dwLowDateTime;
*(_DWORD *)&dst[v5 + 12] = FindFileData.ftLastWriteTime.dwHighDateTime;
mpqapi_reg_store_modification_time(dst, 160); mpqapi_reg_store_modification_time(dst, 160);
} }
} }
} }
// 679660: using guessed type char gbMaxPlayers;
void mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int dwChar) void mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, int dwChar)
{ {

Loading…
Cancel
Save