From afc73a4db809af82b1d5f3595d90dcd9e84efec5 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 29 Oct 2026 18:10:55 +0000 Subject: [PATCH] Decompile fn_18137 (CGPak::ApplyAuxiliary) Batch #2550 by willerthal: 0 byte-identical, 1 confirmed by peer review. - fn_18137 CGPak::ApplyAuxiliary: logic confirmed by peer review Peer-reviewed-by: meitogi, youko Reviewed-by: ragnarok-clanker --- Source/Archive/GPak.cpp | 6 ++++++ Source/Archive/GPak.h | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/Archive/GPak.cpp b/Source/Archive/GPak.cpp index 2ce2d917..c362ca26 100644 --- a/Source/Archive/GPak.cpp +++ b/Source/Archive/GPak.cpp @@ -414,6 +414,12 @@ void CGPak::ReadAuxiliary(std::vector& output, std::uint64_t* iden } } +// OFFSET: 0x00AEC9F0 +// FUNCTION: fn_18137 +void CGPak::ApplyAuxiliary(const void* data, std::uint32_t size, const void* auxData, std::uint32_t auxSize) { + this->m_auxiliary.Apply(data, size, auxData, auxSize); +} + // OFFSET: 0x00E555A0 // FUNCTION: fn_24306 myGPack::CGPakUpdate::CGPakUpdate() { diff --git a/Source/Archive/GPak.h b/Source/Archive/GPak.h index 10529328..c7e6b090 100644 --- a/Source/Archive/GPak.h +++ b/Source/Archive/GPak.h @@ -28,6 +28,14 @@ namespace myGPack { } +struct PakAuxiliary { + void Apply(const void* data, std::uint32_t size, const void* auxData, std::uint32_t auxSize); + + /* 0000 */ std::uint8_t unknown_0000[244]; +}; + +static_assert(sizeof(PakAuxiliary) == 244); + class CGPak { public: CGPak(); @@ -38,6 +46,7 @@ public: bool Find(const myGPack::PakName& name, myGPack::PakEntry* entry) const; bool Extract(const myGPack::PakEntry* entry, void* buffer); void ReadAuxiliary(std::vector& output, std::uint64_t* identifier = nullptr); + void ApplyAuxiliary(const void* data, std::uint32_t size, const void* auxData, std::uint32_t auxSize); protected: bool ReadTableV1(); @@ -53,7 +62,7 @@ protected: /* 0024 */ std::vector m_entries; /* 0030 */ std::vector m_scratch; /* 003C */ CRITICAL_SECTION m_criticalSection; - /* 0054 */ std::uint8_t unknown_0054[244]; + /* 0054 */ PakAuxiliary m_auxiliary; }; #if defined(_WIN32) && !defined(_WIN64)