#pragma once #include "types.hpp" #include namespace le { using namespace binparse; struct ObjectTable { struct Entry { enum class ObjectFlags { readable = 0x1, writable = 0x2, executable = 0x4, resource = 0x8, discardable = 0x10, shared = 0x20, has_preload_pages = 0x40, has_invalid_pages = 0x80, has_zero_filled_pages = 0x100, is_resident = 0x200, is_resident_and_contiguous = 0x300, is_resident_and_long_lockable = 0x400, alias_16_16_required = 0x1000, big_bit_setting = 0x2000, is_conforming_for_code = 0x4000, IO_privilege_level = 0x8000, }; Value32 virtual_size; Offset32 reloc_base_address; Value32 object_flags; Value32 page_table_index; Value32 nr_page_table_entries; Value32 reserved; }; std::map entries; }; ObjectTable parse_object_table(std::istream& is, Offset32 offset, Value32 nr_objects); std::ostream& operator<<(std::ostream& os, ObjectTable const& table); }