From 9508353044c6fe758cbad6d1ed5702d463fc5533 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 16:52:42 +0000 Subject: [PATCH] Decompile 2 functions in Source/Utility/Cipher/CipherPrimitives.cpp Batch #16327 by youko: 2 byte-identical, 0 confirmed by peer review. - fn_18399 StoreLittleEndian32: byte-identical - fn_18400 LoadLittleEndian32: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Utility/Cipher/CipherPrimitives.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/Utility/Cipher/CipherPrimitives.cpp b/Source/Utility/Cipher/CipherPrimitives.cpp index fed00462b..f7ab20239 100644 --- a/Source/Utility/Cipher/CipherPrimitives.cpp +++ b/Source/Utility/Cipher/CipherPrimitives.cpp @@ -595,16 +595,20 @@ unsigned int* CryptonSetKey(const unsigned int* input, unsigned int keyBits) { // OFFSET: 0x00B0BDD0 // FUNCTION: fn_18399 void StoreLittleEndian32(unsigned int value, unsigned char* bytes) { - bytes[0] = static_cast(value); - bytes[1] = static_cast(value >> 8); - bytes[2] = static_cast(value >> 16); - bytes[3] = static_cast(value >> 24); + *bytes++ = static_cast(value); + *bytes++ = static_cast(value >> 8); + *bytes++ = static_cast(value >> 16); + *bytes = static_cast(value >> 24); } // OFFSET: 0x00B0C3D0 // FUNCTION: fn_18400 unsigned int LoadLittleEndian32(const unsigned char* bytes) { - return ((((static_cast(bytes[3]) << 8) | bytes[2]) << 8 | bytes[1]) << 8) | bytes[0]; + unsigned char b0 = *bytes++; + unsigned char b1 = *bytes++; + unsigned char b2 = *bytes++; + unsigned char b3 = *bytes; + return ((((static_cast(b3) << 8) | b2) << 8 | b1) << 8) | b0; } // OFFSET: 0x00B0C440