public override void Enable() { if (Enabled) { return; } config = LoadConfig <Configs>() ?? new Configs(); changeAddress = Common.Scanner.ScanText("41 80 7E 2F 06 75 1E 48 8D 0D"); if (SafeMemory.ReadBytes(changeAddress, 5, out originalBytes)) { if (SafeMemory.WriteBytes(changeAddress, new byte[] { 0x41, 0xF6, 0x46, 0x36, 0x10 })) // cmp byte ptr [r14+2Fh], 6 -> test byte ptr [r14+36h], 10 { base.Enable(); } else { SimpleLog.Error("Failed to write new instruction"); } } else { SimpleLog.Error("Failed to read original instruction"); } if (config.FixCones) { ModifyCones(true); } }
void EnableNaturalTimeFlow() { if (*FirstByteTimeStopPtr == TimeStopOn[0]) { SafeMemory.WriteBytes(TimeStopPtr, TimeStopOff); WriteLog("Time flow reenabled"); } }
void DisableNaturalTimeFlow() { if (*FirstByteTimeStopPtr == TimeStopOff[0]) { SafeMemory.WriteBytes(TimeStopPtr, TimeStopOn); WriteLog("Time flow stopped"); } }
public void Disable() { if (!IsValid) { return; } SafeMemory.WriteBytes(Address, oldBytes); IsEnabled = false; }
public void Enable() { if (!IsValid) { return; } SafeMemory.WriteBytes(Address, newBytes); IsEnabled = true; }
public override void Disable() { if (!Enabled) { return; } if (!SafeMemory.WriteBytes(changeAddress, originalBytes)) { SimpleLog.Error("Failed to write original instruction"); } base.Disable(); }
/// <summary> /// Disable the anti-debugging by reverting the overwritten code in memory. /// </summary> public void Disable() { if (this.debugCheckAddress != IntPtr.Zero && this.original != null) { Log.Information($"Reverting debug check at 0x{this.debugCheckAddress.ToInt64():X}"); SafeMemory.WriteBytes(this.debugCheckAddress, this.original); } else { Log.Information("Debug check was not overwritten?"); } this.IsEnabled = false; }
/// <summary> /// Enables the anti-debugging by overwriting code in memory. /// </summary> public void Enable() { this.original = new byte[this.nop.Length]; if (this.debugCheckAddress != IntPtr.Zero && !this.IsEnabled) { Log.Information($"Overwriting debug check at 0x{this.debugCheckAddress.ToInt64():X}"); SafeMemory.ReadBytes(this.debugCheckAddress, this.nop.Length, out this.original); SafeMemory.WriteBytes(this.debugCheckAddress, this.nop); } else { Log.Information("Debug check already overwritten?"); } this.IsEnabled = true; }
public override void Disable() { if (!Enabled) { return; } if (changeAddress == IntPtr.Zero) { return; } var writeOriginalSuccess = SafeMemory.WriteBytes(changeAddress, originalBytes); if (!writeOriginalSuccess) { SimpleLog.Error("Failed to write original instruction"); } base.Disable(); }
public override void Enable() { if (Enabled) { return; } try { changeAddress = Common.Scanner.ScanText("0F 86 ?? ?? ?? ?? 48 8B 4D 77"); SimpleLog.Verbose($"Found Signature: {changeAddress.ToInt64():X}"); } catch { SimpleLog.Error("Failed to find Signature"); return; } if (changeAddress == IntPtr.Zero) { return; } originalBytes = new byte[6]; var readOriginalSuccess = SafeMemory.ReadBytes(changeAddress, 6, out originalBytes); if (readOriginalSuccess) { var relAddr = BitConverter.ToInt32(originalBytes, 2) + 1; var relAddrBytes = BitConverter.GetBytes(relAddr); var writeNewSuccess = SafeMemory.WriteBytes(changeAddress, new byte[6] { 0xE9, relAddrBytes[0], relAddrBytes[1], relAddrBytes[2], relAddrBytes[3], 0x90 }); if (writeNewSuccess) { base.Enable(); } else { SimpleLog.Error("Failed to write new instruction"); } } else { originalBytes = new byte[0]; SimpleLog.Error("Failed to read original instruction"); } }
public override void Disable() { if (!Enabled) { return; } SaveConfig(config); if (!SafeMemory.WriteBytes(changeAddress, originalBytes)) { SimpleLog.Error("Failed to write original instruction"); } if (config.FixCones) { ModifyCones(false); } base.Disable(); }
public override void Enable() { if (Enabled) { return; } changeAddress = Common.Scanner.ScanText("E8 ?? ?? ?? ?? 44 0F B6 F0 41 8B ED"); if (SafeMemory.ReadBytes(changeAddress, 7, out originalBytes)) { if (SafeMemory.WriteBytes(changeAddress, new byte[] { 0xB8, numGearSets, 0x00, 0x00, 0x00, 0x90, 0x90 })) { base.Enable(); } else { SimpleLog.Error("Failed to write new instruction"); } } else { SimpleLog.Error("Failed to read original instruction"); } }