diff options
| author | auth12 <[email protected]> | 2020-08-03 21:08:06 +0100 |
|---|---|---|
| committer | auth12 <[email protected]> | 2020-08-03 21:08:06 +0100 |
| commit | ad8cf7c80590b96ad4e61f3f4eb397704a22ee4b (patch) | |
| tree | f376bc6ce8b7ababd4bcc67bee748c6e1d672b0c /client/src/util/syscalls.cpp | |
| parent | Started security. (diff) | |
| download | loader-ad8cf7c80590b96ad4e61f3f4eb397704a22ee4b.tar.xz loader-ad8cf7c80590b96ad4e61f3f4eb397704a22ee4b.zip | |
Added ui.
Diffstat (limited to 'client/src/util/syscalls.cpp')
| -rw-r--r-- | client/src/util/syscalls.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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<uint8_t*>(addr); |