mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 11:43:56 +00:00
42 lines
701 B
C++
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{};
|
|
};
|