Changed AOB scan function name

This commit is contained in:
2025-08-20 10:53:58 +02:00
parent f45e645c75
commit 33001e9d59
17 changed files with 123 additions and 67 deletions

View File

@@ -40,19 +40,65 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
g_fix_enabled = enabled;
if (g_fix_enabled && !AOBScanDone) {
logger->info("--------------- AOB scan started ---------------");
if (HORPLUSaddress == nullptr) {
constexpr auto HORPLUSStringObfuscated = make_obfuscated<0x4A>("41 0F ?? ?? ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? 4C ?? ?? 4D ?? ?? E8");
HORPLUSaddress = Memory::aob_scan(gameExecutable, HORPLUSStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
if (FOVaddress == nullptr) {
constexpr auto FOVStringObfuscated = make_obfuscated<0x4A>("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 0F ?? ?? 8B");
FOVaddress = Memory::AOBScan(gameExecutable, FOVStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
//"Project_Plague-Win64-Shipping.exe" + 3E1037A - EB 08 - jmp "Project_Plague-Win64-Shipping.exe" + 3E10384
//"Project_Plague-Win64-Shipping.exe" + 3E1037C - F3 0F 10 83 E0 02 00 00 - movss xmm0, [rbx + 000002E0]
//"Project_Plague-Win64-Shipping.exe" + 3E10384 - F3 0F 11 47 30 - movss[rdi + 30], xmm0
//"Project_Plague-Win64-Shipping.exe" + 3E10389 - 0F 57 C0 - xorps xmm0, xmm0
//"Project_Plague-Win64-Shipping.exe" + 3E1038C - 8B 83 F0 02 00 00 - mov eax, [rbx + 000002F0]
if (!HORPLUSaddress)
logger->warn("HOR+ signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
else
logger->info("HOR+ signature found at address: 0x{:X}.", reinterpret_cast<uintptr_t>(HORPLUSaddress));
if (!FOVaddress)
logger->warn("FOV signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
else {
logger->info("FOV signature found at address: 0x{:X}.", reinterpret_cast<uintptr_t>(FOVaddress));
FOVaddress += 0xa; // Offset for the target opcode
}
}
if (Aspectaddress_1 == nullptr) {
constexpr auto AspectStringObfuscated = make_obfuscated<0x4A>("C3 CC CC CC CC CC CC CC CC 48 89 ?? ?? ?? 57 48 ?? ?? ?? 0F ?? ?? 48 ?? ?? 48 ?? ?? 0F ?? ?? ?? 0F ?? ?? ?? F2 0F");
Aspectaddress_1 = Memory::AOBScan(gameExecutable, AspectStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
//"Project_Plague-Win64-Shipping.exe" + 10A7443 - 89 41 44 - mov[rcx + 44], eax
//"Project_Plague-Win64-Shipping.exe" + 10A7446 - 8B 42 48 - mov eax, [rdx + 48]
//"Project_Plague-Win64-Shipping.exe" + 10A7449 - 89 41 48 - mov[rcx + 48], eax
//"Project_Plague-Win64-Shipping.exe" + 10A744C - 8B 49 4C - mov ecx, [rcx + 4C]
//"Project_Plague-Win64-Shipping.exe" + 10A744F - 33 4A 4C - xor ecx, [rdx + 4C]
if (!Aspectaddress_1)
logger->warn("Aspect ratio #1 signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
else {
logger->info("Aspect ratio #1 signature found at address: 0x{:X}.", reinterpret_cast<uintptr_t>(Aspectaddress_1));
Aspectaddress_1 += 0x62;
}
}
if (Aspectaddress_2 == nullptr) {
constexpr auto AspectStringObfuscated = make_obfuscated<0x4A>("C3 CC CC CC CC CC 48 89 ?? ?? ?? 57 48 ?? ?? ?? 0F ?? ?? 48 ?? ?? 48 ?? ?? 0F ?? ?? ?? 0F ?? ?? ?? F2 0F");
Aspectaddress_2 = Memory::AOBScan(gameExecutable, AspectStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
//"Project_Plague-Win64-Shipping.exe" + 1914483 - 89 41 44 - mov[rcx + 44], eax
//"Project_Plague-Win64-Shipping.exe" + 1914486 - 8B 42 48 - mov eax, [rdx + 48]
//"Project_Plague-Win64-Shipping.exe" + 1914489 - 89 41 48 - mov[rcx + 48], eax
//"Project_Plague-Win64-Shipping.exe" + 191448C - 8B 49 4C - mov ecx, [rcx + 4C]
//"Project_Plague-Win64-Shipping.exe" + 191448F - 33 4A 4C - xor ecx, [rdx + 4C]
if (!Aspectaddress_2)
logger->warn("Aspect ratio #2 signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
else {
logger->info("Aspect ratio #2 signature found at address: 0x{:X}.", reinterpret_cast<uintptr_t>(Aspectaddress_2));
Aspectaddress_2 += 0x5F;
}
}
if (DOFaddress == nullptr) {
constexpr auto DOFStringObfuscated = make_obfuscated<0x4A>("48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 6B ?? ?? 48 8D");
DOFaddress = Memory::aob_scan(gameExecutable, DOFStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
DOFaddress = Memory::AOBScan(gameExecutable, DOFStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
//"Project_Plague-Win64-Shipping.exe" + 2BD06A4 - 48 8B 05 1D 15 9D 05 - mov rax, ["Project_Plague-Win64-Shipping.exe" + 85A1BC8]
//"Project_Plague-Win64-Shipping.exe" + 2BD06AB - 48 8B CB - mov rcx, rbx
//"Project_Plague-Win64-Shipping.exe" + 2BD06AE - 8B 78 04 - mov edi, [rax + 04]
//"Project_Plague-Win64-Shipping.exe" + 2BD06B1 - E8 AA 5F 8A 01 - call "Project_Plague-Win64-Shipping.exe" + 4476660
//"Project_Plague-Win64-Shipping.exe" + 2BD06B6 - 48 63 C8 - movsxd rcx, eax
if (!DOFaddress)
logger->warn("DOF signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
@@ -64,7 +110,12 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
if (Vignettingaddress == nullptr) {
constexpr auto VignettingStringObfuscated = make_obfuscated<0x4A>("8B ?? 83 ?? ?? 7D ?? 89 B3 ?? ?? ?? ?? EB");
Vignettingaddress = Memory::aob_scan(gameExecutable, VignettingStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
Vignettingaddress = Memory::AOBScan(gameExecutable, VignettingStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
//"Project_Plague-Win64-Shipping.exe" + 4474088 - C7 83 B0 1F 00 00 00 00 80 3F - mov[rbx + 00001FB0], 3F800000
//"Project_Plague-Win64-Shipping.exe" + 4474092 - 48 8B 05 87 FE 1F 04 - mov rax, ["Project_Plague-Win64-Shipping.exe" + 8673F20]
//"Project_Plague-Win64-Shipping.exe" + 4474099 - 8B 08 - mov ecx, [rax]
//"Project_Plague-Win64-Shipping.exe" + 447409B - 83 F9 02 - cmp ecx, 02
//"Project_Plague-Win64-Shipping.exe" + 447409E - 7D 08 - jnl "Project_Plague-Win64-Shipping.exe" + 44740A8
if (!Vignettingaddress)
logger->warn("Vignetting signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
@@ -75,7 +126,12 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
if (Fogaddress == nullptr) {
constexpr auto FogStringObfuscated = make_obfuscated<0x4A>("75 ?? B3 ?? EB ?? 32 ?? 48 8B ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B");
Fogaddress = Memory::aob_scan(gameExecutable, FogStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
Fogaddress = Memory::AOBScan(gameExecutable, FogStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
//"Project_Plague-Win64-Shipping.exe" + 28E27FD - 48 8B 05 54 9A C6 05 - mov rax, ["Project_Plague-Win64-Shipping.exe" + 854C258]
//"Project_Plague-Win64-Shipping.exe" + 28E2804 - 83 78 04 01 - cmp dword ptr[rax + 04], 01
//"Project_Plague-Win64-Shipping.exe" + 28E2808 - 75 04 - jne "Project_Plague-Win64-Shipping.exe" + 28E280E
//"Project_Plague-Win64-Shipping.exe" + 28E280A - B3 01 - mov bl, 01
//"Project_Plague-Win64-Shipping.exe" + 28E280C - EB 02 - jmp "Project_Plague-Win64-Shipping.exe" + 28E2810
if (!Fogaddress)
logger->warn("Fog signature not found. Maybe your game has been updated and is no more compatible with this plugin.");