Extract main module cache into module manager

This commit is contained in:
momo5502
2025-02-10 17:43:09 +01:00
parent c1aa260f8f
commit 934374c4bb
11 changed files with 166 additions and 148 deletions

View File

@@ -12,6 +12,9 @@ class module_manager
using module_map = std::map<uint64_t, mapped_module>;
module_manager(memory_manager& memory, file_system& file_sys);
void map_main_modules(const windows_path& executable_path, const windows_path& ntdll_path,
const windows_path& win32u_path, const logger& logger);
mapped_module* map_module(const windows_path& file, const logger& logger, bool is_static = false);
mapped_module* map_local_module(const std::filesystem::path& file, const logger& logger, bool is_static = false);
@@ -46,6 +49,10 @@ class module_manager
return modules_;
}
mapped_module* executable{};
mapped_module* ntdll{};
mapped_module* win32u{};
private:
memory_manager* memory_{};
file_system* file_sys_{};