Prepare unicorn isolation

This commit is contained in:
momo5502
2024-08-21 13:31:17 +02:00
parent f1ce4b8ef8
commit 024e837ad9
24 changed files with 908 additions and 404 deletions

View File

@@ -0,0 +1,41 @@
#pragma once
#include "unicorn_utils.hpp"
struct mapped_binary
{
uint64_t image_base{};
uint64_t size_of_image{};
std::unordered_map<std::string, uint64_t> exports{};
};
struct event
{
bool signaled{};
EVENT_TYPE type{};
bool is_signaled()
{
const auto res = this->signaled;
if (this->type == SynchronizationEvent)
{
this->signaled = false;
}
return res;
}
};
struct process_context
{
emulator_object<TEB> teb{};
emulator_object<PEB> peb{};
emulator_object<RTL_USER_PROCESS_PARAMETERS> process_params{};
emulator_object<KUSER_SHARED_DATA> kusd{};
mapped_binary executable{};
mapped_binary ntdll{};
std::vector<event> events{};
emulator_allocator gs_segment{};
};