/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ namespace dnSpy.Contracts.Debugger.AntiAntiDebug { /// /// Hooked function. The owner can write their own code by calling /// public abstract class DbgHookedNativeFunction { /// /// Gets the next address that will write to /// public abstract ulong CurrentAddress { get; } /// /// Gets the address of the new hooked function. The first written byte will be written to this location. /// The original function is patched to jump to this address. /// public abstract ulong NewCodeAddress { get; } /// /// Gets the address of the original function after it has been moved. This address can be used /// to call the original function from the new code. /// public abstract ulong NewFunctionAddress { get; } /// /// Gets the address of the function, which has been hooked by us. If you must call the real function /// from the new code, call and not this address. /// public abstract ulong OriginalFunctionAddress { get; } /// /// Writes the next byte to the code section /// /// Byte to write public abstract void WriteByte(byte value); } }