From e651c7c0108f568ea0c6bf02eb05f0894fe0b2ac Mon Sep 17 00:00:00 2001 From: Emmanuel AYME Date: Fri, 6 Mar 2026 01:42:46 +0100 Subject: [PATCH] Add GameAssembly detection before AOB scan and applying fixes --- TalesOfBerseria/dllmain.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TalesOfBerseria/dllmain.cpp b/TalesOfBerseria/dllmain.cpp index ea00bbd..222a0bc 100644 --- a/TalesOfBerseria/dllmain.cpp +++ b/TalesOfBerseria/dllmain.cpp @@ -31,6 +31,7 @@ static uint8_t* FOVaddress = nullptr; static uint8_t* UltraWideaddress = nullptr; static uint8_t* Resolutionaddress = nullptr; static uint8_t* pluginDLLModule = nullptr; +static uint8_t* GameAssemblyDLLModule = nullptr; // Hooking static SafetyHookMid FOVHook{}; static SafetyHookMid UWHook{}; @@ -88,6 +89,18 @@ extern "C" __declspec(dllexport) void InitializeCore() { logger->info("Core ready."); } }).detach(); + std::thread([]() { + HMODULE hModule = nullptr; + for (int i = 0; i < 100; ++i) { // gives 10 seconds to find Unity GameAssembly.dll + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + hModule = GetModuleHandleA("GameAssembly.dll"); + if (hModule) break; + } + if (hModule) { + GameAssemblyDLLModule = reinterpret_cast(hModule); + logger->debug("GameAssembly loaded @ {}", (void*)GameAssemblyDLLModule); + } + }).detach(); } // Setters for Reshade addon call