This repository has been archived on 2026-11-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
my-first-apex-internal/shd/instr.cpp
T
2026-11-05 02:19:09 +01:00

16 lines
314 B
C++

#include <include.h>
void* instr::system_call_t::stub() noexcept
{
auto length = sizeof(*this);
auto* result = win_api::rebuilt::virtual_alloc(nullptr, length, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
if (result)
{
memset(result, 0, length);
memcpy(result, this, length);
}
return result;
}