From ce0c16dd9eee3552e82e9be501542b887ea00b66 Mon Sep 17 00:00:00 2001 From: nastys <@> Date: Sat, 14 Mar 2020 05:44:30 +0100 Subject: [PATCH] Fix touch reaction --- .../source/plugins/Patches/dllmain.cpp | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source-code/source/plugins/Patches/dllmain.cpp b/source-code/source/plugins/Patches/dllmain.cpp index bdd02c7..f42263b 100644 --- a/source-code/source/plugins/Patches/dllmain.cpp +++ b/source-code/source/plugins/Patches/dllmain.cpp @@ -182,21 +182,21 @@ void ApplyPatches() { // fix TouchReaction // get some more space by optimizing this code for size { (void*)0x00000001406A1FE2,{ 0x7E } }, // MOVQ XMM0,qword ptr [0x168 + RSP] (change to MOVQ) - { (void*)(0x00000001406A1FE2+0x7),{ 0x66, 0x0F, 0xD6, 0x44, 0x24, 0x6C } }, // MOVQ qword ptr [RSP + 0x6c],XMM0 - { (void*)(0x00000001406A1FE2+0xD),{ 0xC7, 0x44, 0x24, 0x74, 0x00, 0x00, 0x00, 0x00 } }, // MOV dword ptr [RSP + 0x74],0x0 - { (void*)(0x00000001406A1FE2+0x15),{ 0xEB, 0x0E } }, // JMP 0x1406a2007 (to rest of function as usual) + { (void*)0x00000001406A1FE9,{ 0x66, 0x0F, 0xD6, 0x44, 0x24, 0x6C } }, // MOVQ qword ptr [RSP + 0x6c],XMM0 + { (void*)0x00000001406A1FEF,{ 0xC7, 0x44, 0x24, 0x74, 0x00, 0x00, 0x00, 0x00 } }, // MOV dword ptr [RSP + 0x74],0x0 + { (void*)0x00000001406A1FF7,{ 0xEB, 0x0E } }, // JMP 0x1406a2007 (to rest of function as usual) // add new code - { (void*)(0x00000001406A1FE2+0x17),{ 0x66, 0x48, 0x0F, 0x6E, 0xC2 } }, // MOVQ XMM0,RDX (load touch pos) - { (void*)(0x00000001406A1FE2+0x1C),{ 0xEB, 0x5D } }, // JMP 0x1406a205d - { (void*)(0x00000001406A1FE2+0x7B),{ 0x0F, 0x2A, 0x0D, 0xB8, 0x6A, 0x31, 0x00 } }, // CVTPI2PS XMM1,qword ptr [0x1409b8b1c] (load 1280x720) - { (void*)(0x00000001406A1FE2+0x82),{ 0x0F, 0x12, 0x51, 0x1C } }, // MOVLPS XMM2,qword ptr [RCX + 0x1c] (load actual res) - { (void*)(0x00000001406A1FE2+0x86),{ 0xE9, 0x14, 0xFF, 0xFF, 0xFF } }, // JMP 0x1406a1f81 - { (void*)(0x00000001406A1FE2-0x61),{ 0x0F, 0x59, 0xC1 } }, // MULPS XMM0,XMM1 - { (void*)(0x00000001406A1FE2-0x61),{ 0x0F, 0x5E, 0xC2 } }, // DIVPS XMM0,XMM2 - { (void*)(0x00000001406A1FE2-0x5B),{ 0x66, 0x0F, 0xD6, 0x44, 0x24, 0x10 } }, // MOVQ qword ptr [RSP+0x10],XMM0 - { (void*)(0x00000001406A1FE2-0x55),{ 0xEB, 0x06 } }, // JMP 0x1406a1f95 (back to original function) - // jmp to new code - { (void*)(0x00000001406A1FE2-0x52),{ 0xEB, 0x67 } }, // JMP 0x1406a1ff9 + { (void*)0x00000001406A1FF9,{ 0x66, 0x48, 0x0F, 0x6E, 0xC2 } }, // MOVQ XMM0,RDX (load touch pos) + { (void*)0x00000001406A1FFE,{ 0xEB, 0x5D } }, // JMP 0x1406a205d + { (void*)0x00000001406A205D,{ 0x0F, 0x2A, 0x0D, 0xB8, 0x6A, 0x31, 0x00 } }, // CVTPI2PS XMM1,qword ptr [0x1409b8b1c] (load 1280x720) + { (void*)0x00000001406A2064,{ 0x0F, 0x12, 0x51, 0x1C } }, // MOVLPS XMM2,qword ptr [RCX + 0x1c] (load actual res) + { (void*)0x00000001406A2068,{ 0xE9, 0x14, 0xFF, 0xFF, 0xFF } }, // JMP 0x1406a1f81 + { (void*)0x00000001406A1F81,{ 0x0F, 0x59, 0xC1 } }, // MULPS XMM0,XMM1 + { (void*)0x00000001406A1F84,{ 0x0F, 0x5E, 0xC2 } }, // DIVPS XMM0,XMM2 + { (void*)0x00000001406A1F87,{ 0x66, 0x0F, 0xD6, 0x44, 0x24, 0x10 } }, // MOVQ qword ptr [RSP+0x10],XMM0 + { (void*)0x00000001406A1F8D,{ 0xEB, 0x06 } }, // JMP 0x1406a1f95 (back to original function) + // jmp to new code + { (void*)0x00000001406A1F90,{ 0xEB, 0x67 } }, // JMP 0x1406a1ff9 }; auto nCursor = GetPrivateProfileIntW(L"patches", L"cursor", TRUE, CONFIG_FILE);