Add console handling and prepare demonware emulation
This commit is contained in:
@ -94,7 +94,7 @@ void loader::load_sections(const utils::nt::module& target, const utils::nt::mod
|
||||
|
||||
void loader::load_imports(const utils::nt::module& target, const utils::nt::module& source) const
|
||||
{
|
||||
IMAGE_DATA_DIRECTORY* import_directory = &source.get_optional_header()->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
|
||||
const auto import_directory = &source.get_optional_header()->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
|
||||
|
||||
auto descriptor = PIMAGE_IMPORT_DESCRIPTOR(target.get_ptr() + import_directory->VirtualAddress);
|
||||
|
||||
|
@ -7,6 +7,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void post_start()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void post_load()
|
||||
{
|
||||
}
|
||||
|
@ -14,6 +14,18 @@ void module_loader::register_module(std::unique_ptr<module>&& module_)
|
||||
modules_->push_back(std::move(module_));
|
||||
}
|
||||
|
||||
void module_loader::post_start()
|
||||
{
|
||||
static auto handled = false;
|
||||
if (handled || !modules_) return;
|
||||
handled = true;
|
||||
|
||||
for (const auto& module_ : *modules_)
|
||||
{
|
||||
module_->post_start();
|
||||
}
|
||||
}
|
||||
|
||||
void module_loader::post_load()
|
||||
{
|
||||
static auto handled = false;
|
||||
|
@ -18,6 +18,7 @@ public:
|
||||
|
||||
static void register_module(std::unique_ptr<module>&& module);
|
||||
|
||||
static void post_start();
|
||||
static void post_load();
|
||||
static void pre_destroy();
|
||||
|
||||
|
Reference in New Issue
Block a user