rodecomp/Source/Utility/GGHash.cpp
ragnarok-clanker d0e1791277 Decompile fn_00115 (CGGHash::Load)
Batch #1348 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review.

- fn_00115 CGGHash::Load: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
2026-10-28 11:04:53 +00:00

57 lines
996 B
C++

#include "Utility/GGHash.h"
#include "Utility/FileSignatureVerifier.h"
#include "Utility/MD5.h"
#include <cstdint>
#include <cstdlib>
struct GGHashEntry {
std::uint32_t nameHash;
std::uint32_t fileHash;
};
// OFFSET: 0x004012B0
// FUNCTION: fn_00109
CGGHash::CGGHash() : m_error(0), m_size(0), m_data(nullptr) {
}
// OFFSET: 0x00401300
// OFFSET: 0x00401640
// OFFSET: 0x00401730
// OFFSET: 0x00401870
// FUNCTION: fn_00113
DWORD CGGHash::GetSize() const {
return this->m_size;
}
// OFFSET: 0x00401880
// FUNCTION: fn_00114
DWORD CGGHash::GetError() const {
return this->m_error;
}
// OFFSET: 0x004018C0
// FUNCTION: fn_00115
BOOL CGGHash::Load(const char* filename) {
WCHAR wideFileName[260];
MultiByteToWideChar(CP_ACP, 0, filename, -1, wideFileName, 260);
return this->Load(wideFileName);
}
// OFFSET: 0x00401920
// OFFSET: 0x004019E0
// OFFSET: 0x00401AC0
// FUNCTION: fn_00118
CGGHash::~CGGHash() {
this->Clear();
}
// OFFSET: 0x00401B10
// OFFSET: 0x00401BB0