mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-22 21:21:03 +00:00
Prepare unicorn isolation
This commit is contained in:
41
src/windows_emulator/process_context.hpp
Normal file
41
src/windows_emulator/process_context.hpp
Normal 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{};
|
||||
};
|
||||
Reference in New Issue
Block a user