Files
windows-user-space-emulator/src/windows_emulator/process_context.hpp
2024-08-21 18:58:29 +02:00

42 lines
701 B
C++

#pragma once
#include "emulator_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{};
};