diff --git a/src/windows-emulator/module/module_mapping.cpp b/src/windows-emulator/module/module_mapping.cpp index 8e486658..31e9d00e 100644 --- a/src/windows-emulator/module/module_mapping.cpp +++ b/src/windows-emulator/module/module_mapping.cpp @@ -202,6 +202,11 @@ mapped_module map_module_from_data(emulator& emu, const std::span const auto nt_headers = buffer.as(nt_headers_offset).get(); auto& optional_header = nt_headers.OptionalHeader; + if (nt_headers.FileHeader.Machine != IMAGE_FILE_MACHINE_AMD64) + { + throw std::runtime_error("Unsupported architecture!"); + } + binary.image_base = optional_header.ImageBase; binary.size_of_image = page_align_up(optional_header.SizeOfImage); // TODO: Sanitize