From f2eed45548cc777493f7ed0a5e10e2fb66197261 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 26 Oct 2026 22:07:43 +0000 Subject: [PATCH] Decompile 4 functions in Source/Archive/PakCipher.cpp, Source/Archive/PakCipher.h Batch #909 by ragnarok-clanker: 0 byte-identical, 4 confirmed by peer review. - fn_18102 myGPack::EncodeBlock: logic confirmed by peer review - fn_18103 myGPack::FinalPermutation: logic confirmed by peer review - fn_18104 myGPack::InitialPermutation: logic confirmed by peer review - fn_18131 myGPack::DerivePakKey: logic confirmed by peer review Reviewed-by: ragnarok-clanker --- Source/Archive/PakCipher.cpp | 8 ++++---- Source/Archive/PakCipher.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Archive/PakCipher.cpp b/Source/Archive/PakCipher.cpp index bc74959..71f5beb 100644 --- a/Source/Archive/PakCipher.cpp +++ b/Source/Archive/PakCipher.cpp @@ -263,7 +263,7 @@ namespace myGPack { // OFFSET: 0x00AE9260 // FUNCTION: fn_18104 - int __stdcall InitialPermutation(std::uint8_t* block) { + int InitialPermutation(std::uint8_t* block) { std::uint8_t result[8] = {}; for (unsigned i = 0; i < 64; ++i) { @@ -282,7 +282,7 @@ namespace myGPack { // OFFSET: 0x00AE91D0 // FUNCTION: fn_18103 - int __stdcall FinalPermutation(std::uint8_t* block) { + int FinalPermutation(std::uint8_t* block) { std::uint8_t result[8] = {}; for (unsigned i = 0; i < 64; ++i) { @@ -301,7 +301,7 @@ namespace myGPack { // OFFSET: 0x00AE9020 // FUNCTION: fn_18102 - int __stdcall EncodeBlock(int rounds, const std::uint8_t (*roundKeys)[8], std::uint32_t inputLow, std::uint32_t inputHigh, std::uint8_t* output) { + int EncodeBlock(int rounds, const std::uint8_t (*roundKeys)[8], std::uint32_t inputLow, std::uint32_t inputHigh, std::uint8_t* output) { std::memcpy(output, &inputLow, 4); std::memcpy(output + 4, &inputHigh, 4); InitialPermutation(output); @@ -372,7 +372,7 @@ namespace myGPack { // OFFSET: 0x00AEBC90 // FUNCTION: fn_18131 - std::uint8_t* __stdcall DerivePakKey(const char* name, std::uint8_t* key) { + std::uint8_t* DerivePakKey(const char* name, std::uint8_t* key) { const char* base = name; const std::size_t length = std::strlen(name); const char* const end = name + length; diff --git a/Source/Archive/PakCipher.h b/Source/Archive/PakCipher.h index ed3b4c9..359708a 100644 --- a/Source/Archive/PakCipher.h +++ b/Source/Archive/PakCipher.h @@ -19,10 +19,10 @@ namespace myGPack { }; static_assert(sizeof(PakCipher) == 128); - std::uint8_t* __stdcall DerivePakKey(const char* name, std::uint8_t* key); - int __stdcall InitialPermutation(std::uint8_t* block); - int __stdcall FinalPermutation(std::uint8_t* block); - int __stdcall EncodeBlock(int rounds, const std::uint8_t (*roundKeys)[8], std::uint32_t inputLow, std::uint32_t inputHigh, std::uint8_t* output); + std::uint8_t* DerivePakKey(const char* name, std::uint8_t* key); + int InitialPermutation(std::uint8_t* block); + int FinalPermutation(std::uint8_t* block); + int EncodeBlock(int rounds, const std::uint8_t (*roundKeys)[8], std::uint32_t inputLow, std::uint32_t inputHigh, std::uint8_t* output); }