From ed6851d07c8ab2f6136513eb05349bf55c5ba172 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 27 Oct 2026 20:09:58 +0000 Subject: [PATCH] Decompile 2 functions in Source/Utility/GGHash.cpp, Source/Utility/GGHash.h Batch #1128 by eAthena: 2 byte-identical, 0 confirmed by peer review. - fn_00113 CGGHash::GetSize: byte-identical - fn_00114 CGGHash::GetError: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Utility/GGHash.cpp --- Source/Utility/GGHash.cpp | 17 +++++++++++++++++ Source/Utility/GGHash.h | 35 +++++++++++++++++++++++++++++++++++ data/compile.json | 1 + 3 files changed, 53 insertions(+) create mode 100644 Source/Utility/GGHash.cpp create mode 100644 Source/Utility/GGHash.h diff --git a/Source/Utility/GGHash.cpp b/Source/Utility/GGHash.cpp new file mode 100644 index 0000000..d6d0723 --- /dev/null +++ b/Source/Utility/GGHash.cpp @@ -0,0 +1,17 @@ +#include "Utility/GGHash.h" + +// OFFSET: 0x004012B0 + +// 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: 0x00401AC0 diff --git a/Source/Utility/GGHash.h b/Source/Utility/GGHash.h new file mode 100644 index 0000000..885f564 --- /dev/null +++ b/Source/Utility/GGHash.h @@ -0,0 +1,35 @@ +#ifndef RAGNAROK_SOURCE_UTILITY_GGHASH_H +#define RAGNAROK_SOURCE_UTILITY_GGHASH_H + +#include +#include + +class CGGHash { +public: + CGGHash(); + virtual ~CGGHash(); + + DWORD GetSize() const; + DWORD GetError() const; + +protected: + // INLINED + void Clear() { + this->m_error = 0; + this->m_size = 0; + if (this->m_data) { + std::free(this->m_data); + this->m_data = nullptr; + } + } + + /* 0004 */ DWORD m_error; + /* 0008 */ DWORD m_size; + /* 000C */ BYTE* m_data; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CGGHash) == 16); +#endif + +#endif diff --git a/data/compile.json b/data/compile.json index 1e31473..9109cb1 100644 --- a/data/compile.json +++ b/data/compile.json @@ -629,6 +629,7 @@ "Source/Utility/Cipher/Rijndael.cpp": 0, "Source/Utility/Cipher/XorBytes.cpp": 0, "Source/Utility/FileSignatureVerifier.cpp": 0, + "Source/Utility/GGHash.cpp": 0, "Source/Utility/GuidParse.cpp": 0, "Source/Utility/Hash/MD5.cpp": 0, "Source/Utility/Hash/XxHash32.cpp": 0,