From 4e738dea03fffb414e01f8acdd8039f7e7339b58 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 23:05:27 +0000 Subject: [PATCH] Decompile fn_20416 (MD5State::Init) Batch #1868 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_20416 MD5State::Init: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Utility/Md5.cpp --- Source/Utility/Md5State.h | 26 ++++++++++++++++++++++++++ data/compile.json | 1 + 2 files changed, 27 insertions(+) create mode 100644 Source/Utility/Md5State.h diff --git a/Source/Utility/Md5State.h b/Source/Utility/Md5State.h new file mode 100644 index 00000000..eef2491a --- /dev/null +++ b/Source/Utility/Md5State.h @@ -0,0 +1,26 @@ +#ifndef RAGNAROK_SOURCE_UTILITY_MD5STATE_H +#define RAGNAROK_SOURCE_UTILITY_MD5STATE_H + +#include +#include + +class MD5State { +public: + void Init(); + void Append(const unsigned char* data, int nbytes); + void Finish(unsigned char* digest); + + void Process(const unsigned char* data); + + /* 0000 */ std::uint32_t count[2]; + /* 0008 */ std::uint32_t abcd[4]; + /* 0018 */ unsigned char buf[64]; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(MD5State, abcd) == 0x08); +static_assert(offsetof(MD5State, buf) == 0x18); +static_assert(sizeof(MD5State) == 0x58); +#endif + +#endif diff --git a/data/compile.json b/data/compile.json index 3721fed3..ee6f1121 100644 --- a/data/compile.json +++ b/data/compile.json @@ -716,6 +716,7 @@ "Source/Utility/Math/ClientAngles.cpp": 0, "Source/Utility/Math/RadialGrid.cpp": 0, "Source/Utility/Math/RayTriangle.cpp": 0, + "Source/Utility/Md5.cpp": 0, "Source/Utility/NFileLog.cpp": 0, "Source/Utility/NIPAddr.cpp": 0, "Source/Utility/ProcessSecurity.cpp": 0,