Handle api-ms DLLs

This commit is contained in:
momo5502
2024-08-31 08:45:12 +02:00
parent 48581ff048
commit 01bced1b53
4 changed files with 38 additions and 8 deletions

View File

@@ -202,8 +202,13 @@ namespace
}
}
mapped_binary map_file(x64_emulator& emu, const std::filesystem::path& file)
std::optional<mapped_binary> map_file(x64_emulator& emu, const std::filesystem::path& file)
{
const auto data = load_file(file);
if (data.empty())
{
return {};
}
return map_module(emu, data, file.generic_string());
}