From bb62d53a058bbc2dc316bc6258ce932ee735574c Mon Sep 17 00:00:00 2001 From: Mahmut YILDIRIM Date: Wed, 13 Sep 2023 09:56:29 +0300 Subject: [PATCH] Fixed xincode on trsro (#715) * Fixed xincode on trsro --- .../RSBot.Core/Components/ClientManager.cs | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Library/RSBot.Core/Components/ClientManager.cs b/Library/RSBot.Core/Components/ClientManager.cs index 89e4b3f6..cb251a09 100644 --- a/Library/RSBot.Core/Components/ClientManager.cs +++ b/Library/RSBot.Core/Components/ClientManager.cs @@ -89,7 +89,7 @@ public static async Task Start() ReadProcessMemory(process.Handle, process.MainModule.BaseAddress, moduleMemory, process.MainModule.ModuleMemorySize, out _); var pattern = !isVtcGame ? - "6A 00 6A 00 FF D6 6A 00 8D 85" : + "6A 00 68 58 5C 29 01 68 64 5C 29 01" : "6A 00 68 D8 15 26 01 68 E4"; var patchNop = new byte[] { 0x90, 0x90 }; @@ -103,21 +103,10 @@ public static async Task Start() return false; } - if(!isVtcGame) - { - WriteProcessMemory(pi.hProcess, address - 0x15, patchNop, 2, out _); - WriteProcessMemory(pi.hProcess, address + 0x04, patchNop, 2, out _); - WriteProcessMemory(pi.hProcess, address + 0x1D, patchJmp, 1, out _); - WriteProcessMemory(pi.hProcess, address + 0x9A, patchJmp, 1, out _); - } - else - { - WriteProcessMemory(pi.hProcess, address - 0x6A, patchJmp, 1, out _); - WriteProcessMemory(pi.hProcess, address + 0xC, patchNop2, 5, out _); - WriteProcessMemory(pi.hProcess, address + 0x13, patchJmp, 1, out _); - WriteProcessMemory(pi.hProcess, address + 0x90, patchJmp, 1, out _); - } - + WriteProcessMemory(pi.hProcess, address - 0x6A, patchJmp, 1, out _); + WriteProcessMemory(pi.hProcess, address + 0xC, patchNop2, 5, out _); + WriteProcessMemory(pi.hProcess, address + 0x13, patchJmp, 1, out _); + WriteProcessMemory(pi.hProcess, address + 0x90, patchJmp, 1, out _); moduleMemory = null; GC.Collect();