From f486d84c5b94b1ce591862304557ad3d8992e2fd Mon Sep 17 00:00:00 2001 From: Emmanuel AYME Date: Mon, 3 Nov 2025 21:28:11 +0100 Subject: [PATCH] Update offset for console enabling --- EternalStrands/dllmain.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/EternalStrands/dllmain.cpp b/EternalStrands/dllmain.cpp index ce13295..8a11782 100644 --- a/EternalStrands/dllmain.cpp +++ b/EternalStrands/dllmain.cpp @@ -48,7 +48,6 @@ static bool g_Console_Enabled = false; // AOB Unreal Engine offsets addresses static uint8_t* GObjectsaddress = nullptr; -static uint8_t* GNamesaddress = nullptr; static uint8_t* AppendStringaddress = nullptr; static uint8_t* ProcessEventaddress = nullptr; @@ -197,14 +196,14 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) AOBScanDone = true; } - if (!GObjectsaddress || !GNamesaddress || !AppendStringaddress || !ProcessEventaddress) { + if (!GObjectsaddress || !AppendStringaddress || !ProcessEventaddress) { logger->info("------------ UEngine offsets search ------------"); uint8_t* baseModule = reinterpret_cast(GetModuleHandleA(nullptr)); // Get game base address constexpr auto GObjetcsStringObfuscated = make_obfuscated<0x4A>("48 8B ?? ?? ?? ?? ?? 48 8B ?? ?? 48 8D ?? ?? EB ?? 33"); GObjectsaddress = Memory::AOBScan("", GObjetcsStringObfuscated.decrypt(), PAGE_EXECUTE_READ); - constexpr auto GNamesStringObfuscated = make_obfuscated<0x4A>("48 8D ?? ?? ?? ?? ?? EB ?? 48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? C6 05 ?? ?? ?? ?? ?? 0F ?? ?? 4C"); - GNamesaddress = Memory::AOBScan("", GNamesStringObfuscated.decrypt(), PAGE_EXECUTE_READ); + constexpr auto AppendStringStringObfuscated = make_obfuscated<0x4A>("48 89 ?? ?? ?? 48 89 ?? ?? ?? 57 48 83 ?? ?? 80 3D ?? ?? ?? ?? ?? 48 ?? F2 8B ?? 48 ?? ?? 74 ?? 4C 8D ?? ?? ?? ?? ?? EB ?? 48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 4C"); + AppendStringaddress = Memory::AOBScan("", AppendStringStringObfuscated.decrypt(), PAGE_EXECUTE_READ); constexpr auto ProcessEventStringObfuscated = make_obfuscated<0x4A>("40 ?? 56 57 41 ?? 41 ?? 41 ?? 41 ?? 48 81 ?? ?? ?? ?? ?? 48 8D ?? ?? ?? 48 89 ?? ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? 48 ?? ?? 48 89 ?? ?? ?? ?? ?? 4D 8B"); ProcessEventaddress = Memory::AOBScan("", ProcessEventStringObfuscated.decrypt(), PAGE_EXECUTE_READ); @@ -216,12 +215,13 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) Offsets::GObjects = static_cast(gObjectsOffset); // Update GObjects offset } - if (!GNamesaddress) - logger->warn("GNames signature not found. Maybe your game has been updated and is no more compatible with this plugin."); + if (!AppendStringaddress) + logger->warn("AppendString signature not found. Maybe your game has been updated and is no more compatible with this plugin."); else { - uint32_t gNamesOffset = static_cast(Memory::GetOffsetFromOpcode(GNamesaddress + 0x3) - baseModule); - logger->info("GNames offset is: 0x{:X}.", gNamesOffset); - Offsets::GNames = static_cast(gNamesOffset); // Update GNames offset + std::optional gAppendStringOffsetOpt = UE::CalculateOffset("", AppendStringaddress); + uint32_t gAppendStringOffset = *gAppendStringOffsetOpt; + logger->info("AppendString offset is: 0x{:X}.", gAppendStringOffset); + Offsets::AppendString = static_cast(gAppendStringOffset);// Update ProcessEvent offset } if (!ProcessEventaddress) @@ -458,7 +458,8 @@ static void VolumetricFogFixEnabled() { static void EnableConsole() { logger->info("-------------- Console re-enabling --------------"); - if (!GObjectsaddress || !GNamesaddress || !ProcessEventaddress) { + if (!GObjectsaddress || !AppendStringaddress || !ProcessEventaddress) { + //if (!GObjectsaddress || !GNamesaddress || !ProcessEventaddress) { logger->warn("Could not re-enable console"); logger->info("------------------ User inputs ------------------"); return;