diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index ce6399cb0..e9898c50b 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -62,8 +62,6 @@ namespace Dalamud { public readonly DataManager Data; - private AntiDebug antiDebug; - private Localization localizationMgr; @@ -174,8 +172,6 @@ namespace Dalamud { this.WinSock2.Dispose(); this.SigScanner.Dispose(); - - this.antiDebug?.Dispose(); } #region Interface @@ -188,8 +184,6 @@ namespace Dalamud { private bool isImguiDrawDevMenu = false; #endif - private bool isAntiDebugEnabled = false; - private bool isImguiDrawLogWindow = false; private bool isImguiDrawDataWindow = false; private bool isImguiDrawPluginWindow = false; @@ -241,15 +235,6 @@ namespace Dalamud { } ImGui.MenuItem("Draw ImGui demo", "", ref this.isImguiDrawDemoWindow); ImGui.Separator(); - if (ImGui.MenuItem("Enable AntiDebug", "", ref this.isAntiDebugEnabled)) { - if (this.isAntiDebugEnabled) { - this.antiDebug = new AntiDebug(); - this.antiDebug.Enable(); - } else { - this.antiDebug?.Dispose(); - } - } - ImGui.Separator(); if (ImGui.MenuItem("Unload Dalamud")) { Unload(); diff --git a/Dalamud/Game/Internal/AntiDebug.cs b/Dalamud/Game/Internal/AntiDebug.cs deleted file mode 100644 index 6ce25488b..000000000 --- a/Dalamud/Game/Internal/AntiDebug.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using Dalamud.Hooking; -using EasyHook; -using Serilog; - -namespace Dalamud.Game.Internal -{ - class AntiDebug : IDisposable - { - [UnmanagedFunctionPointer(CallingConvention.Winapi)] - private delegate bool IsDebuggerPresentDelegate(); - - private Hook debuggerPresentHook; - - public AntiDebug() { - this.debuggerPresentHook = new Hook(LocalHook.GetProcAddress("Kernel32", "IsDebuggerPresent"), - new IsDebuggerPresentDelegate(IsDebuggerPresentDetour)); - - Log.Verbose("IsDebuggerPresent address {IsDebuggerPresent}", this.debuggerPresentHook.Address); - } - - public void Enable() { - this.debuggerPresentHook.Enable(); - } - - public void Dispose() { - this.debuggerPresentHook.Disable(); - } - - private bool IsDebuggerPresentDetour() { - return false; - } - } -}