From ad8cf7c80590b96ad4e61f3f4eb397704a22ee4b Mon Sep 17 00:00:00 2001 From: auth12 <67507608+auth12@users.noreply.github.com> Date: Mon, 3 Aug 2020 21:08:06 +0100 Subject: Added ui. --- client/src/util/syscalls.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client/src/util/syscalls.cpp') diff --git a/client/src/util/syscalls.cpp b/client/src/util/syscalls.cpp index a755d22..7de7c81 100644 --- a/client/src/util/syscalls.cpp +++ b/client/src/util/syscalls.cpp @@ -8,7 +8,13 @@ syscalls g_syscalls; syscalls::syscalls() { m_call_table = VirtualAlloc(0, 0x100000, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); std::memset(m_call_table, 0x90, 0x100000); +} + +syscalls::~syscalls() { + VirtualFree(m_call_table, 0, MEM_RELEASE); +} +void syscalls::init() { io::log("syscalls call table : {:x}", uintptr_t(m_call_table)); static auto nt = pe::ntdll(); @@ -42,10 +48,6 @@ syscalls::syscalls() { } } -syscalls::~syscalls() { - VirtualFree(m_call_table, 0, MEM_RELEASE); -} - bool syscalls::valid(const uintptr_t addr, const size_t& size) { auto func = reinterpret_cast(addr); -- cgit v1.2.3