From 7c5294f0f5f92d7742a719aee05ec3f6d7af681b Mon Sep 17 00:00:00 2001 From: lybxlpsv Date: Tue, 3 Sep 2019 00:05:40 +0700 Subject: [PATCH] tlac: fix TAA getting re-enabled during boot up. --- source-code/source/plugins/TLAC/dllmain.cpp | 30 +++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/source-code/source/plugins/TLAC/dllmain.cpp b/source-code/source/plugins/TLAC/dllmain.cpp index 89ac30e..4ed8162 100644 --- a/source-code/source/plugins/TLAC/dllmain.cpp +++ b/source-code/source/plugins/TLAC/dllmain.cpp @@ -159,11 +159,31 @@ namespace TLAC } if (!nTAA) { - DWORD oldProtect, bck; - VirtualProtect((BYTE*)0x00000001411AB67C, 1, PAGE_EXECUTE_READWRITE, &oldProtect); - *((byte*)0x00000001411AB67C + 0) = 0x00; - VirtualProtect((BYTE*)0x00000001411AB67C, 1, oldProtect, &bck); - + { + DWORD oldProtect, bck; + VirtualProtect((BYTE*)0x00000001411AB67C, 1, PAGE_EXECUTE_READWRITE, &oldProtect); + *((byte*)0x00000001411AB67C + 0) = 0x00; + VirtualProtect((BYTE*)0x00000001411AB67C, 1, oldProtect, &bck); + } + { + DWORD oldProtect, bck; + VirtualProtect((BYTE*)0x00000001404AB11D, 3, PAGE_EXECUTE_READWRITE, &oldProtect); + *((byte*)0x00000001404AB11D + 0) = 0x90; + *((byte*)0x00000001404AB11D + 1) = 0x90; + *((byte*)0x00000001404AB11D + 2) = 0x90; + VirtualProtect((BYTE*)0x00000001404AB11D, 3, oldProtect, &bck); + } + /* + { + DWORD oldProtect, bck; + VirtualProtect((BYTE*)0x00000001404A877F, 4, PAGE_EXECUTE_READWRITE, &oldProtect); + *((byte*)0x00000001404A877F + 0) = 0x90; + *((byte*)0x00000001404A877F + 1) = 0x90; + *((byte*)0x00000001404A877F + 2) = 0x90; + *((byte*)0x00000001404A877F + 3) = 0x90; + VirtualProtect((BYTE*)0x00000001404A877F, 4, oldProtect, &bck); + } + */ printf("[TLAC] TAA disabled\n"); } if (!nMLAA)