/src/spicy/build/ci/fuzz/pe_ImageFile_PE.cc
Line | Count | Source |
1 | | // Begin of PE (from "/src/spicy/spicy-pe/analyzer/analyzer.spicy") |
2 | | // Compiled by HILTI version 1.17.0-dev.249 |
3 | | |
4 | | #include <hilti/rt/compiler-setup.h> |
5 | | |
6 | | #include <spicy/rt/libspicy.h> |
7 | | #include <hilti/rt/libhilti.h> |
8 | | |
9 | | extern uint64_t hlt_internal_pe_ImageFile_hlto_scope; |
10 | | |
11 | | namespace hlt_internal_pe_ImageFile::type_info { namespace { |
12 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__DOS_Header_namex2aPE__DOS_Headerx2b; |
13 | | extern const ::hilti::rt::TypeInfo _t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b; |
14 | | extern const ::hilti::rt::TypeInfo _t_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b; |
15 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__DataDirectory_namex2aPE__DataDirectoryx2b; |
16 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__Dir_namex2aPE__Dirx2b; |
17 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__Offset_optionalx2auint64x2b; |
18 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__DirInfo_tuplex2aoptionalx2auint64x2b_uint64_x2b; |
19 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__HintName_namex2aPE__HintNamex2b; |
20 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__OptionalHeader_namex2aPE__OptionalHeaderx2b; |
21 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_DataDirectory__vectorx2anamex2aPE__DataDirectoryx2bx2b; |
22 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__PE_Header_namex2aPE__PE_Headerx2b; |
23 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__SectionHeader_namex2aPE__SectionHeaderx2b; |
24 | | extern const ::hilti::rt::TypeInfo _t_ti_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b; |
25 | | extern const ::hilti::rt::TypeInfo _t_ti_tuple_uint_32___uint_32___uint_32___uint_32___uint_32___tuplex2auint32_uint32_uint32_uint32_uint32_x2b; |
26 | | extern const ::hilti::rt::TypeInfo _t_ti_const_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b; |
27 | | extern const ::hilti::rt::TypeInfo _t_ti_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b; |
28 | | extern const ::hilti::rt::TypeInfo _t_ti_tuple_uint_64___uint_64___uint_64___uint_64___uint_64___tuplex2auint64_uint64_uint64_uint64_uint64_x2b; |
29 | | extern const ::hilti::rt::TypeInfo _t_ti_const_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b; |
30 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ImportLookupTableEntry_namex2aPE__ImportLookupTableEntryx2b; |
31 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ImportLookupTable_namex2aPE__ImportLookupTablex2b; |
32 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ImportLookupTableEntry___vectorx2anamex2aPE__ImportLookupTableEntryx2bx2b; |
33 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportLookupTableEntry__value_refx2anamex2aPE__ImportLookupTableEntryx2bx2b; |
34 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ImportDirectoryTableEntry_namex2aPE__ImportDirectoryTableEntryx2b; |
35 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportLookupTable__value_refx2anamex2aPE__ImportLookupTablex2bx2b; |
36 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ImportDirectoryTable_namex2aPE__ImportDirectoryTablex2b; |
37 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ImportDirectoryTableEntry___vectorx2anamex2aPE__ImportDirectoryTableEntryx2bx2b; |
38 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportDirectoryTableEntry__value_refx2anamex2aPE__ImportDirectoryTableEntryx2bx2b; |
39 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ImageFile_namex2aPE__ImageFilex2b; |
40 | | extern const ::hilti::rt::TypeInfo _t_ti_set_uint_64___setx2auint64x2b; |
41 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_SectionHeader__vectorx2anamex2aPE__SectionHeaderx2bx2b; |
42 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportDirectoryTable__value_refx2anamex2aPE__ExportDirectoryTablex2bx2b; |
43 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ExportDirectoryTable_namex2aPE__ExportDirectoryTablex2b; |
44 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportAddressTable__value_refx2anamex2aPE__ExportAddressTablex2bx2b; |
45 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ExportAddressTable_namex2aPE__ExportAddressTablex2b; |
46 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ExportAddressTableEntry___vectorx2anamex2aPE__ExportAddressTableEntryx2bx2b; |
47 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportAddressTableEntry__value_refx2anamex2aPE__ExportAddressTableEntryx2bx2b; |
48 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ExportAddressTableEntry_namex2aPE__ExportAddressTableEntryx2b; |
49 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportNamePtrTable__value_refx2anamex2aPE__ExportNamePtrTablex2bx2b; |
50 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ExportNamePtrTable_namex2aPE__ExportNamePtrTablex2b; |
51 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ExportNamePtrTableEntry___vectorx2anamex2aPE__ExportNamePtrTableEntryx2bx2b; |
52 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportNamePtrTableEntry__value_refx2anamex2aPE__ExportNamePtrTableEntryx2bx2b; |
53 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ExportNamePtrTableEntry_namex2aPE__ExportNamePtrTableEntryx2b; |
54 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportOrdinalTable__value_refx2anamex2aPE__ExportOrdinalTablex2bx2b; |
55 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__ExportOrdinalTable_namex2aPE__ExportOrdinalTablex2b; |
56 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_uint_16___vectorx2auint16x2b; |
57 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportDirectoryTable__value_refx2anamex2aPE__ImportDirectoryTablex2bx2b; |
58 | | extern const ::hilti::rt::TypeInfo _t_ti_map_string__map_uint_8___uint_64____mapx2astring__mapx2auint8__uint64x2bx2b; |
59 | | extern const ::hilti::rt::TypeInfo _t_ti_map_uint_8___uint_64___mapx2auint8__uint64x2b; |
60 | | extern const ::hilti::rt::TypeInfo _t_ti_map_string__uint_64___mapx2astring__uint64x2b; |
61 | | extern const ::hilti::rt::TypeInfo _t_ti_optional_iterator_stream___optionalx2aiteratorx2astreamx2bx2b; |
62 | | extern const ::hilti::rt::TypeInfo _t_ti_spicy_rt__SinkState_libraryx2astd__shared_ptr_spicy__rt__sink__detail__State_x2b; |
63 | | extern const ::hilti::rt::TypeInfo _t_ti_PE__NullTerminatedString_namex2aPE__NullTerminatedStringx2b; |
64 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_PE__ImageFile__value_refx2anamex2aPE__ImageFilex2bx2b; |
65 | | extern const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_PE__ImageFile__strong_refx2anamex2aPE__ImageFilex2bx2b; |
66 | | } } |
67 | | |
68 | | namespace hlt_internal_pe_ImageFile::PE { |
69 | | struct DOS_Header; |
70 | | struct DataDirectory; |
71 | | struct HintName; |
72 | | struct OptionalHeader; |
73 | | struct PE_Header; |
74 | | struct SectionHeader; |
75 | | struct ImportLookupTableEntry; |
76 | | struct ImportLookupTable; |
77 | | struct ImportDirectoryTableEntry; |
78 | | struct ImportDirectoryTable; |
79 | | struct ImageFile; |
80 | | struct ExportOrdinalTable; |
81 | | struct ExportNamePtrTableEntry; |
82 | | struct ExportNamePtrTable; |
83 | | struct ExportDirectoryTable; |
84 | | struct ExportAddressTableEntry; |
85 | | struct ExportAddressTable; |
86 | | struct NullTerminatedString; |
87 | | struct DOS_Header : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<DOS_Header> { |
88 | 8.47k | auto _t_self() { return ::hilti::rt::ValueReference<DOS_Header>::self(this); } |
89 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> magic{}; |
90 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> bytesInLastPage{}; |
91 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> pagesInFile{}; |
92 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> relocations{}; |
93 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> paragraphsInHeader{}; |
94 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> minExtraParagraphs{}; |
95 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> maxExtraParagraphs{}; |
96 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> initialRelativeSS{}; |
97 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> initialSP{}; |
98 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> checksum{}; |
99 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> initialIP{}; |
100 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> initialRelativeCS{}; |
101 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> relocationTableAddress{}; |
102 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> overlayNumber{}; |
103 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> reserved1{}; |
104 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> oemID{}; |
105 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> oemInfo{}; |
106 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> reserved2{}; |
107 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> peHeaderOffset{}; |
108 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
109 | | auto _t_parse_PE__DOS_Header_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
110 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
111 | | DOS_Header(); |
112 | | DOS_Header(const DOS_Header&) = default; |
113 | 0 | DOS_Header(DOS_Header&&) = default; |
114 | | DOS_Header& operator=(const DOS_Header&) = default; |
115 | 4.23k | DOS_Header& operator=(DOS_Header&&) = default; |
116 | | explicit DOS_Header(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> peHeaderOffset); |
117 | | |
118 | 0 | std::string __to_string() const { |
119 | 0 | return "["s + hilti::rt::to_string_for_print("$magic=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$bytesInLastPage=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$pagesInFile=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$relocations=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$paragraphsInHeader=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$minExtraParagraphs=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$maxExtraParagraphs=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$initialRelativeSS=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$initialSP=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$checksum=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$initialIP=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$initialRelativeCS=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$relocationTableAddress=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$overlayNumber=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$reserved1=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$oemID=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$oemInfo=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$reserved2=(optimized out)"_hs) + ", "s + "$peHeaderOffset=" + hilti::rt::to_string(peHeaderOffset) + "]"; |
120 | 0 | } |
121 | | }; |
122 | | |
123 | | struct DataDirectory : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<DataDirectory> { |
124 | 23.4k | auto _t_self() { return ::hilti::rt::ValueReference<DataDirectory>::self(this); } |
125 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> virtualAddress{}; |
126 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> size{}; |
127 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
128 | | auto _t_parse_PE__DataDirectory_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
129 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
130 | | DataDirectory(); |
131 | 3.89k | DataDirectory(const DataDirectory&) = default; |
132 | 27.2k | DataDirectory(DataDirectory&&) = default; |
133 | | DataDirectory& operator=(const DataDirectory&) = default; |
134 | 11.7k | DataDirectory& operator=(DataDirectory&&) = default; |
135 | | explicit DataDirectory(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> virtualAddress, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> size); |
136 | | |
137 | 0 | std::string __to_string() const { |
138 | 0 | return "["s + "$virtualAddress=" + hilti::rt::to_string(virtualAddress) + ", "s + "$size=" + hilti::rt::to_string(size) + "]"; |
139 | 0 | } |
140 | | }; |
141 | | |
142 | | HILTI_RT_ENUM_TYPE(Dir, ExportTable = 0, ImportTable = 1, ResourceTable = 2, ExceptionTable = 3, CertificateTable = 4, BaseRelocationTable = 5, Debug = 6, Architecture = 7, GlobalPtr = 8, ThreadLocalStorageTable = 9, LoadConfigTable = 10, BoundImport = 11, ImportAddressTable = 12, DelayImportDescriptor = 13, CommonLanguageRuntimeHeader = 14); |
143 | | struct HintName : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<HintName> { |
144 | 6.65k | auto _t_self() { return ::hilti::rt::ValueReference<HintName>::self(this); } |
145 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> hint{}; |
146 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> name{}; |
147 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>>; |
148 | | auto _t_parse_PE__HintName_6_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>>; |
149 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
150 | | HintName(); |
151 | 4.99k | HintName(const HintName&) = default; |
152 | 0 | HintName(HintName&&) = default; |
153 | 0 | HintName& operator=(const HintName&) = default; |
154 | 3.32k | HintName& operator=(HintName&&) = default; |
155 | | |
156 | 0 | std::string __to_string() const { |
157 | 0 | return "["s + hilti::rt::to_string_for_print("$hint=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$name=(optimized out)"_hs) + "]"; |
158 | 0 | } |
159 | | }; |
160 | | |
161 | | struct OptionalHeader : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<OptionalHeader> { |
162 | 18.7k | auto _t_self() { return ::hilti::rt::ValueReference<OptionalHeader>::self(this); } |
163 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> magic{}; |
164 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> majorLinkerVersion{}; |
165 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> minorLinkerVersion{}; |
166 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sizeOfCode{}; |
167 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sizeOfInitializedData{}; |
168 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sizeOfUninitializedData{}; |
169 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> addressOfEntryPoint{}; |
170 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> baseOfCode{}; |
171 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> baseOfData{}; |
172 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> imageBase{}; |
173 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sectionAlignment{}; |
174 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> fileAlignment{}; |
175 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> majorOperatingSystemVersion{}; |
176 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> minorOperatingSystemVersion{}; |
177 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> majorImageVersion{}; |
178 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> minorImageVersion{}; |
179 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> majorSubsystemVersion{}; |
180 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> minorSubsystemVersion{}; |
181 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> win32VersionValue{}; |
182 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sizeOfImage{}; |
183 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sizeOfHeaders{}; |
184 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> checkSum{}; |
185 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> subsystem{}; |
186 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> dllCharacteristics{}; |
187 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> sizeOfStackReserve{}; |
188 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> sizeOfStackCommit{}; |
189 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> sizeOfHeapReserve{}; |
190 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> sizeOfHeapCommit{}; |
191 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> loaderFlags{}; |
192 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> numberOfRvaAndSizes{}; |
193 | | ::hilti::rt::Optional<::hilti::rt::Vector<DataDirectory>> dataDirectories{}; |
194 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
195 | | auto _t_parse_switch_4_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
196 | | auto _t_parse_switch_5_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
197 | | auto _t_parse_dataDirectories_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Vector<DataDirectory>& _t_dst) -> ::hilti::rt::stream::View; |
198 | | auto _t_parse_PE__OptionalHeader_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
199 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
200 | | OptionalHeader(); |
201 | | OptionalHeader(const OptionalHeader&) = default; |
202 | 0 | OptionalHeader(OptionalHeader&&) = default; |
203 | | OptionalHeader& operator=(const OptionalHeader&) = default; |
204 | 3.87k | OptionalHeader& operator=(OptionalHeader&&) = default; |
205 | | explicit OptionalHeader(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> magic, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> sizeOfHeaders, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> numberOfRvaAndSizes, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<DataDirectory>>> dataDirectories); |
206 | | |
207 | 0 | std::string __to_string() const { |
208 | 0 | return "["s + "$magic=" + hilti::rt::to_string(magic) + ", "s + hilti::rt::to_string_for_print("$majorLinkerVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$minorLinkerVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfCode=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfInitializedData=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfUninitializedData=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$addressOfEntryPoint=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$baseOfCode=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$baseOfData=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$imageBase=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sectionAlignment=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$fileAlignment=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$majorOperatingSystemVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$minorOperatingSystemVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$majorImageVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$minorImageVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$majorSubsystemVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$minorSubsystemVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$win32VersionValue=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfImage=(optimized out)"_hs) + ", "s + "$sizeOfHeaders=" + hilti::rt::to_string(sizeOfHeaders) + ", "s + hilti::rt::to_string_for_print("$checkSum=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$subsystem=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$dllCharacteristics=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfStackReserve=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfStackCommit=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfHeapReserve=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$sizeOfHeapCommit=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$loaderFlags=(optimized out)"_hs) + ", "s + "$numberOfRvaAndSizes=" + hilti::rt::to_string(numberOfRvaAndSizes) + ", "s + "$dataDirectories=" + hilti::rt::to_string(dataDirectories) + "]"; |
209 | 0 | } |
210 | | }; |
211 | | |
212 | | struct PE_Header : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<PE_Header> { |
213 | 8.04k | auto _t_self() { return ::hilti::rt::ValueReference<PE_Header>::self(this); } |
214 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> magic{}; |
215 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> machine{}; |
216 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> numberOfSections{}; |
217 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> timeDateStamp{}; |
218 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> pointerToSymbolTable{}; |
219 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> numberOfSymbols{}; |
220 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> sizeOfOptionalHeader{}; |
221 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> characteristics{}; |
222 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
223 | | auto _t_parse_PE__PE_Header_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
224 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
225 | | PE_Header(); |
226 | 3.89k | PE_Header(const PE_Header&) = default; |
227 | 0 | PE_Header(PE_Header&&) = default; |
228 | | PE_Header& operator=(const PE_Header&) = default; |
229 | 4.02k | PE_Header& operator=(PE_Header&&) = default; |
230 | | explicit PE_Header(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> numberOfSections, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> sizeOfOptionalHeader); |
231 | | |
232 | 0 | std::string __to_string() const { |
233 | 0 | return "["s + hilti::rt::to_string_for_print("$magic=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$machine=(optimized out)"_hs) + ", "s + "$numberOfSections=" + hilti::rt::to_string(numberOfSections) + ", "s + hilti::rt::to_string_for_print("$timeDateStamp=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$pointerToSymbolTable=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$numberOfSymbols=(optimized out)"_hs) + ", "s + "$sizeOfOptionalHeader=" + hilti::rt::to_string(sizeOfOptionalHeader) + ", "s + hilti::rt::to_string_for_print("$characteristics=(optimized out)"_hs) + "]"; |
234 | 0 | } |
235 | | }; |
236 | | |
237 | | struct SectionHeader : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<SectionHeader> { |
238 | 115k | auto _t_self() { return ::hilti::rt::ValueReference<SectionHeader>::self(this); } |
239 | | ::hilti::rt::Optional<::hilti::rt::Bytes> name{}; |
240 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> virtualSize{}; |
241 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> virtualAddress{}; |
242 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> sizeOfRawData{}; |
243 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> pointerToRawData{}; |
244 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> pointerToRelocations{}; |
245 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> pointerToLinenumbers{}; |
246 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> numberOfRelocations{}; |
247 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> numberOfLinenumbers{}; |
248 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> characteristics{}; |
249 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
250 | | auto _t_parse_PE__SectionHeader_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View; |
251 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
252 | | SectionHeader(); |
253 | 10.1M | SectionHeader(const SectionHeader&) = default; |
254 | 307k | SectionHeader(SectionHeader&&) = default; |
255 | | SectionHeader& operator=(const SectionHeader&) = default; |
256 | 57.5k | SectionHeader& operator=(SectionHeader&&) = default; |
257 | | explicit SectionHeader(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> name, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> virtualAddress, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> sizeOfRawData, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> pointerToRawData); |
258 | | |
259 | 0 | std::string __to_string() const { |
260 | 0 | return "["s + "$name=" + hilti::rt::to_string(name) + ", "s + hilti::rt::to_string_for_print("$virtualSize=(optimized out)"_hs) + ", "s + "$virtualAddress=" + hilti::rt::to_string(virtualAddress) + ", "s + "$sizeOfRawData=" + hilti::rt::to_string(sizeOfRawData) + ", "s + "$pointerToRawData=" + hilti::rt::to_string(pointerToRawData) + ", "s + hilti::rt::to_string_for_print("$pointerToRelocations=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$pointerToLinenumbers=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$numberOfRelocations=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$numberOfLinenumbers=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$characteristics=(optimized out)"_hs) + "]"; |
261 | 0 | } |
262 | | }; |
263 | | |
264 | | struct ImportLookupTableEntry : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ImportLookupTableEntry> { |
265 | 29.0M | auto _t_self() { return ::hilti::rt::ValueReference<ImportLookupTableEntry>::self(this); } |
266 | | ::hilti::rt::integer::safe<uint64_t> full{}; |
267 | | ::hilti::rt::Bool importByName{}; |
268 | | // ::hilti::rt::integer::safe<uint16_t> ordinal{}; |
269 | | ::hilti::rt::integer::safe<uint32_t> hintNameRVA{}; |
270 | | ::hilti::rt::Optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>> f32{}; |
271 | | void _t_on_f32(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd); |
272 | | ::hilti::rt::Optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>> f64{}; |
273 | | void _t_on_f64(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd); |
274 | | void _t_on__anon_12(); |
275 | | ::hilti::rt::Optional<HintName> hintName{}; |
276 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> hintNameOffset{}; |
277 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
278 | | auto _t_parse_switch_9_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
279 | | auto _t_parse_PE__ImportLookupTableEntry_5_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
280 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
281 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
282 | | ImportLookupTableEntry(); |
283 | 11.1M | ImportLookupTableEntry(const ImportLookupTableEntry&) = default; |
284 | 11.6M | ImportLookupTableEntry(ImportLookupTableEntry&&) = default; |
285 | 0 | ImportLookupTableEntry& operator=(const ImportLookupTableEntry&) = default; |
286 | | ImportLookupTableEntry& operator=(ImportLookupTableEntry&&) = default; |
287 | | explicit ImportLookupTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> full, ::hilti::rt::Optional<::hilti::rt::Bool> importByName, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> hintNameRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>>> f32, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>>> f64, ::hilti::rt::Optional<::hilti::rt::Optional<HintName>> hintName, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> hintNameOffset); |
288 | | explicit ImportLookupTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
289 | | |
290 | 0 | std::string __to_string() const { |
291 | 0 | return "["s + "$full=" + hilti::rt::to_string(full) + ", "s + "$importByName=" + hilti::rt::to_string(importByName) + ", "s + hilti::rt::to_string_for_print("$ordinal=(optimized out)"_hs) + ", "s + "$hintNameRVA=" + hilti::rt::to_string(hintNameRVA) + ", "s + "$f32=("s + ::hilti::rt::bitfield::detail::render(f32, &type_info::_t_ti_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b, false)+ ")" + ", "s + "$f64=("s + ::hilti::rt::bitfield::detail::render(f64, &type_info::_t_ti_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b, false)+ ")" + ", "s + "$hintName=" + hilti::rt::to_string(hintName) + ", "s + "$hintNameOffset=" + hilti::rt::to_string(hintNameOffset) + "]"; |
292 | 0 | } |
293 | | }; |
294 | | |
295 | | struct ImportLookupTable : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ImportLookupTable> { |
296 | 16.1k | auto _t_self() { return ::hilti::rt::ValueReference<ImportLookupTable>::self(this); } |
297 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ImportLookupTableEntry>>> entries{}; |
298 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
299 | | auto _t_parse_entries_15_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<ImportLookupTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
300 | | auto _t_parse_PE__ImportLookupTable_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
301 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
302 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
303 | | ImportLookupTable(); |
304 | 4.97k | ImportLookupTable(const ImportLookupTable&) = default; |
305 | 0 | ImportLookupTable(ImportLookupTable&&) = default; |
306 | 0 | ImportLookupTable& operator=(const ImportLookupTable&) = default; |
307 | 5.39k | ImportLookupTable& operator=(ImportLookupTable&&) = default; |
308 | | explicit ImportLookupTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ImportLookupTableEntry>>>> entries); |
309 | | explicit ImportLookupTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
310 | | |
311 | 0 | std::string __to_string() const { |
312 | 0 | return "["s + "$entries=" + hilti::rt::to_string(entries) + "]"; |
313 | 0 | } |
314 | | }; |
315 | | |
316 | | struct ImportDirectoryTableEntry : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ImportDirectoryTableEntry> { |
317 | 336k | auto _t_self() { return ::hilti::rt::ValueReference<ImportDirectoryTableEntry>::self(this); } |
318 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> importLookupTableRVA{}; |
319 | | void _t_on_importLookupTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
320 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> timeDateStamp{}; |
321 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> forwarderChain{}; |
322 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> dllNameRVA{}; |
323 | | void _t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
324 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> importAddressTableRVA{}; |
325 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> dllName{}; |
326 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<ImportLookupTable>> importLookupTable{}; |
327 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> iltOffset{}; |
328 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> dllNameOffset{}; |
329 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
330 | | auto _t_parse_PE__ImportDirectoryTableEntry_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
331 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
332 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
333 | | ImportDirectoryTableEntry(); |
334 | 83.2k | ImportDirectoryTableEntry(const ImportDirectoryTableEntry&) = default; |
335 | 168k | ImportDirectoryTableEntry(ImportDirectoryTableEntry&&) = default; |
336 | 0 | ImportDirectoryTableEntry& operator=(const ImportDirectoryTableEntry&) = default; |
337 | | ImportDirectoryTableEntry& operator=(ImportDirectoryTableEntry&&) = default; |
338 | | explicit ImportDirectoryTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> importLookupTableRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> timeDateStamp, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> forwarderChain, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> dllNameRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> importAddressTableRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<ImportLookupTable>>> importLookupTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> iltOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> dllNameOffset); |
339 | | explicit ImportDirectoryTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
340 | | |
341 | 0 | std::string __to_string() const { |
342 | 0 | return "["s + "$importLookupTableRVA=" + hilti::rt::to_string(importLookupTableRVA) + ", "s + "$timeDateStamp=" + hilti::rt::to_string(timeDateStamp) + ", "s + "$forwarderChain=" + hilti::rt::to_string(forwarderChain) + ", "s + "$dllNameRVA=" + hilti::rt::to_string(dllNameRVA) + ", "s + "$importAddressTableRVA=" + hilti::rt::to_string(importAddressTableRVA) + ", "s + hilti::rt::to_string_for_print("$dllName=(optimized out)"_hs) + ", "s + "$importLookupTable=" + hilti::rt::to_string(importLookupTable) + ", "s + "$iltOffset=" + hilti::rt::to_string(iltOffset) + ", "s + "$dllNameOffset=" + hilti::rt::to_string(dllNameOffset) + "]"; |
343 | 0 | } |
344 | | }; |
345 | | |
346 | | struct ImportDirectoryTable : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ImportDirectoryTable> { |
347 | 3.59k | auto _t_self() { return ::hilti::rt::ValueReference<ImportDirectoryTable>::self(this); } |
348 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ImportDirectoryTableEntry>>> entries{}; |
349 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
350 | | auto _t_parse_entries_13_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<ImportDirectoryTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
351 | | auto _t_parse_PE__ImportDirectoryTable_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
352 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
353 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
354 | | ImportDirectoryTable(); |
355 | 0 | ImportDirectoryTable(const ImportDirectoryTable&) = default; |
356 | 0 | ImportDirectoryTable(ImportDirectoryTable&&) = default; |
357 | 0 | ImportDirectoryTable& operator=(const ImportDirectoryTable&) = default; |
358 | 1.19k | ImportDirectoryTable& operator=(ImportDirectoryTable&&) = default; |
359 | | explicit ImportDirectoryTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ImportDirectoryTableEntry>>>> entries); |
360 | | explicit ImportDirectoryTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
361 | | |
362 | 0 | std::string __to_string() const { |
363 | 0 | return "["s + "$entries=" + hilti::rt::to_string(entries) + "]"; |
364 | 0 | } |
365 | | }; |
366 | | |
367 | | struct ImageFile : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<ImageFile> { |
368 | 29.8k | auto _t_self() { return ::hilti::rt::ValueReference<ImageFile>::self(this); } |
369 | | ::hilti::rt::Set<::hilti::rt::integer::safe<uint64_t>> consumedOffsets{}; |
370 | | ::hilti::rt::Optional<DOS_Header> dosHeader{}; |
371 | | void _t_on_dosHeader(); |
372 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> dosStub{}; |
373 | | ::hilti::rt::Optional<PE_Header> peHeader{}; |
374 | | ::hilti::rt::Optional<OptionalHeader> optHeader{}; |
375 | | void _t_on_optHeader(); |
376 | | ::hilti::rt::Optional<::hilti::rt::Vector<SectionHeader>> sectionHeaders{}; |
377 | | void _t_on_sectionHeaders(); |
378 | | ::hilti::rt::Optional<::hilti::rt::Bytes> sectionData{}; |
379 | | void _t_on_sectionData(const ::hilti::rt::Bytes& _t_dd); |
380 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<ExportDirectoryTable>> exportTable{}; |
381 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<ImportDirectoryTable>> importTable{}; |
382 | | ::hilti::rt::stream::SafeConstIterator peStart{}; |
383 | | ::hilti::rt::integer::safe<uint16_t> peFileFormat{}; |
384 | | ::hilti::rt::integer::safe<uint64_t> dosStubSize{}; |
385 | | ::hilti::rt::integer::safe<uint64_t> headerPadSize{}; |
386 | | ::hilti::rt::integer::safe<uint64_t> fileSize{}; |
387 | | ::hilti::rt::integer::safe<uint64_t> sectionDataSize{}; |
388 | | ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>> exportDirInfo{}; |
389 | | ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>> importDirInfo{}; |
390 | | ::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>> sectionCounts{}; |
391 | | ::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::integer::safe<uint64_t>> sectionLengths{}; |
392 | | void _t_on_0x25_init(); |
393 | | ::hilti::rt::stream::SafeConstIterator _t_begin{}; |
394 | | ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator> _t_position_update{}; |
395 | | inline static ::spicy::rt::Parser _t_parser{}; |
396 | | ::std::shared_ptr<spicy::rt::sink::detail::State> _t_sink{}; |
397 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::stream::SafeConstIterator& _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
398 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
399 | | static auto parse2(::hilti::rt::ValueReference<ImageFile>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
400 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
401 | | auto _t_parse_sectionHeaders_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<SectionHeader>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
402 | | auto _t_parse_PE__ImageFile_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::stream::SafeConstIterator& _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
403 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
404 | | ImageFile(); |
405 | | ImageFile(const ImageFile&) = default; |
406 | 8.47k | ImageFile(ImageFile&&) = default; |
407 | | ImageFile& operator=(const ImageFile&) = default; |
408 | | ImageFile& operator=(ImageFile&&) = default; |
409 | | explicit ImageFile(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Set<::hilti::rt::integer::safe<uint64_t>>> consumedOffsets, ::hilti::rt::Optional<::hilti::rt::Optional<DOS_Header>> dosHeader, ::hilti::rt::Optional<::hilti::rt::Optional<PE_Header>> peHeader, ::hilti::rt::Optional<::hilti::rt::Optional<OptionalHeader>> optHeader, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<SectionHeader>>> sectionHeaders, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> sectionData, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<ExportDirectoryTable>>> exportTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<ImportDirectoryTable>>> importTable, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator> peStart, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> peFileFormat, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> dosStubSize, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> headerPadSize, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> fileSize, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> sectionDataSize, ::hilti::rt::Optional<::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>> exportDirInfo, ::hilti::rt::Optional<::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>> importDirInfo, ::hilti::rt::Optional<::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>>> sectionCounts, ::hilti::rt::Optional<::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::integer::safe<uint64_t>>> sectionLengths); |
410 | | |
411 | 0 | std::string __to_string() const { |
412 | 0 | return "["s + "$consumedOffsets=" + hilti::rt::to_string(consumedOffsets) + ", "s + "$dosHeader=" + hilti::rt::to_string(dosHeader) + ", "s + hilti::rt::to_string_for_print("$dosStub=(optimized out)"_hs) + ", "s + "$peHeader=" + hilti::rt::to_string(peHeader) + ", "s + "$optHeader=" + hilti::rt::to_string(optHeader) + ", "s + "$sectionHeaders=" + hilti::rt::to_string(sectionHeaders) + ", "s + "$sectionData=" + hilti::rt::to_string(sectionData) + ", "s + "$exportTable=" + hilti::rt::to_string(exportTable) + ", "s + "$importTable=" + hilti::rt::to_string(importTable) + ", "s + "$peStart=" + hilti::rt::to_string(peStart) + ", "s + "$peFileFormat=" + hilti::rt::to_string(peFileFormat) + ", "s + "$dosStubSize=" + hilti::rt::to_string(dosStubSize) + ", "s + "$headerPadSize=" + hilti::rt::to_string(headerPadSize) + ", "s + "$fileSize=" + hilti::rt::to_string(fileSize) + ", "s + "$sectionDataSize=" + hilti::rt::to_string(sectionDataSize) + ", "s + "$exportDirInfo=" + hilti::rt::to_string(exportDirInfo) + ", "s + "$importDirInfo=" + hilti::rt::to_string(importDirInfo) + ", "s + "$sectionCounts=" + hilti::rt::to_string(sectionCounts) + ", "s + "$sectionLengths=" + hilti::rt::to_string(sectionLengths) + "]"; |
413 | 0 | } |
414 | | }; |
415 | | |
416 | | struct ExportOrdinalTable : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ExportOrdinalTable> { |
417 | 528 | auto _t_self() { return ::hilti::rt::ValueReference<ExportOrdinalTable>::self(this); } |
418 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>> entries{}; |
419 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>>; |
420 | | auto _t_parse_entries_11_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>& _t_dst) -> ::hilti::rt::stream::View; |
421 | | auto _t_parse_PE__ExportOrdinalTable_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>>; |
422 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
423 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
424 | | ::hilti::rt::integer::safe<uint32_t> _t_p_entryCount{}; |
425 | | ExportOrdinalTable(); |
426 | 0 | ExportOrdinalTable(const ExportOrdinalTable&) = default; |
427 | 0 | ExportOrdinalTable(ExportOrdinalTable&&) = default; |
428 | 0 | ExportOrdinalTable& operator=(const ExportOrdinalTable&) = default; |
429 | 176 | ExportOrdinalTable& operator=(ExportOrdinalTable&&) = default; |
430 | | explicit ExportOrdinalTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>>> entries); |
431 | | explicit ExportOrdinalTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f, const ::hilti::rt::integer::safe<uint32_t>& _t_p_entryCount); |
432 | | |
433 | 0 | std::string __to_string() const { |
434 | 0 | return "["s + "$entries=" + hilti::rt::to_string(entries) + "]"; |
435 | 0 | } |
436 | | }; |
437 | | |
438 | | struct ExportNamePtrTableEntry : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ExportNamePtrTableEntry> { |
439 | 265k | auto _t_self() { return ::hilti::rt::ValueReference<ExportNamePtrTableEntry>::self(this); } |
440 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> rva{}; |
441 | | void _t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
442 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> name{}; |
443 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> nameOffset{}; |
444 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
445 | | auto _t_parse_PE__ExportNamePtrTableEntry_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
446 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
447 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
448 | | ExportNamePtrTableEntry(); |
449 | 0 | ExportNamePtrTableEntry(const ExportNamePtrTableEntry&) = default; |
450 | 176k | ExportNamePtrTableEntry(ExportNamePtrTableEntry&&) = default; |
451 | 0 | ExportNamePtrTableEntry& operator=(const ExportNamePtrTableEntry&) = default; |
452 | | ExportNamePtrTableEntry& operator=(ExportNamePtrTableEntry&&) = default; |
453 | | explicit ExportNamePtrTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> nameOffset); |
454 | | explicit ExportNamePtrTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
455 | | |
456 | 0 | std::string __to_string() const { |
457 | 0 | return "["s + hilti::rt::to_string_for_print("$rva=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$name=(optimized out)"_hs) + ", "s + "$nameOffset=" + hilti::rt::to_string(nameOffset) + "]"; |
458 | 0 | } |
459 | | }; |
460 | | |
461 | | struct ExportNamePtrTable : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ExportNamePtrTable> { |
462 | 987 | auto _t_self() { return ::hilti::rt::ValueReference<ExportNamePtrTable>::self(this); } |
463 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ExportNamePtrTableEntry>>> entries{}; |
464 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
465 | | auto _t_parse_entries_10_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<ExportNamePtrTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
466 | | auto _t_parse_PE__ExportNamePtrTable_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
467 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
468 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
469 | | ::hilti::rt::integer::safe<uint32_t> _t_p_entryCount{}; |
470 | | ExportNamePtrTable(); |
471 | 0 | ExportNamePtrTable(const ExportNamePtrTable&) = default; |
472 | 0 | ExportNamePtrTable(ExportNamePtrTable&&) = default; |
473 | 0 | ExportNamePtrTable& operator=(const ExportNamePtrTable&) = default; |
474 | 329 | ExportNamePtrTable& operator=(ExportNamePtrTable&&) = default; |
475 | | explicit ExportNamePtrTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ExportNamePtrTableEntry>>>> entries); |
476 | | explicit ExportNamePtrTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f, const ::hilti::rt::integer::safe<uint32_t>& _t_p_entryCount); |
477 | | |
478 | 0 | std::string __to_string() const { |
479 | 0 | return "["s + "$entries=" + hilti::rt::to_string(entries) + "]"; |
480 | 0 | } |
481 | | }; |
482 | | |
483 | | struct ExportDirectoryTable : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ExportDirectoryTable> { |
484 | 6.89k | auto _t_self() { return ::hilti::rt::ValueReference<ExportDirectoryTable>::self(this); } |
485 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> flags{}; |
486 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> timeDateStamp{}; |
487 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> majorVersion{}; |
488 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> minorVersion{}; |
489 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> dllNameRVA{}; |
490 | | void _t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
491 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> ordinalBase{}; |
492 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> addressTableCount{}; |
493 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> namePtrTableCount{}; |
494 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> addressTableRVA{}; |
495 | | void _t_on_addressTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
496 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> namePtrTableRVA{}; |
497 | | void _t_on_namePtrTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
498 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> ordinalTableRVA{}; |
499 | | void _t_on_ordinalTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
500 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> dllName{}; |
501 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<ExportAddressTable>> addressTable{}; |
502 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<ExportNamePtrTable>> namePtrTable{}; |
503 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<ExportOrdinalTable>> ordinalTable{}; |
504 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> dllNameOffset{}; |
505 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> addressTableOffset{}; |
506 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> namePtrTableOffset{}; |
507 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> ordinalTableOffset{}; |
508 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
509 | | auto _t_parse_PE__ExportDirectoryTable_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
510 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
511 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
512 | | ExportDirectoryTable(); |
513 | 0 | ExportDirectoryTable(const ExportDirectoryTable&) = default; |
514 | 0 | ExportDirectoryTable(ExportDirectoryTable&&) = default; |
515 | 0 | ExportDirectoryTable& operator=(const ExportDirectoryTable&) = default; |
516 | 1.17k | ExportDirectoryTable& operator=(ExportDirectoryTable&&) = default; |
517 | | explicit ExportDirectoryTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> addressTableCount, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> namePtrTableCount, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<ExportAddressTable>>> addressTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<ExportNamePtrTable>>> namePtrTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<ExportOrdinalTable>>> ordinalTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> dllNameOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> addressTableOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> namePtrTableOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> ordinalTableOffset); |
518 | | explicit ExportDirectoryTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
519 | | |
520 | 0 | std::string __to_string() const { |
521 | 0 | return "["s + hilti::rt::to_string_for_print("$flags=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$timeDateStamp=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$majorVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$minorVersion=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$dllNameRVA=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$ordinalBase=(optimized out)"_hs) + ", "s + "$addressTableCount=" + hilti::rt::to_string(addressTableCount) + ", "s + "$namePtrTableCount=" + hilti::rt::to_string(namePtrTableCount) + ", "s + hilti::rt::to_string_for_print("$addressTableRVA=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$namePtrTableRVA=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$ordinalTableRVA=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$dllName=(optimized out)"_hs) + ", "s + "$addressTable=" + hilti::rt::to_string(addressTable) + ", "s + "$namePtrTable=" + hilti::rt::to_string(namePtrTable) + ", "s + "$ordinalTable=" + hilti::rt::to_string(ordinalTable) + ", "s + "$dllNameOffset=" + hilti::rt::to_string(dllNameOffset) + ", "s + "$addressTableOffset=" + hilti::rt::to_string(addressTableOffset) + ", "s + "$namePtrTableOffset=" + hilti::rt::to_string(namePtrTableOffset) + ", "s + "$ordinalTableOffset=" + hilti::rt::to_string(ordinalTableOffset) + "]"; |
522 | 0 | } |
523 | | }; |
524 | | |
525 | | struct ExportAddressTableEntry : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ExportAddressTableEntry> { |
526 | 825k | auto _t_self() { return ::hilti::rt::ValueReference<ExportAddressTableEntry>::self(this); } |
527 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> rva{}; |
528 | | void _t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd); |
529 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> forwarder{}; |
530 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> forwarderOffset{}; |
531 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
532 | | auto _t_parse_PE__ExportAddressTableEntry_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
533 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
534 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
535 | | ExportAddressTableEntry(); |
536 | 0 | ExportAddressTableEntry(const ExportAddressTableEntry&) = default; |
537 | 550k | ExportAddressTableEntry(ExportAddressTableEntry&&) = default; |
538 | 0 | ExportAddressTableEntry& operator=(const ExportAddressTableEntry&) = default; |
539 | | ExportAddressTableEntry& operator=(ExportAddressTableEntry&&) = default; |
540 | | explicit ExportAddressTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> forwarderOffset); |
541 | | explicit ExportAddressTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f); |
542 | | |
543 | 0 | std::string __to_string() const { |
544 | 0 | return "["s + hilti::rt::to_string_for_print("$rva=(optimized out)"_hs) + ", "s + hilti::rt::to_string_for_print("$forwarder=(optimized out)"_hs) + ", "s + "$forwarderOffset=" + hilti::rt::to_string(forwarderOffset) + "]"; |
545 | 0 | } |
546 | | }; |
547 | | |
548 | | struct ExportAddressTable : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<ExportAddressTable> { |
549 | 1.23k | auto _t_self() { return ::hilti::rt::ValueReference<ExportAddressTable>::self(this); } |
550 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ExportAddressTableEntry>>> entries{}; |
551 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
552 | | auto _t_parse_entries_9_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<ExportAddressTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
553 | | auto _t_parse_PE__ExportAddressTable_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
554 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
555 | | ::hilti::rt::WeakReference<ImageFile> _t_p_f{}; |
556 | | ::hilti::rt::integer::safe<uint32_t> _t_p_entryCount{}; |
557 | | ExportAddressTable(); |
558 | 0 | ExportAddressTable(const ExportAddressTable&) = default; |
559 | 0 | ExportAddressTable(ExportAddressTable&&) = default; |
560 | 0 | ExportAddressTable& operator=(const ExportAddressTable&) = default; |
561 | 411 | ExportAddressTable& operator=(ExportAddressTable&&) = default; |
562 | | explicit ExportAddressTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<ExportAddressTableEntry>>>> entries); |
563 | | explicit ExportAddressTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<ImageFile>& _t_p_f, const ::hilti::rt::integer::safe<uint32_t>& _t_p_entryCount); |
564 | | |
565 | 0 | std::string __to_string() const { |
566 | 0 | return "["s + "$entries=" + hilti::rt::to_string(entries) + "]"; |
567 | 0 | } |
568 | | }; |
569 | | |
570 | | struct NullTerminatedString : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<NullTerminatedString> { |
571 | 46.7k | auto _t_self() { return ::hilti::rt::ValueReference<NullTerminatedString>::self(this); } |
572 | | ::hilti::rt::Optional<::hilti::rt::Bytes> s{}; |
573 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>>; |
574 | | auto _t_convert() -> ::hilti::rt::Bytes; |
575 | | auto _t_parse_PE__NullTerminatedString_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>>; |
576 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
577 | | NullTerminatedString(); |
578 | | NullTerminatedString(const NullTerminatedString&) = default; |
579 | 15.4k | NullTerminatedString(NullTerminatedString&&) = default; |
580 | | NullTerminatedString& operator=(const NullTerminatedString&) = default; |
581 | 15.6k | NullTerminatedString& operator=(NullTerminatedString&&) = default; |
582 | | explicit NullTerminatedString(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> s); |
583 | | |
584 | 0 | std::string __to_string() const { |
585 | 0 | return "["s + "$s=" + hilti::rt::to_string(s) + "]"; |
586 | 0 | } |
587 | | }; |
588 | | |
589 | | constexpr ::hilti::rt::integer::safe<uint64_t> DOS_HeaderSize = ::hilti::rt::integer::safe<std::uint64_t>{64U}; |
590 | | constexpr ::hilti::rt::integer::safe<uint64_t> DataDirectorySize = ::hilti::rt::integer::safe<std::uint64_t>{8U}; |
591 | | constexpr ::hilti::rt::integer::safe<uint64_t> MaxDirectories = ::hilti::rt::integer::safe<std::uint64_t>{128U}; |
592 | | constexpr ::hilti::rt::integer::safe<uint64_t> MaxExportSyms = ::hilti::rt::integer::safe<std::uint64_t>{16384U}; |
593 | | const ::hilti::rt::integer::safe<uint64_t> MaxFileSize = ::hilti::rt::integer::safe<std::uint64_t>{256U} * ::hilti::rt::integer::safe<std::uint64_t>{1024U} * ::hilti::rt::integer::safe<std::uint64_t>{1024U}; |
594 | | constexpr ::hilti::rt::integer::safe<uint64_t> MaxImportDLLs = ::hilti::rt::integer::safe<std::uint64_t>{1024U}; |
595 | | constexpr ::hilti::rt::integer::safe<uint64_t> MaxImportSyms = ::hilti::rt::integer::safe<std::uint64_t>{16384U}; |
596 | | const ::hilti::rt::integer::safe<uint64_t> MaxSectionSize = ::hilti::rt::integer::safe<std::uint64_t>{5U} * ::hilti::rt::integer::safe<std::uint64_t>{1024U} * ::hilti::rt::integer::safe<std::uint64_t>{1024U}; |
597 | | constexpr ::hilti::rt::integer::safe<uint64_t> MaxSections = ::hilti::rt::integer::safe<std::uint64_t>{1024U}; |
598 | | constexpr ::hilti::rt::integer::safe<uint64_t> MaxStringSize = ::hilti::rt::integer::safe<std::uint64_t>{512U}; |
599 | | const ::hilti::rt::integer::safe<uint64_t> MaxStubSize = ::hilti::rt::integer::safe<std::uint64_t>{4U} * ::hilti::rt::integer::safe<std::uint64_t>{1024U} * ::hilti::rt::integer::safe<std::uint64_t>{1024U}; |
600 | | constexpr ::hilti::rt::integer::safe<uint64_t> OptionalHeaderSize32 = ::hilti::rt::integer::safe<std::uint64_t>{96U}; |
601 | | constexpr ::hilti::rt::integer::safe<uint64_t> OptionalHeaderSize64 = ::hilti::rt::integer::safe<std::uint64_t>{112U}; |
602 | | constexpr ::hilti::rt::integer::safe<uint16_t> PE32 = ::hilti::rt::integer::safe<std::uint16_t>{267U}; |
603 | | constexpr ::hilti::rt::integer::safe<uint16_t> PE32_Plus = ::hilti::rt::integer::safe<std::uint16_t>{523U}; |
604 | | const ::hilti::rt::Bytes _t_ctor__bytes = "MZ"_b; |
605 | | constexpr ::hilti::rt::integer::safe<uint64_t> PE_HeaderSize = ::hilti::rt::integer::safe<std::uint64_t>{24U}; |
606 | | constexpr ::hilti::rt::integer::safe<uint64_t> SectionHeaderSize = ::hilti::rt::integer::safe<std::uint64_t>{40U}; |
607 | | const ::hilti::rt::Bytes _t_ctor__bytes_2 = "PE\000\000"_b; |
608 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25is_filter = ::hilti::rt::Bool{false}; |
609 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25supports_filters = ::hilti::rt::Bool{false}; |
610 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25supports_sinks = ::hilti::rt::Bool{false}; |
611 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25synchronization = ::hilti::rt::Bool{false}; |
612 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25uses_offset = ::hilti::rt::Bool{false}; |
613 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25uses_random_access = ::hilti::rt::Bool{false}; |
614 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25uses_stream = ::hilti::rt::Bool{false}; |
615 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DOS_Header0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
616 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25is_filter = ::hilti::rt::Bool{false}; |
617 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25supports_filters = ::hilti::rt::Bool{false}; |
618 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25supports_sinks = ::hilti::rt::Bool{false}; |
619 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25synchronization = ::hilti::rt::Bool{false}; |
620 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25uses_offset = ::hilti::rt::Bool{false}; |
621 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25uses_random_access = ::hilti::rt::Bool{false}; |
622 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25uses_stream = ::hilti::rt::Bool{false}; |
623 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40DataDirectory0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
624 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25is_filter = ::hilti::rt::Bool{false}; |
625 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25supports_filters = ::hilti::rt::Bool{false}; |
626 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25supports_sinks = ::hilti::rt::Bool{false}; |
627 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25synchronization = ::hilti::rt::Bool{false}; |
628 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25uses_offset = ::hilti::rt::Bool{false}; |
629 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25uses_random_access = ::hilti::rt::Bool{false}; |
630 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25uses_stream = ::hilti::rt::Bool{false}; |
631 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTable0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
632 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25is_filter = ::hilti::rt::Bool{false}; |
633 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25supports_filters = ::hilti::rt::Bool{false}; |
634 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25supports_sinks = ::hilti::rt::Bool{false}; |
635 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25synchronization = ::hilti::rt::Bool{false}; |
636 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25uses_offset = ::hilti::rt::Bool{false}; |
637 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25uses_random_access = ::hilti::rt::Bool{false}; |
638 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25uses_stream = ::hilti::rt::Bool{false}; |
639 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportAddressTableEntry0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
640 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25is_filter = ::hilti::rt::Bool{false}; |
641 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25supports_filters = ::hilti::rt::Bool{false}; |
642 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25supports_sinks = ::hilti::rt::Bool{false}; |
643 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25synchronization = ::hilti::rt::Bool{false}; |
644 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25uses_offset = ::hilti::rt::Bool{false}; |
645 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25uses_random_access = ::hilti::rt::Bool{false}; |
646 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25uses_stream = ::hilti::rt::Bool{false}; |
647 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportDirectoryTable0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
648 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25is_filter = ::hilti::rt::Bool{false}; |
649 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25supports_filters = ::hilti::rt::Bool{false}; |
650 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25supports_sinks = ::hilti::rt::Bool{false}; |
651 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25synchronization = ::hilti::rt::Bool{false}; |
652 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25uses_offset = ::hilti::rt::Bool{false}; |
653 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25uses_random_access = ::hilti::rt::Bool{false}; |
654 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25uses_stream = ::hilti::rt::Bool{false}; |
655 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTable0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
656 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25is_filter = ::hilti::rt::Bool{false}; |
657 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25supports_filters = ::hilti::rt::Bool{false}; |
658 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25supports_sinks = ::hilti::rt::Bool{false}; |
659 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25synchronization = ::hilti::rt::Bool{false}; |
660 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25uses_offset = ::hilti::rt::Bool{false}; |
661 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25uses_random_access = ::hilti::rt::Bool{false}; |
662 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25uses_stream = ::hilti::rt::Bool{false}; |
663 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportNamePtrTableEntry0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
664 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25is_filter = ::hilti::rt::Bool{false}; |
665 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25supports_filters = ::hilti::rt::Bool{false}; |
666 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25supports_sinks = ::hilti::rt::Bool{false}; |
667 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25synchronization = ::hilti::rt::Bool{false}; |
668 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25uses_offset = ::hilti::rt::Bool{false}; |
669 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25uses_random_access = ::hilti::rt::Bool{false}; |
670 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25uses_stream = ::hilti::rt::Bool{false}; |
671 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ExportOrdinalTable0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
672 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25is_filter = ::hilti::rt::Bool{false}; |
673 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25supports_filters = ::hilti::rt::Bool{false}; |
674 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25supports_sinks = ::hilti::rt::Bool{false}; |
675 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25synchronization = ::hilti::rt::Bool{false}; |
676 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25uses_offset = ::hilti::rt::Bool{false}; |
677 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25uses_random_access = ::hilti::rt::Bool{false}; |
678 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25uses_stream = ::hilti::rt::Bool{false}; |
679 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40HintName0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
680 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25is_filter = ::hilti::rt::Bool{false}; |
681 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25supports_filters = ::hilti::rt::Bool{false}; |
682 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25supports_sinks = ::hilti::rt::Bool{false}; |
683 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25synchronization = ::hilti::rt::Bool{false}; |
684 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25uses_offset = ::hilti::rt::Bool{false}; |
685 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25uses_random_access = ::hilti::rt::Bool{true}; |
686 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25uses_stream = ::hilti::rt::Bool{false}; |
687 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImageFile0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
688 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25is_filter = ::hilti::rt::Bool{false}; |
689 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25supports_filters = ::hilti::rt::Bool{false}; |
690 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25supports_sinks = ::hilti::rt::Bool{false}; |
691 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25synchronization = ::hilti::rt::Bool{false}; |
692 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25uses_offset = ::hilti::rt::Bool{false}; |
693 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25uses_random_access = ::hilti::rt::Bool{false}; |
694 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25uses_stream = ::hilti::rt::Bool{false}; |
695 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTable0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
696 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25is_filter = ::hilti::rt::Bool{false}; |
697 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25supports_filters = ::hilti::rt::Bool{false}; |
698 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25supports_sinks = ::hilti::rt::Bool{false}; |
699 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25synchronization = ::hilti::rt::Bool{false}; |
700 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25uses_offset = ::hilti::rt::Bool{false}; |
701 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25uses_random_access = ::hilti::rt::Bool{false}; |
702 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25uses_stream = ::hilti::rt::Bool{false}; |
703 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportDirectoryTableEntry0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
704 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25is_filter = ::hilti::rt::Bool{false}; |
705 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25supports_filters = ::hilti::rt::Bool{false}; |
706 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25supports_sinks = ::hilti::rt::Bool{false}; |
707 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25synchronization = ::hilti::rt::Bool{false}; |
708 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25uses_offset = ::hilti::rt::Bool{false}; |
709 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25uses_random_access = ::hilti::rt::Bool{false}; |
710 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25uses_stream = ::hilti::rt::Bool{false}; |
711 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTable0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
712 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25is_filter = ::hilti::rt::Bool{false}; |
713 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25supports_filters = ::hilti::rt::Bool{false}; |
714 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25supports_sinks = ::hilti::rt::Bool{false}; |
715 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25synchronization = ::hilti::rt::Bool{false}; |
716 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25uses_offset = ::hilti::rt::Bool{false}; |
717 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25uses_random_access = ::hilti::rt::Bool{false}; |
718 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25uses_stream = ::hilti::rt::Bool{false}; |
719 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40ImportLookupTableEntry0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
720 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25is_filter = ::hilti::rt::Bool{false}; |
721 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25supports_filters = ::hilti::rt::Bool{false}; |
722 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25supports_sinks = ::hilti::rt::Bool{false}; |
723 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25synchronization = ::hilti::rt::Bool{false}; |
724 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25uses_offset = ::hilti::rt::Bool{false}; |
725 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25uses_random_access = ::hilti::rt::Bool{false}; |
726 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25uses_stream = ::hilti::rt::Bool{false}; |
727 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40NullTerminatedString0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
728 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25is_filter = ::hilti::rt::Bool{false}; |
729 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25supports_filters = ::hilti::rt::Bool{false}; |
730 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25supports_sinks = ::hilti::rt::Bool{false}; |
731 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25synchronization = ::hilti::rt::Bool{false}; |
732 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25uses_offset = ::hilti::rt::Bool{false}; |
733 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25uses_random_access = ::hilti::rt::Bool{false}; |
734 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25uses_stream = ::hilti::rt::Bool{false}; |
735 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40OptionalHeader0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
736 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25is_filter = ::hilti::rt::Bool{false}; |
737 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25supports_filters = ::hilti::rt::Bool{false}; |
738 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25supports_sinks = ::hilti::rt::Bool{false}; |
739 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25synchronization = ::hilti::rt::Bool{false}; |
740 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25uses_offset = ::hilti::rt::Bool{false}; |
741 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25uses_random_access = ::hilti::rt::Bool{false}; |
742 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25uses_stream = ::hilti::rt::Bool{false}; |
743 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40PE_Header0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
744 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25is_filter = ::hilti::rt::Bool{false}; |
745 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25supports_filters = ::hilti::rt::Bool{false}; |
746 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25supports_sinks = ::hilti::rt::Bool{false}; |
747 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25synchronization = ::hilti::rt::Bool{false}; |
748 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25uses_offset = ::hilti::rt::Bool{false}; |
749 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25uses_random_access = ::hilti::rt::Bool{false}; |
750 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25uses_stream = ::hilti::rt::Bool{false}; |
751 | | const ::hilti::rt::Bool _t_feat0x25PE0x400x40SectionHeader0x25uses_sync_advance = ::hilti::rt::Bool{false}; |
752 | | } |
753 | | |
754 | | namespace hlt_pe_ImageFile::PE::ImageFile { |
755 | | using Type = hlt_internal_pe_ImageFile::PE::ImageFile; |
756 | | } |
757 | | |
758 | | namespace hlt_internal_pe_ImageFile::PE { |
759 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::DOS_Header& x) -> std::ostream&; |
760 | 8.47k | DOS_Header::DOS_Header() { |
761 | 8.47k | } |
762 | | |
763 | 0 | DOS_Header::DOS_Header(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> peHeaderOffset) : DOS_Header() { |
764 | 0 | if ( peHeaderOffset ) this->peHeaderOffset = std::move(*peHeaderOffset); |
765 | 0 | } |
766 | | |
767 | | |
768 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::DataDirectory& x) -> std::ostream&; |
769 | 23.4k | DataDirectory::DataDirectory() { |
770 | 23.4k | } |
771 | | |
772 | 0 | DataDirectory::DataDirectory(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> virtualAddress, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> size) : DataDirectory() { |
773 | 0 | if ( virtualAddress ) this->virtualAddress = std::move(*virtualAddress); |
774 | 0 | if ( size ) this->size = std::move(*size); |
775 | 0 | } |
776 | | |
777 | | |
778 | | } |
779 | | |
780 | | namespace hilti::rt::detail::adl { |
781 | | inline auto to_string(hlt_internal_pe_ImageFile::PE::Dir x, adl::tag) -> std::string; |
782 | | } |
783 | | |
784 | | namespace hlt_internal_pe_ImageFile::PE { |
785 | | inline auto operator<<(std::ostream& o, Dir x) -> std::ostream&; |
786 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::HintName& x) -> std::ostream&; |
787 | 6.65k | HintName::HintName() { |
788 | 6.65k | } |
789 | | |
790 | | |
791 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::OptionalHeader& x) -> std::ostream&; |
792 | 7.75k | OptionalHeader::OptionalHeader() { |
793 | 7.75k | } |
794 | | |
795 | 0 | OptionalHeader::OptionalHeader(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> magic, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> sizeOfHeaders, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> numberOfRvaAndSizes, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::DataDirectory>>> dataDirectories) : OptionalHeader() { |
796 | 0 | if ( magic ) this->magic = std::move(*magic); |
797 | 0 | if ( sizeOfHeaders ) this->sizeOfHeaders = std::move(*sizeOfHeaders); |
798 | 0 | if ( numberOfRvaAndSizes ) this->numberOfRvaAndSizes = std::move(*numberOfRvaAndSizes); |
799 | 0 | if ( dataDirectories ) this->dataDirectories = std::move(*dataDirectories); |
800 | 0 | } |
801 | | |
802 | | |
803 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::PE_Header& x) -> std::ostream&; |
804 | 8.04k | PE_Header::PE_Header() { |
805 | 8.04k | } |
806 | | |
807 | 0 | PE_Header::PE_Header(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> numberOfSections, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> sizeOfOptionalHeader) : PE_Header() { |
808 | 0 | if ( numberOfSections ) this->numberOfSections = std::move(*numberOfSections); |
809 | 0 | if ( sizeOfOptionalHeader ) this->sizeOfOptionalHeader = std::move(*sizeOfOptionalHeader); |
810 | 0 | } |
811 | | |
812 | | |
813 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::SectionHeader& x) -> std::ostream&; |
814 | 115k | SectionHeader::SectionHeader() { |
815 | 115k | } |
816 | | |
817 | 0 | SectionHeader::SectionHeader(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> name, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> virtualAddress, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> sizeOfRawData, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> pointerToRawData) : SectionHeader() { |
818 | 0 | if ( name ) this->name = std::move(*name); |
819 | 0 | if ( virtualAddress ) this->virtualAddress = std::move(*virtualAddress); |
820 | 0 | if ( sizeOfRawData ) this->sizeOfRawData = std::move(*sizeOfRawData); |
821 | 0 | if ( pointerToRawData ) this->pointerToRawData = std::move(*pointerToRawData); |
822 | 0 | } |
823 | | |
824 | | |
825 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry& x) -> std::ostream&; |
826 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImageFile& x) -> std::ostream&; |
827 | | extern void _t_hook_ImportLookupTableEntry__t_on_f32(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>& _t_self); |
828 | | extern void _t_hook_ImportLookupTableEntry__t_on_f64(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>& _t_self); |
829 | | extern void _t_hook_ImportLookupTableEntry__t_on__anon_12(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>& _t_self); |
830 | 0 | ImportLookupTableEntry::ImportLookupTableEntry() { |
831 | 0 | } |
832 | | |
833 | 5.81M | ImportLookupTableEntry::ImportLookupTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
834 | 5.81M | } |
835 | | |
836 | 0 | ImportLookupTableEntry::ImportLookupTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> full, ::hilti::rt::Optional<::hilti::rt::Bool> importByName, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> hintNameRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>>> f32, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>>> f64, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::HintName>> hintName, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> hintNameOffset) : ImportLookupTableEntry() { |
837 | 0 | if ( full ) this->full = std::move(*full); |
838 | 0 | if ( importByName ) this->importByName = std::move(*importByName); |
839 | 0 | if ( hintNameRVA ) this->hintNameRVA = std::move(*hintNameRVA); |
840 | 0 | if ( f32 ) this->f32 = std::move(*f32); |
841 | 0 | if ( f64 ) this->f64 = std::move(*f64); |
842 | 0 | if ( hintName ) this->hintName = std::move(*hintName); |
843 | 0 | if ( hintNameOffset ) this->hintNameOffset = std::move(*hintNameOffset); |
844 | 0 | } |
845 | | |
846 | | |
847 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportLookupTable& x) -> std::ostream&; |
848 | 5.39k | ImportLookupTable::ImportLookupTable() { |
849 | 5.39k | } |
850 | | |
851 | 5.39k | ImportLookupTable::ImportLookupTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
852 | 5.39k | } |
853 | | |
854 | 0 | ImportLookupTable::ImportLookupTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>>>> entries) : ImportLookupTable() { |
855 | 0 | if ( entries ) this->entries = std::move(*entries); |
856 | 0 | } |
857 | | |
858 | | |
859 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry& x) -> std::ostream&; |
860 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_importLookupTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>& _t_self); |
861 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>& _t_self); |
862 | 0 | ImportDirectoryTableEntry::ImportDirectoryTableEntry() { |
863 | 0 | } |
864 | | |
865 | 84.2k | ImportDirectoryTableEntry::ImportDirectoryTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
866 | 84.2k | } |
867 | | |
868 | 0 | ImportDirectoryTableEntry::ImportDirectoryTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> importLookupTableRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> timeDateStamp, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> forwarderChain, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> dllNameRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> importAddressTableRVA, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTable>>> importLookupTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> iltOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> dllNameOffset) : ImportDirectoryTableEntry() { |
869 | 0 | if ( importLookupTableRVA ) this->importLookupTableRVA = std::move(*importLookupTableRVA); |
870 | 0 | if ( timeDateStamp ) this->timeDateStamp = std::move(*timeDateStamp); |
871 | 0 | if ( forwarderChain ) this->forwarderChain = std::move(*forwarderChain); |
872 | 0 | if ( dllNameRVA ) this->dllNameRVA = std::move(*dllNameRVA); |
873 | 0 | if ( importAddressTableRVA ) this->importAddressTableRVA = std::move(*importAddressTableRVA); |
874 | 0 | if ( importLookupTable ) this->importLookupTable = std::move(*importLookupTable); |
875 | 0 | if ( iltOffset ) this->iltOffset = std::move(*iltOffset); |
876 | 0 | if ( dllNameOffset ) this->dllNameOffset = std::move(*dllNameOffset); |
877 | 0 | } |
878 | | |
879 | | |
880 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportDirectoryTable& x) -> std::ostream&; |
881 | 1.19k | ImportDirectoryTable::ImportDirectoryTable() { |
882 | 1.19k | } |
883 | | |
884 | 1.19k | ImportDirectoryTable::ImportDirectoryTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
885 | 1.19k | } |
886 | | |
887 | 0 | ImportDirectoryTable::ImportDirectoryTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>>>> entries) : ImportDirectoryTable() { |
888 | 0 | if ( entries ) this->entries = std::move(*entries); |
889 | 0 | } |
890 | | |
891 | | |
892 | | extern void _t_hook_ImageFile__t_on_dosHeader(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_self); |
893 | | extern void _t_hook_ImageFile__t_on_optHeader(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_self); |
894 | | extern void _t_hook_ImageFile__t_on_sectionHeaders(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_self); |
895 | | extern void _t_hook_ImageFile__t_on_sectionData(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_self); |
896 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportDirectoryTable& x) -> std::ostream&; |
897 | | extern void _t_hook_ImageFile__t_on_0x25_init(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_self); |
898 | 6.27M | ImageFile::ImageFile() { |
899 | 6.27M | { |
900 | 6.27M | exportDirInfo = ::hilti::rt::tuple::make_from_optionals<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>(::hilti::rt::optional::make<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>>({}), ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(::hilti::rt::integer::safe<uint64_t>{})); |
901 | 6.27M | importDirInfo = ::hilti::rt::tuple::make_from_optionals<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>(::hilti::rt::optional::make<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>>({}), ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(::hilti::rt::integer::safe<uint64_t>{})); |
902 | 6.27M | } |
903 | 6.27M | } |
904 | | |
905 | 0 | ImageFile::ImageFile(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Set<::hilti::rt::integer::safe<uint64_t>>> consumedOffsets, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::DOS_Header>> dosHeader, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::PE_Header>> peHeader, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::OptionalHeader>> optHeader, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::SectionHeader>>> sectionHeaders, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> sectionData, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>>> exportTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTable>>> importTable, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator> peStart, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> peFileFormat, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> dosStubSize, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> headerPadSize, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> fileSize, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> sectionDataSize, ::hilti::rt::Optional<::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>> exportDirInfo, ::hilti::rt::Optional<::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>> importDirInfo, ::hilti::rt::Optional<::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>>> sectionCounts, ::hilti::rt::Optional<::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::integer::safe<uint64_t>>> sectionLengths) : ImageFile() { |
906 | 0 | if ( consumedOffsets ) this->consumedOffsets = std::move(*consumedOffsets); |
907 | 0 | if ( dosHeader ) this->dosHeader = std::move(*dosHeader); |
908 | 0 | if ( peHeader ) this->peHeader = std::move(*peHeader); |
909 | 0 | if ( optHeader ) this->optHeader = std::move(*optHeader); |
910 | 0 | if ( sectionHeaders ) this->sectionHeaders = std::move(*sectionHeaders); |
911 | 0 | if ( sectionData ) this->sectionData = std::move(*sectionData); |
912 | 0 | if ( exportTable ) this->exportTable = std::move(*exportTable); |
913 | 0 | if ( importTable ) this->importTable = std::move(*importTable); |
914 | 0 | if ( peStart ) this->peStart = std::move(*peStart); |
915 | 0 | if ( peFileFormat ) this->peFileFormat = std::move(*peFileFormat); |
916 | 0 | if ( dosStubSize ) this->dosStubSize = std::move(*dosStubSize); |
917 | 0 | if ( headerPadSize ) this->headerPadSize = std::move(*headerPadSize); |
918 | 0 | if ( fileSize ) this->fileSize = std::move(*fileSize); |
919 | 0 | if ( sectionDataSize ) this->sectionDataSize = std::move(*sectionDataSize); |
920 | 0 | if ( exportDirInfo ) this->exportDirInfo = std::move(*exportDirInfo); |
921 | 0 | if ( importDirInfo ) this->importDirInfo = std::move(*importDirInfo); |
922 | 0 | if ( sectionCounts ) this->sectionCounts = std::move(*sectionCounts); |
923 | 0 | if ( sectionLengths ) this->sectionLengths = std::move(*sectionLengths); |
924 | 0 | } |
925 | | |
926 | | |
927 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportAddressTable& x) -> std::ostream&; |
928 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry& x) -> std::ostream&; |
929 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportNamePtrTable& x) -> std::ostream&; |
930 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry& x) -> std::ostream&; |
931 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportOrdinalTable& x) -> std::ostream&; |
932 | 176 | ExportOrdinalTable::ExportOrdinalTable() { |
933 | 176 | } |
934 | | |
935 | 176 | ExportOrdinalTable::ExportOrdinalTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f, const ::hilti::rt::integer::safe<uint32_t>& _t_p_entryCount) : _t_p_f(_t_p_f), _t_p_entryCount(_t_p_entryCount) { |
936 | 176 | } |
937 | | |
938 | 0 | ExportOrdinalTable::ExportOrdinalTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>>> entries) : ExportOrdinalTable() { |
939 | 0 | if ( entries ) this->entries = std::move(*entries); |
940 | 0 | } |
941 | | |
942 | | |
943 | | extern void _t_hook_ExportNamePtrTableEntry__t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>& _t_self); |
944 | 0 | ExportNamePtrTableEntry::ExportNamePtrTableEntry() { |
945 | 0 | } |
946 | | |
947 | 88.3k | ExportNamePtrTableEntry::ExportNamePtrTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
948 | 88.3k | } |
949 | | |
950 | 0 | ExportNamePtrTableEntry::ExportNamePtrTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> nameOffset) : ExportNamePtrTableEntry() { |
951 | 0 | if ( nameOffset ) this->nameOffset = std::move(*nameOffset); |
952 | 0 | } |
953 | | |
954 | | |
955 | 329 | ExportNamePtrTable::ExportNamePtrTable() { |
956 | 329 | } |
957 | | |
958 | 329 | ExportNamePtrTable::ExportNamePtrTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f, const ::hilti::rt::integer::safe<uint32_t>& _t_p_entryCount) : _t_p_f(_t_p_f), _t_p_entryCount(_t_p_entryCount) { |
959 | 329 | } |
960 | | |
961 | 0 | ExportNamePtrTable::ExportNamePtrTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>>>> entries) : ExportNamePtrTable() { |
962 | 0 | if ( entries ) this->entries = std::move(*entries); |
963 | 0 | } |
964 | | |
965 | | |
966 | | extern void _t_hook_ExportDirectoryTable__t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>& _t_self); |
967 | | extern void _t_hook_ExportDirectoryTable__t_on_addressTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>& _t_self); |
968 | | extern void _t_hook_ExportDirectoryTable__t_on_namePtrTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>& _t_self); |
969 | | extern void _t_hook_ExportDirectoryTable__t_on_ordinalTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>& _t_self); |
970 | 1.17k | ExportDirectoryTable::ExportDirectoryTable() { |
971 | 1.17k | } |
972 | | |
973 | 1.17k | ExportDirectoryTable::ExportDirectoryTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
974 | 1.17k | } |
975 | | |
976 | 0 | ExportDirectoryTable::ExportDirectoryTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> addressTableCount, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> namePtrTableCount, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTable>>> addressTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTable>>> namePtrTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportOrdinalTable>>> ordinalTable, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> dllNameOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> addressTableOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> namePtrTableOffset, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> ordinalTableOffset) : ExportDirectoryTable() { |
977 | 0 | if ( addressTableCount ) this->addressTableCount = std::move(*addressTableCount); |
978 | 0 | if ( namePtrTableCount ) this->namePtrTableCount = std::move(*namePtrTableCount); |
979 | 0 | if ( addressTable ) this->addressTable = std::move(*addressTable); |
980 | 0 | if ( namePtrTable ) this->namePtrTable = std::move(*namePtrTable); |
981 | 0 | if ( ordinalTable ) this->ordinalTable = std::move(*ordinalTable); |
982 | 0 | if ( dllNameOffset ) this->dllNameOffset = std::move(*dllNameOffset); |
983 | 0 | if ( addressTableOffset ) this->addressTableOffset = std::move(*addressTableOffset); |
984 | 0 | if ( namePtrTableOffset ) this->namePtrTableOffset = std::move(*namePtrTableOffset); |
985 | 0 | if ( ordinalTableOffset ) this->ordinalTableOffset = std::move(*ordinalTableOffset); |
986 | 0 | } |
987 | | |
988 | | |
989 | | extern void _t_hook_ExportAddressTableEntry__t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>& _t_self); |
990 | 0 | ExportAddressTableEntry::ExportAddressTableEntry() { |
991 | 0 | } |
992 | | |
993 | 275k | ExportAddressTableEntry::ExportAddressTableEntry(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f) : _t_p_f(_t_p_f) { |
994 | 275k | } |
995 | | |
996 | 0 | ExportAddressTableEntry::ExportAddressTableEntry(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> forwarderOffset) : ExportAddressTableEntry() { |
997 | 0 | if ( forwarderOffset ) this->forwarderOffset = std::move(*forwarderOffset); |
998 | 0 | } |
999 | | |
1000 | | |
1001 | 411 | ExportAddressTable::ExportAddressTable() { |
1002 | 411 | } |
1003 | | |
1004 | 411 | ExportAddressTable::ExportAddressTable(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_p_f, const ::hilti::rt::integer::safe<uint32_t>& _t_p_entryCount) : _t_p_f(_t_p_f), _t_p_entryCount(_t_p_entryCount) { |
1005 | 411 | } |
1006 | | |
1007 | 0 | ExportAddressTable::ExportAddressTable(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>>>> entries) : ExportAddressTable() { |
1008 | 0 | if ( entries ) this->entries = std::move(*entries); |
1009 | 0 | } |
1010 | | |
1011 | | |
1012 | | extern auto operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::NullTerminatedString& x) -> std::ostream&; |
1013 | 31.3k | NullTerminatedString::NullTerminatedString() { |
1014 | 31.3k | } |
1015 | | |
1016 | 0 | NullTerminatedString::NullTerminatedString(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> s) : NullTerminatedString() { |
1017 | 0 | if ( s ) this->s = std::move(*s); |
1018 | 0 | } |
1019 | | |
1020 | | |
1021 | | static auto min(const ::hilti::rt::integer::safe<uint64_t>& a, const ::hilti::rt::integer::safe<uint64_t>& b) -> ::hilti::rt::integer::safe<uint64_t>; |
1022 | | static auto getSectionForRVA(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& f, const ::hilti::rt::integer::safe<uint32_t>& rva) -> ::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::SectionHeader>; |
1023 | | static auto rvaToOffset(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& f, const ::hilti::rt::integer::safe<uint32_t>& rva) -> ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>; |
1024 | | extern void _t_hook_ExportAddressTableEntry__t_on_rva_12214573325368762658(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportAddressTableEntry>& _t_self); |
1025 | | extern void _t_hook_ExportAddressTableEntry__t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportAddressTableEntry>& _t_self); |
1026 | | extern void _t_hook_ExportAddressTableEntry__t_on_rva_12214573325368762658(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportAddressTableEntry>& _t_self); |
1027 | | static auto checkpointOffset(const ::hilti::rt::stream::SafeConstIterator& it, ::hilti::rt::Set<::hilti::rt::integer::safe<uint64_t>>& state, const ::hilti::rt::integer::safe<uint64_t>& max_states) -> ::hilti::rt::stream::SafeConstIterator; |
1028 | | extern void _t_hook_ExportDirectoryTable__t_on_addressTableRVA_15201512829653598939(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1029 | | extern void _t_hook_ExportDirectoryTable__t_on_addressTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1030 | | extern void _t_hook_ExportDirectoryTable__t_on_addressTableRVA_15201512829653598939(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1031 | | extern void _t_hook_ExportDirectoryTable__t_on_dllNameRVA_3293904088300835943(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1032 | | extern void _t_hook_ExportDirectoryTable__t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1033 | | extern void _t_hook_ExportDirectoryTable__t_on_dllNameRVA_3293904088300835943(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1034 | | extern void _t_hook_ExportDirectoryTable__t_on_namePtrTableRVA_11656397205816205229(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1035 | | extern void _t_hook_ExportDirectoryTable__t_on_namePtrTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1036 | | extern void _t_hook_ExportDirectoryTable__t_on_namePtrTableRVA_11656397205816205229(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1037 | | extern void _t_hook_ExportDirectoryTable__t_on_ordinalTableRVA_15928344153389523969(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1038 | | extern void _t_hook_ExportDirectoryTable__t_on_ordinalTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1039 | | extern void _t_hook_ExportDirectoryTable__t_on_ordinalTableRVA_15928344153389523969(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self); |
1040 | | extern void _t_hook_ExportNamePtrTableEntry__t_on_rva_15037868803365436765(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportNamePtrTableEntry>& _t_self); |
1041 | | extern void _t_hook_ExportNamePtrTableEntry__t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportNamePtrTableEntry>& _t_self); |
1042 | | extern void _t_hook_ExportNamePtrTableEntry__t_on_rva_15037868803365436765(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportNamePtrTableEntry>& _t_self); |
1043 | | extern void _t_hook_ImageFile__t_on_0x25_init_10989292239488911451(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1044 | | extern void _t_hook_ImageFile__t_on_0x25_init(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1045 | | extern void _t_hook_ImageFile__t_on_0x25_init_10989292239488911451(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1046 | | extern void _t_hook_ImageFile__t_on_dosHeader_8079375724760300214(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1047 | | extern void _t_hook_ImageFile__t_on_dosHeader(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1048 | | extern void _t_hook_ImageFile__t_on_dosHeader_8079375724760300214(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1049 | | extern void _t_hook_ImageFile__t_on_optHeader_869007308863425286(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1050 | | extern void _t_hook_ImageFile__t_on_optHeader(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1051 | | extern void _t_hook_ImageFile__t_on_optHeader_869007308863425286(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1052 | | static auto calculateCounts(const ::hilti::rt::Bytes& bts) -> ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>; |
1053 | | extern void _t_hook_ImageFile__t_on_sectionData_12034916000140660522(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<ImageFile>& _t_self); |
1054 | | extern void _t_hook_ImageFile__t_on_sectionData(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<ImageFile>& _t_self); |
1055 | | extern void _t_hook_ImageFile__t_on_sectionData_12034916000140660522(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<ImageFile>& _t_self); |
1056 | | static auto dirInfo(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& f, const PE::Dir& d) -> ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>; |
1057 | | extern void _t_hook_ImageFile__t_on_sectionHeaders_4795231626815654563(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1058 | | extern void _t_hook_ImageFile__t_on_sectionHeaders(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1059 | | extern void _t_hook_ImageFile__t_on_sectionHeaders_4795231626815654563(::hilti::rt::ValueReference<ImageFile>& _t_self); |
1060 | | } |
1061 | | |
1062 | | namespace hlt_pe_ImageFile::PE::ImageFile { |
1063 | | auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
1064 | | auto parse2(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
1065 | | auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
1066 | | } |
1067 | | |
1068 | | namespace hlt_internal_pe_ImageFile::PE { |
1069 | | static auto isNull(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>& e) -> ::hilti::rt::Bool; |
1070 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_dllNameRVA_7393877628318478425(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self); |
1071 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self); |
1072 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_dllNameRVA_7393877628318478425(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self); |
1073 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_importLookupTableRVA_11682872924627088656(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self); |
1074 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_importLookupTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self); |
1075 | | extern void _t_hook_ImportDirectoryTableEntry__t_on_importLookupTableRVA_11682872924627088656(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self); |
1076 | | static auto isNull(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>& e) -> ::hilti::rt::Bool; |
1077 | | extern void _t_hook_ImportLookupTableEntry__t_on__anon_12_11706521456759738858(::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1078 | | extern void _t_hook_ImportLookupTableEntry__t_on__anon_12(::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1079 | | extern void _t_hook_ImportLookupTableEntry__t_on__anon_12_11706521456759738858(::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1080 | | extern void _t_hook_ImportLookupTableEntry__t_on_f32_16840447557779063112(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1081 | | extern void _t_hook_ImportLookupTableEntry__t_on_f32(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1082 | | extern void _t_hook_ImportLookupTableEntry__t_on_f32_16840447557779063112(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1083 | | extern void _t_hook_ImportLookupTableEntry__t_on_f64_16358586801730322580(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1084 | | extern void _t_hook_ImportLookupTableEntry__t_on_f64(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1085 | | extern void _t_hook_ImportLookupTableEntry__t_on_f64_16358586801730322580(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self); |
1086 | | extern void _t_register_PE_DOS_Header(); |
1087 | | extern void _t_register_PE_DataDirectory(); |
1088 | | extern void _t_register_PE_ExportAddressTable(); |
1089 | | extern void _t_register_PE_ExportAddressTableEntry(); |
1090 | | extern void _t_register_PE_ExportDirectoryTable(); |
1091 | | extern void _t_register_PE_ExportNamePtrTable(); |
1092 | | extern void _t_register_PE_ExportNamePtrTableEntry(); |
1093 | | extern void _t_register_PE_ExportOrdinalTable(); |
1094 | | extern void _t_register_PE_HintName(); |
1095 | | extern void _t_register_PE_ImageFile(); |
1096 | | extern void _t_register_PE_ImportDirectoryTable(); |
1097 | | extern void _t_register_PE_ImportDirectoryTableEntry(); |
1098 | | extern void _t_register_PE_ImportLookupTable(); |
1099 | | extern void _t_register_PE_ImportLookupTableEntry(); |
1100 | | extern void _t_register_PE_NullTerminatedString(); |
1101 | | extern void _t_register_PE_OptionalHeader(); |
1102 | | extern void _t_register_PE_PE_Header(); |
1103 | | extern void _t_register_PE_SectionHeader(); |
1104 | | extern void _t_init_module(); |
1105 | | extern void _t_register_module(); |
1106 | | } |
1107 | | |
1108 | | namespace hlt_internal_pe_ImageFile::type_info { namespace { |
1109 | 0 | const ::hilti::rt::TypeInfo _t_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b = { "hilti::RecoverableFailure", "hilti::RecoverableFailure", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::RecoverableFailure*>(self)); }, new ::hilti::rt::type_info::Exception() }; |
1110 | 0 | const ::hilti::rt::TypeInfo _t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b = { {}, "optional<spicy::RecoverableFailure>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>*>(self)); }, new ::hilti::rt::type_info::Optional(&type_info::_t_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b, ::hilti::rt::type_info::Optional::accessor<::hilti::rt::RecoverableFailure>()) }; |
1111 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__DOS_Header_namex2aPE__DOS_Headerx2b = { "PE::DOS_Header", "PE::DOS_Header", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::DOS_Header*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "magic", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "bytesInLastPage", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "pagesInFile", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "relocations", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "paragraphsInHeader", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "minExtraParagraphs", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "maxExtraParagraphs", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "initialRelativeSS", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "initialSP", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "checksum", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "initialIP", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "initialRelativeCS", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "relocationTableAddress", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "overlayNumber", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "reserved1", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "oemID", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "oemInfo", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "reserved2", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "peHeaderOffset", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::DOS_Header, peHeaderOffset)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::DOS_Header, _t_error)), true, false, true }})) }; |
1112 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__DataDirectory_namex2aPE__DataDirectoryx2b = { "PE::DataDirectory", "PE::DataDirectory", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::DataDirectory*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "virtualAddress", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::DataDirectory, virtualAddress)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "size", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::DataDirectory, size)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::DataDirectory, _t_error)), true, false, true }})) }; |
1113 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__Dir_namex2aPE__Dirx2b = { "PE::Dir", "PE::Dir", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const PE::Dir*>(self)); }, new ::hilti::rt::type_info::Enum(std::vector<::hilti::rt::type_info::enum_::Label>({::hilti::rt::type_info::enum_::Label{ "ExportTable", 0 }, ::hilti::rt::type_info::enum_::Label{ "ImportTable", 1 }, ::hilti::rt::type_info::enum_::Label{ "ResourceTable", 2 }, ::hilti::rt::type_info::enum_::Label{ "ExceptionTable", 3 }, ::hilti::rt::type_info::enum_::Label{ "CertificateTable", 4 }, ::hilti::rt::type_info::enum_::Label{ "BaseRelocationTable", 5 }, ::hilti::rt::type_info::enum_::Label{ "Debug", 6 }, ::hilti::rt::type_info::enum_::Label{ "Architecture", 7 }, ::hilti::rt::type_info::enum_::Label{ "GlobalPtr", 8 }, ::hilti::rt::type_info::enum_::Label{ "ThreadLocalStorageTable", 9 }, ::hilti::rt::type_info::enum_::Label{ "LoadConfigTable", 10 }, ::hilti::rt::type_info::enum_::Label{ "BoundImport", 11 }, ::hilti::rt::type_info::enum_::Label{ "ImportAddressTable", 12 }, ::hilti::rt::type_info::enum_::Label{ "DelayImportDescriptor", 13 }, ::hilti::rt::type_info::enum_::Label{ "CommonLanguageRuntimeHeader", 14 }, ::hilti::rt::type_info::enum_::Label{ "Undef", -1 }})) }; |
1114 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__Offset_optionalx2auint64x2b = { "PE::Offset", "PE::Offset", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Optional(&::hilti::rt::type_info::uint64, ::hilti::rt::type_info::Optional::accessor<::hilti::rt::integer::safe<uint64_t>>()) }; |
1115 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__DirInfo_tuplex2aoptionalx2auint64x2b_uint64_x2b = { "PE::DirInfo", "PE::DirInfo", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Tuple(std::vector<::hilti::rt::type_info::tuple::Element>({::hilti::rt::type_info::tuple::Element{ "offset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<0>() }, ::hilti::rt::type_info::tuple::Element{ "size", &::hilti::rt::type_info::uint64, ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<1>() }})) }; |
1116 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__HintName_namex2aPE__HintNamex2b = { "PE::HintName", "PE::HintName", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::HintName*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "hint", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "name", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::HintName, _t_error)), true, false, true }})) }; |
1117 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_DataDirectory__vectorx2anamex2aPE__DataDirectoryx2bx2b = { {}, "vector<DataDirectory>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::DataDirectory>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_PE__DataDirectory_namex2aPE__DataDirectoryx2b, ::hilti::rt::type_info::Vector::accessor<hlt_internal_pe_ImageFile::PE::DataDirectory>()) }; |
1118 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__OptionalHeader_namex2aPE__OptionalHeaderx2b = { "PE::OptionalHeader", "PE::OptionalHeader", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::OptionalHeader*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "magic", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PE::OptionalHeader, magic)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "majorLinkerVersion", &::hilti::rt::type_info::uint8, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "minorLinkerVersion", &::hilti::rt::type_info::uint8, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfCode", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfInitializedData", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfUninitializedData", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "addressOfEntryPoint", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "baseOfCode", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "baseOfData", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "imageBase", &::hilti::rt::type_info::uint64, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sectionAlignment", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "fileAlignment", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "majorOperatingSystemVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "minorOperatingSystemVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "majorImageVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "minorImageVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "majorSubsystemVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "minorSubsystemVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "win32VersionValue", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfImage", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfHeaders", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::OptionalHeader, sizeOfHeaders)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "checkSum", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "subsystem", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "dllCharacteristics", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfStackReserve", &::hilti::rt::type_info::uint64, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfStackCommit", &::hilti::rt::type_info::uint64, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfHeapReserve", &::hilti::rt::type_info::uint64, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfHeapCommit", &::hilti::rt::type_info::uint64, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "loaderFlags", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "numberOfRvaAndSizes", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::OptionalHeader, numberOfRvaAndSizes)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "dataDirectories", &type_info::_t_ti_vector_DataDirectory__vectorx2anamex2aPE__DataDirectoryx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::OptionalHeader, dataDirectories)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::DataDirectory>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::OptionalHeader, _t_error)), true, false, true }})) }; |
1119 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__PE_Header_namex2aPE__PE_Headerx2b = { "PE::PE_Header", "PE::PE_Header", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::PE_Header*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "magic", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "machine", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "numberOfSections", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PE::PE_Header, numberOfSections)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "timeDateStamp", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "pointerToSymbolTable", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "numberOfSymbols", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "sizeOfOptionalHeader", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PE::PE_Header, sizeOfOptionalHeader)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "characteristics", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::PE_Header, _t_error)), true, false, true }})) }; |
1120 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__SectionHeader_namex2aPE__SectionHeaderx2b = { "PE::SectionHeader", "PE::SectionHeader", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::SectionHeader*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "name", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PE::SectionHeader, name)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "virtualSize", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "virtualAddress", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::SectionHeader, virtualAddress)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "sizeOfRawData", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::SectionHeader, sizeOfRawData)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "pointerToRawData", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::SectionHeader, pointerToRawData)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "pointerToRelocations", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "pointerToLinenumbers", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "numberOfRelocations", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "numberOfLinenumbers", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "characteristics", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::SectionHeader, _t_error)), true, false, true }})) }; |
1121 | 0 | const ::hilti::rt::TypeInfo _t_ti_tuple_uint_32___uint_32___uint_32___uint_32___uint_32___tuplex2auint32_uint32_uint32_uint32_uint32_x2b = { {}, "tuple<uint<32>, uint<32>, uint<32>, uint<32>, uint<32>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>*>(self)); }, new ::hilti::rt::type_info::Tuple(std::vector<::hilti::rt::type_info::tuple::Element>({::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint32, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>::elementOffset<0>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint32, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>::elementOffset<1>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint32, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>::elementOffset<2>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint32, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>::elementOffset<3>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint32, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>::elementOffset<4>() }})) }; |
1122 | 0 | const ::hilti::rt::TypeInfo _t_ti_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b = { {}, "bitfield(32) { full: 0..31; importByName: 31; ordinal: 0..15; hintNameRVA: 0..30; }", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>*>(self)); }, new ::hilti::rt::type_info::Bitfield(32, std::vector<::hilti::rt::type_info::bitfield::Bits>({::hilti::rt::type_info::bitfield::Bits{ "full", 0, 31, &::hilti::rt::type_info::uint32 }, ::hilti::rt::type_info::bitfield::Bits{ "importByName", 31, 31, &::hilti::rt::type_info::uint32 }, ::hilti::rt::type_info::bitfield::Bits{ "ordinal", 0, 15, &::hilti::rt::type_info::uint32 }, ::hilti::rt::type_info::bitfield::Bits{ "hintNameRVA", 0, 30, &::hilti::rt::type_info::uint32 }}), &type_info::_t_ti_tuple_uint_32___uint_32___uint_32___uint_32___uint_32___tuplex2auint32_uint32_uint32_uint32_uint32_x2b) }; |
1123 | 0 | const ::hilti::rt::TypeInfo _t_ti_const_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b = { {}, "const bitfield(32) { full: 0..31; importByName: 31; ordinal: 0..15; hintNameRVA: 0..30; }", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>*>(self)); }, new ::hilti::rt::type_info::Bitfield(32, std::vector<::hilti::rt::type_info::bitfield::Bits>({::hilti::rt::type_info::bitfield::Bits{ "full", 0, 31, &::hilti::rt::type_info::uint32 }, ::hilti::rt::type_info::bitfield::Bits{ "importByName", 31, 31, &::hilti::rt::type_info::uint32 }, ::hilti::rt::type_info::bitfield::Bits{ "ordinal", 0, 15, &::hilti::rt::type_info::uint32 }, ::hilti::rt::type_info::bitfield::Bits{ "hintNameRVA", 0, 30, &::hilti::rt::type_info::uint32 }}), &type_info::_t_ti_tuple_uint_32___uint_32___uint_32___uint_32___uint_32___tuplex2auint32_uint32_uint32_uint32_uint32_x2b) }; |
1124 | 0 | const ::hilti::rt::TypeInfo _t_ti_tuple_uint_64___uint_64___uint_64___uint_64___uint_64___tuplex2auint64_uint64_uint64_uint64_uint64_x2b = { {}, "tuple<uint<64>, uint<64>, uint<64>, uint<64>, uint<64>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Tuple(std::vector<::hilti::rt::type_info::tuple::Element>({::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint64, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<0>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint64, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<1>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint64, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<2>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint64, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<3>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::uint64, ::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>::elementOffset<4>() }})) }; |
1125 | 0 | const ::hilti::rt::TypeInfo _t_ti_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b = { {}, "bitfield(64) { full: 0..63; importByName: 63; ordinal: 0..15; hintNameRVA: 0..30; }", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Bitfield(64, std::vector<::hilti::rt::type_info::bitfield::Bits>({::hilti::rt::type_info::bitfield::Bits{ "full", 0, 63, &::hilti::rt::type_info::uint64 }, ::hilti::rt::type_info::bitfield::Bits{ "importByName", 63, 63, &::hilti::rt::type_info::uint64 }, ::hilti::rt::type_info::bitfield::Bits{ "ordinal", 0, 15, &::hilti::rt::type_info::uint64 }, ::hilti::rt::type_info::bitfield::Bits{ "hintNameRVA", 0, 30, &::hilti::rt::type_info::uint64 }}), &type_info::_t_ti_tuple_uint_64___uint_64___uint_64___uint_64___uint_64___tuplex2auint64_uint64_uint64_uint64_uint64_x2b) }; |
1126 | 0 | const ::hilti::rt::TypeInfo _t_ti_const_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b = { {}, "const bitfield(64) { full: 0..63; importByName: 63; ordinal: 0..15; hintNameRVA: 0..30; }", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Bitfield(64, std::vector<::hilti::rt::type_info::bitfield::Bits>({::hilti::rt::type_info::bitfield::Bits{ "full", 0, 63, &::hilti::rt::type_info::uint64 }, ::hilti::rt::type_info::bitfield::Bits{ "importByName", 63, 63, &::hilti::rt::type_info::uint64 }, ::hilti::rt::type_info::bitfield::Bits{ "ordinal", 0, 15, &::hilti::rt::type_info::uint64 }, ::hilti::rt::type_info::bitfield::Bits{ "hintNameRVA", 0, 30, &::hilti::rt::type_info::uint64 }}), &type_info::_t_ti_tuple_uint_64___uint_64___uint_64___uint_64___uint_64___tuplex2auint64_uint64_uint64_uint64_uint64_x2b) }; |
1127 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ImportLookupTableEntry_namex2aPE__ImportLookupTableEntryx2b = { "PE::ImportLookupTableEntry", "PE::ImportLookupTableEntry", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "full", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, full)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "importByName", &::hilti::rt::type_info::bool_, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, importByName)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "ordinal", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "hintNameRVA", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, hintNameRVA)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "f32", &type_info::_t_ti_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, f32)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>>() }, ::hilti::rt::type_info::struct_::Field{ "f64", &type_info::_t_ti_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, f64)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>>() }, ::hilti::rt::type_info::struct_::Field{ "hintName", &type_info::_t_ti_PE__HintName_namex2aPE__HintNamex2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, hintName)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_pe_ImageFile::PE::HintName>() }, ::hilti::rt::type_info::struct_::Field{ "hintNameOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, hintNameOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTableEntry, _t_error)), true, false, true }})) }; |
1128 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportLookupTableEntry__value_refx2anamex2aPE__ImportLookupTableEntryx2bx2b = { {}, "value_ref<ImportLookupTableEntry>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ImportLookupTableEntry_namex2aPE__ImportLookupTableEntryx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>()) }; |
1129 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ImportLookupTableEntry___vectorx2anamex2aPE__ImportLookupTableEntryx2bx2b = { {}, "vector<value_ref<ImportLookupTableEntry>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_value_ref_ImportLookupTableEntry__value_refx2anamex2aPE__ImportLookupTableEntryx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>>()) }; |
1130 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ImportLookupTable_namex2aPE__ImportLookupTablex2b = { "PE::ImportLookupTable", "PE::ImportLookupTable", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ImportLookupTable*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "entries", &type_info::_t_ti_vector_value_ref_ImportLookupTableEntry___vectorx2anamex2aPE__ImportLookupTableEntryx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTable, entries)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportLookupTable, _t_error)), true, false, true }})) }; |
1131 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportLookupTable__value_refx2anamex2aPE__ImportLookupTablex2bx2b = { {}, "value_ref<ImportLookupTable>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTable>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ImportLookupTable_namex2aPE__ImportLookupTablex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ImportLookupTable>()) }; |
1132 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ImportDirectoryTableEntry_namex2aPE__ImportDirectoryTableEntryx2b = { "PE::ImportDirectoryTableEntry", "PE::ImportDirectoryTableEntry", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "importLookupTableRVA", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, importLookupTableRVA)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "timeDateStamp", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, timeDateStamp)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "forwarderChain", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, forwarderChain)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "dllNameRVA", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, dllNameRVA)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "importAddressTableRVA", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, importAddressTableRVA)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "dllName", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "importLookupTable", &type_info::_t_ti_value_ref_ImportLookupTable__value_refx2anamex2aPE__ImportLookupTablex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, importLookupTable)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTable>>() }, ::hilti::rt::type_info::struct_::Field{ "iltOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, iltOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "dllNameOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, dllNameOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTableEntry, _t_error)), true, false, true }})) }; |
1133 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportDirectoryTableEntry__value_refx2anamex2aPE__ImportDirectoryTableEntryx2bx2b = { {}, "value_ref<ImportDirectoryTableEntry>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ImportDirectoryTableEntry_namex2aPE__ImportDirectoryTableEntryx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>()) }; |
1134 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ImportDirectoryTableEntry___vectorx2anamex2aPE__ImportDirectoryTableEntryx2bx2b = { {}, "vector<value_ref<ImportDirectoryTableEntry>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_value_ref_ImportDirectoryTableEntry__value_refx2anamex2aPE__ImportDirectoryTableEntryx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>>()) }; |
1135 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ImportDirectoryTable_namex2aPE__ImportDirectoryTablex2b = { "PE::ImportDirectoryTable", "PE::ImportDirectoryTable", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ImportDirectoryTable*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "entries", &type_info::_t_ti_vector_value_ref_ImportDirectoryTableEntry___vectorx2anamex2aPE__ImportDirectoryTableEntryx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTable, entries)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImportDirectoryTable, _t_error)), true, false, true }})) }; |
1136 | 0 | const ::hilti::rt::TypeInfo _t_ti_set_uint_64___setx2auint64x2b = { {}, "set<uint<64>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Set<::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Set(&::hilti::rt::type_info::uint64, ::hilti::rt::type_info::Set::accessor<::hilti::rt::integer::safe<uint64_t>>()) }; |
1137 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_SectionHeader__vectorx2anamex2aPE__SectionHeaderx2bx2b = { {}, "vector<SectionHeader>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::SectionHeader>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_PE__SectionHeader_namex2aPE__SectionHeaderx2b, ::hilti::rt::type_info::Vector::accessor<hlt_internal_pe_ImageFile::PE::SectionHeader>()) }; |
1138 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ExportAddressTableEntry_namex2aPE__ExportAddressTableEntryx2b = { "PE::ExportAddressTableEntry", "PE::ExportAddressTableEntry", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "rva", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "forwarder", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "forwarderOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportAddressTableEntry, forwarderOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportAddressTableEntry, _t_error)), true, false, true }})) }; |
1139 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportAddressTableEntry__value_refx2anamex2aPE__ExportAddressTableEntryx2bx2b = { {}, "value_ref<ExportAddressTableEntry>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ExportAddressTableEntry_namex2aPE__ExportAddressTableEntryx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>()) }; |
1140 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ExportAddressTableEntry___vectorx2anamex2aPE__ExportAddressTableEntryx2bx2b = { {}, "vector<value_ref<ExportAddressTableEntry>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_value_ref_ExportAddressTableEntry__value_refx2anamex2aPE__ExportAddressTableEntryx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>>()) }; |
1141 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ExportAddressTable_namex2aPE__ExportAddressTablex2b = { "PE::ExportAddressTable", "PE::ExportAddressTable", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ExportAddressTable*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "entries", &type_info::_t_ti_vector_value_ref_ExportAddressTableEntry___vectorx2anamex2aPE__ExportAddressTableEntryx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportAddressTable, entries)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportAddressTable, _t_error)), true, false, true }})) }; |
1142 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportAddressTable__value_refx2anamex2aPE__ExportAddressTablex2bx2b = { {}, "value_ref<ExportAddressTable>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTable>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ExportAddressTable_namex2aPE__ExportAddressTablex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ExportAddressTable>()) }; |
1143 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ExportNamePtrTableEntry_namex2aPE__ExportNamePtrTableEntryx2b = { "PE::ExportNamePtrTableEntry", "PE::ExportNamePtrTableEntry", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "rva", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "name", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "nameOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportNamePtrTableEntry, nameOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportNamePtrTableEntry, _t_error)), true, false, true }})) }; |
1144 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportNamePtrTableEntry__value_refx2anamex2aPE__ExportNamePtrTableEntryx2bx2b = { {}, "value_ref<ExportNamePtrTableEntry>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ExportNamePtrTableEntry_namex2aPE__ExportNamePtrTableEntryx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>()) }; |
1145 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_ExportNamePtrTableEntry___vectorx2anamex2aPE__ExportNamePtrTableEntryx2bx2b = { {}, "vector<value_ref<ExportNamePtrTableEntry>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_value_ref_ExportNamePtrTableEntry__value_refx2anamex2aPE__ExportNamePtrTableEntryx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>>()) }; |
1146 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ExportNamePtrTable_namex2aPE__ExportNamePtrTablex2b = { "PE::ExportNamePtrTable", "PE::ExportNamePtrTable", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ExportNamePtrTable*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "entries", &type_info::_t_ti_vector_value_ref_ExportNamePtrTableEntry___vectorx2anamex2aPE__ExportNamePtrTableEntryx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportNamePtrTable, entries)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportNamePtrTable, _t_error)), true, false, true }})) }; |
1147 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportNamePtrTable__value_refx2anamex2aPE__ExportNamePtrTablex2bx2b = { {}, "value_ref<ExportNamePtrTable>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTable>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ExportNamePtrTable_namex2aPE__ExportNamePtrTablex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ExportNamePtrTable>()) }; |
1148 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_uint_16___vectorx2auint16x2b = { {}, "vector<uint<16>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>*>(self)); }, new ::hilti::rt::type_info::Vector(&::hilti::rt::type_info::uint16, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::integer::safe<uint16_t>>()) }; |
1149 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ExportOrdinalTable_namex2aPE__ExportOrdinalTablex2b = { "PE::ExportOrdinalTable", "PE::ExportOrdinalTable", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ExportOrdinalTable*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "entries", &type_info::_t_ti_vector_uint_16___vectorx2auint16x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportOrdinalTable, entries)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportOrdinalTable, _t_error)), true, false, true }})) }; |
1150 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportOrdinalTable__value_refx2anamex2aPE__ExportOrdinalTablex2bx2b = { {}, "value_ref<ExportOrdinalTable>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportOrdinalTable>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ExportOrdinalTable_namex2aPE__ExportOrdinalTablex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ExportOrdinalTable>()) }; |
1151 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ExportDirectoryTable_namex2aPE__ExportDirectoryTablex2b = { "PE::ExportDirectoryTable", "PE::ExportDirectoryTable", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ExportDirectoryTable*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "flags", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "timeDateStamp", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "majorVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "minorVersion", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "dllNameRVA", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "ordinalBase", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "addressTableCount", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, addressTableCount)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "namePtrTableCount", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, namePtrTableCount)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "addressTableRVA", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "namePtrTableRVA", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "ordinalTableRVA", &::hilti::rt::type_info::uint32, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "dllName", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "addressTable", &type_info::_t_ti_value_ref_ExportAddressTable__value_refx2anamex2aPE__ExportAddressTablex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, addressTable)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTable>>() }, ::hilti::rt::type_info::struct_::Field{ "namePtrTable", &type_info::_t_ti_value_ref_ExportNamePtrTable__value_refx2anamex2aPE__ExportNamePtrTablex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, namePtrTable)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTable>>() }, ::hilti::rt::type_info::struct_::Field{ "ordinalTable", &type_info::_t_ti_value_ref_ExportOrdinalTable__value_refx2anamex2aPE__ExportOrdinalTablex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, ordinalTable)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportOrdinalTable>>() }, ::hilti::rt::type_info::struct_::Field{ "dllNameOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, dllNameOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "addressTableOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, addressTableOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "namePtrTableOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, namePtrTableOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "ordinalTableOffset", &type_info::_t_ti_PE__Offset_optionalx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, ordinalTableOffset)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ExportDirectoryTable, _t_error)), true, false, true }})) }; |
1152 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ExportDirectoryTable__value_refx2anamex2aPE__ExportDirectoryTablex2bx2b = { {}, "value_ref<ExportDirectoryTable>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ExportDirectoryTable_namex2aPE__ExportDirectoryTablex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>()) }; |
1153 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_ImportDirectoryTable__value_refx2anamex2aPE__ImportDirectoryTablex2bx2b = { {}, "value_ref<ImportDirectoryTable>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTable>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ImportDirectoryTable_namex2aPE__ImportDirectoryTablex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ImportDirectoryTable>()) }; |
1154 | 0 | const ::hilti::rt::TypeInfo _t_ti_map_uint_8___uint_64___mapx2auint8__uint64x2b = { {}, "map<uint<8>, uint<64>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Map(&::hilti::rt::type_info::uint8, &::hilti::rt::type_info::uint64, ::hilti::rt::type_info::Map::accessor<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>()) }; |
1155 | 0 | const ::hilti::rt::TypeInfo _t_ti_map_string__map_uint_8___uint_64____mapx2astring__mapx2auint8__uint64x2bx2b = { {}, "map<string, map<uint<8>, uint<64>>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>>*>(self)); }, new ::hilti::rt::type_info::Map(&::hilti::rt::type_info::string, &type_info::_t_ti_map_uint_8___uint_64___mapx2auint8__uint64x2b, ::hilti::rt::type_info::Map::accessor<::hilti::rt::String, ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>>()) }; |
1156 | 0 | const ::hilti::rt::TypeInfo _t_ti_map_string__uint_64___mapx2astring__uint64x2b = { {}, "map<string, uint<64>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Map<::hilti::rt::String, ::hilti::rt::integer::safe<uint64_t>>*>(self)); }, new ::hilti::rt::type_info::Map(&::hilti::rt::type_info::string, &::hilti::rt::type_info::uint64, ::hilti::rt::type_info::Map::accessor<::hilti::rt::String, ::hilti::rt::integer::safe<uint64_t>>()) }; |
1157 | 0 | const ::hilti::rt::TypeInfo _t_ti_optional_iterator_stream___optionalx2aiteratorx2astreamx2bx2b = { {}, "optional<iterator<stream>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>*>(self)); }, new ::hilti::rt::type_info::Optional(&::hilti::rt::type_info::stream_iterator, ::hilti::rt::type_info::Optional::accessor<::hilti::rt::stream::SafeConstIterator>()) }; |
1158 | 0 | const ::hilti::rt::TypeInfo _t_ti_spicy_rt__SinkState_libraryx2astd__shared_ptr_spicy__rt__sink__detail__State_x2b = { "spicy_rt::SinkState", "spicy_rt::SinkState", [](const void *self) { return "<::std::shared_ptr<spicy::rt::sink::detail::State>>"s; }, new ::hilti::rt::type_info::Library("::std::shared_ptr<spicy::rt::sink::detail::State>") }; |
1159 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__ImageFile_namex2aPE__ImageFilex2b = { "PE::ImageFile", "PE::ImageFile", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::ImageFile*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "consumedOffsets", &type_info::_t_ti_set_uint_64___setx2auint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, consumedOffsets)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "dosHeader", &type_info::_t_ti_PE__DOS_Header_namex2aPE__DOS_Headerx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, dosHeader)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_pe_ImageFile::PE::DOS_Header>() }, ::hilti::rt::type_info::struct_::Field{ "dosStub", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "peHeader", &type_info::_t_ti_PE__PE_Header_namex2aPE__PE_Headerx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, peHeader)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_pe_ImageFile::PE::PE_Header>() }, ::hilti::rt::type_info::struct_::Field{ "optHeader", &type_info::_t_ti_PE__OptionalHeader_namex2aPE__OptionalHeaderx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, optHeader)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_pe_ImageFile::PE::OptionalHeader>() }, ::hilti::rt::type_info::struct_::Field{ "sectionHeaders", &type_info::_t_ti_vector_SectionHeader__vectorx2anamex2aPE__SectionHeaderx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, sectionHeaders)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::SectionHeader>>() }, ::hilti::rt::type_info::struct_::Field{ "sectionData", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, sectionData)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "exportTable", &type_info::_t_ti_value_ref_ExportDirectoryTable__value_refx2anamex2aPE__ExportDirectoryTablex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, exportTable)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportDirectoryTable>>() }, ::hilti::rt::type_info::struct_::Field{ "importTable", &type_info::_t_ti_value_ref_ImportDirectoryTable__value_refx2anamex2aPE__ImportDirectoryTablex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, importTable)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTable>>() }, ::hilti::rt::type_info::struct_::Field{ "peStart", &::hilti::rt::type_info::stream_iterator, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, peStart)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "peFileFormat", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, peFileFormat)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "dosStubSize", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, dosStubSize)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "headerPadSize", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, headerPadSize)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "fileSize", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, fileSize)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "sectionDataSize", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, sectionDataSize)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "exportDirInfo", &type_info::_t_ti_PE__DirInfo_tuplex2aoptionalx2auint64x2b_uint64_x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, exportDirInfo)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "importDirInfo", &type_info::_t_ti_PE__DirInfo_tuplex2aoptionalx2auint64x2b_uint64_x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, importDirInfo)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "sectionCounts", &type_info::_t_ti_map_string__map_uint_8___uint_64____mapx2astring__mapx2auint8__uint64x2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, sectionCounts)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "sectionLengths", &type_info::_t_ti_map_string__uint_64___mapx2astring__uint64x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, sectionLengths)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_begin", &::hilti::rt::type_info::stream_iterator, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, _t_begin)), true, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_position_update", &type_info::_t_ti_optional_iterator_stream___optionalx2aiteratorx2astreamx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, _t_position_update)), true, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_sink", &type_info::_t_ti_spicy_rt__SinkState_libraryx2astd__shared_ptr_spicy__rt__sink__detail__State_x2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, _t_sink)), true, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::ImageFile, _t_error)), true, false, true }})) }; |
1160 | 0 | const ::hilti::rt::TypeInfo _t_ti_PE__NullTerminatedString_namex2aPE__NullTerminatedStringx2b = { "PE::NullTerminatedString", "PE::NullTerminatedString", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_pe_ImageFile::PE::NullTerminatedString*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "s", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PE::NullTerminatedString, s)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PE::NullTerminatedString, _t_error)), true, false, true }})) }; |
1161 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_PE__ImageFile__value_refx2anamex2aPE__ImageFilex2bx2b = { {}, "value_ref<PE::ImageFile>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_PE__ImageFile_namex2aPE__ImageFilex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_pe_ImageFile::PE::ImageFile>()) }; |
1162 | 0 | const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_PE__ImageFile__strong_refx2anamex2aPE__ImageFilex2bx2b = { {}, "strong_ref<const PE::ImageFile>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<hlt_internal_pe_ImageFile::PE::ImageFile>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_t_ti_PE__ImageFile_namex2aPE__ImageFilex2b, ::hilti::rt::type_info::StrongReference::accessor<hlt_internal_pe_ImageFile::PE::ImageFile>()) }; |
1163 | | } } |
1164 | | |
1165 | | HILTI_PRE_INIT(hlt_internal_pe_ImageFile::PE::_t_register_module) |
1166 | | |
1167 | 0 | inline auto ::hilti::rt::detail::adl::to_string(hlt_internal_pe_ImageFile::PE::Dir x, adl::tag) -> std::string { |
1168 | 0 | switch ( x.value() ) { |
1169 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::CommonLanguageRuntimeHeader: return "Dir::CommonLanguageRuntimeHeader"; |
1170 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::DelayImportDescriptor: return "Dir::DelayImportDescriptor"; |
1171 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::ImportAddressTable: return "Dir::ImportAddressTable"; |
1172 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::BoundImport: return "Dir::BoundImport"; |
1173 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::LoadConfigTable: return "Dir::LoadConfigTable"; |
1174 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::ThreadLocalStorageTable: return "Dir::ThreadLocalStorageTable"; |
1175 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::GlobalPtr: return "Dir::GlobalPtr"; |
1176 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::Architecture: return "Dir::Architecture"; |
1177 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::Debug: return "Dir::Debug"; |
1178 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::BaseRelocationTable: return "Dir::BaseRelocationTable"; |
1179 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::CertificateTable: return "Dir::CertificateTable"; |
1180 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::ExceptionTable: return "Dir::ExceptionTable"; |
1181 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::ResourceTable: return "Dir::ResourceTable"; |
1182 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::ImportTable: return "Dir::ImportTable"; |
1183 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::ExportTable: return "Dir::ExportTable"; |
1184 | 0 | case hlt_internal_pe_ImageFile::PE::Dir::Undef: return "Dir::Undef"; |
1185 | 0 | default: return ::hilti::rt::fmt("Dir::<unknown-%" PRIu64 ">", x.value()); |
1186 | 0 | } |
1187 | 0 | } |
1188 | | |
1189 | 4.23k | auto hlt_internal_pe_ImageFile::PE::DOS_Header::_t_parse_PE__DOS_Header_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
1190 | 4.23k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_1;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_2;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_3; |
1191 | 4.23k | auto _t_self = DOS_Header::_t_self(); |
1192 | 4.23k | ::hilti::rt::detail::checkStack(); |
1193 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:222:19-242:1"); |
1194 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:223:29-223:33"); |
1195 | | |
1196 | | // Begin parsing production: Ctor: magic_4 -> b"MZ" (const bytes); |
1197 | 4.23k | ::spicy::rt::detail::expectBytesLiteral(_t_data, _t_cur, hlt_internal_pe_ImageFile::PE::_t_ctor__bytes, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:223:29-223:33"sv, (_t_lhs_1=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
1198 | 4.23k | _t_cur = _t_cur.advance(::hilti::rt::integer::safe<std::uint64_t>{2U}); |
1199 | 4.23k | if ( _t_trim ) { |
1200 | 0 | (*_t_data).trim(_t_cur.begin()); |
1201 | 0 | } |
1202 | | |
1203 | | // End parsing production: Ctor: magic_4 -> b"MZ" (const bytes); |
1204 | | |
1205 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_bytesInLastPage; |
1206 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:224:29-224:34"); |
1207 | | |
1208 | | // Begin parsing production: Variable: bytesInLastPage_2 -> uint<16>; |
1209 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:224:29-224:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1210 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_bytesInLastPage, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1211 | 4.23k | if ( _t_trim ) { |
1212 | 0 | (*_t_data).trim(_t_cur.begin()); |
1213 | 0 | } |
1214 | | |
1215 | | // End parsing production: Variable: bytesInLastPage_2 -> uint<16>; |
1216 | | |
1217 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_pagesInFile; |
1218 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:225:29-225:34"); |
1219 | | |
1220 | | // Begin parsing production: Variable: pagesInFile_2 -> uint<16>; |
1221 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:225:29-225:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1222 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_pagesInFile, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1223 | 4.23k | if ( _t_trim ) { |
1224 | 0 | (*_t_data).trim(_t_cur.begin()); |
1225 | 0 | } |
1226 | | |
1227 | | // End parsing production: Variable: pagesInFile_2 -> uint<16>; |
1228 | | |
1229 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_relocations; |
1230 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:226:29-226:34"); |
1231 | | |
1232 | | // Begin parsing production: Variable: relocations_2 -> uint<16>; |
1233 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:226:29-226:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1234 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_relocations, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1235 | 4.23k | if ( _t_trim ) { |
1236 | 0 | (*_t_data).trim(_t_cur.begin()); |
1237 | 0 | } |
1238 | | |
1239 | | // End parsing production: Variable: relocations_2 -> uint<16>; |
1240 | | |
1241 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_paragraphsInHeader; |
1242 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:227:29-227:34"); |
1243 | | |
1244 | | // Begin parsing production: Variable: paragraphsInHeader_2 -> uint<16>; |
1245 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:227:29-227:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1246 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_paragraphsInHeader, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1247 | 4.23k | if ( _t_trim ) { |
1248 | 0 | (*_t_data).trim(_t_cur.begin()); |
1249 | 0 | } |
1250 | | |
1251 | | // End parsing production: Variable: paragraphsInHeader_2 -> uint<16>; |
1252 | | |
1253 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_minExtraParagraphs; |
1254 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:228:29-228:34"); |
1255 | | |
1256 | | // Begin parsing production: Variable: minExtraParagraphs_2 -> uint<16>; |
1257 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:228:29-228:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1258 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_minExtraParagraphs, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1259 | 4.23k | if ( _t_trim ) { |
1260 | 0 | (*_t_data).trim(_t_cur.begin()); |
1261 | 0 | } |
1262 | | |
1263 | | // End parsing production: Variable: minExtraParagraphs_2 -> uint<16>; |
1264 | | |
1265 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_maxExtraParagraphs; |
1266 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:229:29-229:34"); |
1267 | | |
1268 | | // Begin parsing production: Variable: maxExtraParagraphs_2 -> uint<16>; |
1269 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:229:29-229:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1270 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_maxExtraParagraphs, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1271 | 4.23k | if ( _t_trim ) { |
1272 | 0 | (*_t_data).trim(_t_cur.begin()); |
1273 | 0 | } |
1274 | | |
1275 | | // End parsing production: Variable: maxExtraParagraphs_2 -> uint<16>; |
1276 | | |
1277 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_initialRelativeSS; |
1278 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:230:29-230:34"); |
1279 | | |
1280 | | // Begin parsing production: Variable: initialRelativeSS_2 -> uint<16>; |
1281 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:230:29-230:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1282 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_initialRelativeSS, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1283 | 4.23k | if ( _t_trim ) { |
1284 | 0 | (*_t_data).trim(_t_cur.begin()); |
1285 | 0 | } |
1286 | | |
1287 | | // End parsing production: Variable: initialRelativeSS_2 -> uint<16>; |
1288 | | |
1289 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_initialSP; |
1290 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:231:29-231:34"); |
1291 | | |
1292 | | // Begin parsing production: Variable: initialSP_2 -> uint<16>; |
1293 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:231:29-231:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1294 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_initialSP, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1295 | 4.23k | if ( _t_trim ) { |
1296 | 0 | (*_t_data).trim(_t_cur.begin()); |
1297 | 0 | } |
1298 | | |
1299 | | // End parsing production: Variable: initialSP_2 -> uint<16>; |
1300 | | |
1301 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_checksum; |
1302 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:232:29-232:34"); |
1303 | | |
1304 | | // Begin parsing production: Variable: checksum_2 -> uint<16>; |
1305 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:232:29-232:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1306 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_checksum, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1307 | 4.23k | if ( _t_trim ) { |
1308 | 0 | (*_t_data).trim(_t_cur.begin()); |
1309 | 0 | } |
1310 | | |
1311 | | // End parsing production: Variable: checksum_2 -> uint<16>; |
1312 | | |
1313 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_initialIP; |
1314 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:233:29-233:34"); |
1315 | | |
1316 | | // Begin parsing production: Variable: initialIP_2 -> uint<16>; |
1317 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:233:29-233:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1318 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_initialIP, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1319 | 4.23k | if ( _t_trim ) { |
1320 | 0 | (*_t_data).trim(_t_cur.begin()); |
1321 | 0 | } |
1322 | | |
1323 | | // End parsing production: Variable: initialIP_2 -> uint<16>; |
1324 | | |
1325 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_initialRelativeCS; |
1326 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:234:29-234:34"); |
1327 | | |
1328 | | // Begin parsing production: Variable: initialRelativeCS_2 -> uint<16>; |
1329 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:234:29-234:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1330 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_initialRelativeCS, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1331 | 4.23k | if ( _t_trim ) { |
1332 | 0 | (*_t_data).trim(_t_cur.begin()); |
1333 | 0 | } |
1334 | | |
1335 | | // End parsing production: Variable: initialRelativeCS_2 -> uint<16>; |
1336 | | |
1337 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_relocationTableAddress; |
1338 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:235:29-235:34"); |
1339 | | |
1340 | | // Begin parsing production: Variable: relocationTableAddress_2 -> uint<16>; |
1341 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:235:29-235:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1342 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_relocationTableAddress, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1343 | 4.23k | if ( _t_trim ) { |
1344 | 0 | (*_t_data).trim(_t_cur.begin()); |
1345 | 0 | } |
1346 | | |
1347 | | // End parsing production: Variable: relocationTableAddress_2 -> uint<16>; |
1348 | | |
1349 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_overlayNumber; |
1350 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:236:29-236:34"); |
1351 | | |
1352 | | // Begin parsing production: Variable: overlayNumber_2 -> uint<16>; |
1353 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:236:29-236:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1354 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_overlayNumber, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1355 | 4.23k | if ( _t_trim ) { |
1356 | 0 | (*_t_data).trim(_t_cur.begin()); |
1357 | 0 | } |
1358 | | |
1359 | | // End parsing production: Variable: overlayNumber_2 -> uint<16>; |
1360 | | |
1361 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:237:29-237:33"); |
1362 | | |
1363 | | // Begin parsing production: Variable: reserved1_2 -> bytes; |
1364 | 4.23k | ::spicy::rt::detail::extractBytes(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, ::hilti::rt::Bool{false}, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:237:5-237:42"sv, (_t_lhs_2=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
1365 | 4.23k | _t_cur = _t_cur.advance(::hilti::rt::integer::safe<std::uint64_t>{8U}); |
1366 | 4.23k | if ( _t_trim ) { |
1367 | 0 | (*_t_data).trim(_t_cur.begin()); |
1368 | 0 | } |
1369 | | |
1370 | | // End parsing production: Variable: reserved1_2 -> bytes; |
1371 | | |
1372 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_oemID; |
1373 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:238:29-238:34"); |
1374 | | |
1375 | | // Begin parsing production: Variable: oemID_2 -> uint<16>; |
1376 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:238:29-238:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1377 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_oemID, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1378 | 4.23k | if ( _t_trim ) { |
1379 | 0 | (*_t_data).trim(_t_cur.begin()); |
1380 | 0 | } |
1381 | | |
1382 | | // End parsing production: Variable: oemID_2 -> uint<16>; |
1383 | | |
1384 | 4.23k | ::hilti::rt::integer::safe<uint16_t> _t_v_oemInfo; |
1385 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:239:29-239:34"); |
1386 | | |
1387 | | // Begin parsing production: Variable: oemInfo_2 -> uint<16>; |
1388 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:239:29-239:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1389 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_oemInfo, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1390 | 4.23k | if ( _t_trim ) { |
1391 | 0 | (*_t_data).trim(_t_cur.begin()); |
1392 | 0 | } |
1393 | | |
1394 | | // End parsing production: Variable: oemInfo_2 -> uint<16>; |
1395 | | |
1396 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:240:29-240:33"); |
1397 | | |
1398 | | // Begin parsing production: Variable: reserved2_2 -> bytes; |
1399 | 4.23k | ::spicy::rt::detail::extractBytes(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{20U}, ::hilti::rt::Bool{false}, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:240:5-240:43"sv, (_t_lhs_3=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
1400 | 4.23k | _t_cur = _t_cur.advance(::hilti::rt::integer::safe<std::uint64_t>{20U}); |
1401 | 4.23k | if ( _t_trim ) { |
1402 | 0 | (*_t_data).trim(_t_cur.begin()); |
1403 | 0 | } |
1404 | | |
1405 | | // End parsing production: Variable: reserved2_2 -> bytes; |
1406 | | |
1407 | 4.23k | ::hilti::rt::integer::safe<uint32_t> _t_v_peHeaderOffset; |
1408 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:241:29-241:34"); |
1409 | | |
1410 | | // Begin parsing production: Variable: peHeaderOffset_2 -> uint<32>; |
1411 | 4.23k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:241:29-241:34"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1412 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_v_peHeaderOffset, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1413 | 4.23k | if ( _t_trim ) { |
1414 | 0 | (*_t_data).trim(_t_cur.begin()); |
1415 | 0 | } |
1416 | | |
1417 | | // End parsing production: Variable: peHeaderOffset_2 -> uint<32>; |
1418 | | |
1419 | 4.23k | (*_t_self).peHeaderOffset.valueOrInit() = _t_v_peHeaderOffset; |
1420 | 4.23k | ::hilti::rt::Result<::hilti::rt::Nothing> _t_requires = ((::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_v_peHeaderOffset)} >= hlt_internal_pe_ImageFile::PE::DOS_HeaderSize) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error{"&requires failed: ($$ >= DOS_HeaderSize)"}); |
1421 | 4.23k | if ( ! (::hilti::rt::Bool{static_cast<bool>(_t_requires)}) ) { |
1422 | 7 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:241:36-241:67"); |
1423 | 7 | throw ::spicy::rt::ParseError{::hilti::rt::detail::move_non_trivial(_t_requires).errorOrThrow(), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:241:36-241:67"}; |
1424 | 7 | } |
1425 | | |
1426 | 4.23k | ::hilti::rt::debug::dedent("spicy"sv); |
1427 | 4.23k | return _t_cur; |
1428 | 4.23k | } |
1429 | | |
1430 | 4.23k | auto hlt_internal_pe_ImageFile::PE::DOS_Header::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
1431 | 4.23k | auto _t_self = DOS_Header::_t_self(); |
1432 | 4.23k | ::hilti::rt::detail::checkStack(); |
1433 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:222:19-242:1"); |
1434 | 4.23k | ::hilti::rt::debug::indent("spicy"sv); |
1435 | 4.23k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1436 | 4.23k | return (*_t_self)._t_parse_PE__DOS_Header_2_stage2(_t_data, _t_cur, _t_trim); |
1437 | 4.23k | } |
1438 | | |
1439 | 11.7k | auto hlt_internal_pe_ImageFile::PE::DataDirectory::_t_parse_PE__DataDirectory_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
1440 | 11.7k | auto _t_self = DataDirectory::_t_self(); |
1441 | 11.7k | ::hilti::rt::detail::checkStack(); |
1442 | 11.7k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:310:22-313:1"); |
1443 | 11.7k | ::hilti::rt::integer::safe<uint32_t> _t_v_virtualAddress; |
1444 | 11.7k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:311:21-311:26"); |
1445 | | |
1446 | | // Begin parsing production: Variable: virtualAddress_4 -> uint<32>; |
1447 | 11.7k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:311:21-311:26"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1448 | 11.7k | ::hilti::rt::tuple::assign(std::tie(_t_v_virtualAddress, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1449 | 11.7k | if ( _t_trim ) { |
1450 | 0 | (*_t_data).trim(_t_cur.begin()); |
1451 | 0 | } |
1452 | | |
1453 | | // End parsing production: Variable: virtualAddress_4 -> uint<32>; |
1454 | | |
1455 | 11.7k | (*_t_self).virtualAddress.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_virtualAddress); |
1456 | 11.7k | ::hilti::rt::integer::safe<uint32_t> _t_v_size; |
1457 | 11.7k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:312:21-312:26"); |
1458 | | |
1459 | | // Begin parsing production: Variable: size_3 -> uint<32>; |
1460 | 11.7k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:312:21-312:26"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1461 | 11.7k | ::hilti::rt::tuple::assign(std::tie(_t_v_size, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1462 | 11.7k | if ( _t_trim ) { |
1463 | 0 | (*_t_data).trim(_t_cur.begin()); |
1464 | 0 | } |
1465 | | |
1466 | | // End parsing production: Variable: size_3 -> uint<32>; |
1467 | | |
1468 | 11.7k | (*_t_self).size.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_size); |
1469 | 11.7k | ::hilti::rt::debug::dedent("spicy"sv); |
1470 | 11.7k | return _t_cur; |
1471 | 11.7k | } |
1472 | | |
1473 | 11.7k | auto hlt_internal_pe_ImageFile::PE::DataDirectory::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
1474 | 11.7k | auto _t_self = DataDirectory::_t_self(); |
1475 | 11.7k | ::hilti::rt::detail::checkStack(); |
1476 | 11.7k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:310:22-313:1"); |
1477 | 11.7k | ::hilti::rt::debug::indent("spicy"sv); |
1478 | 11.7k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1479 | 11.7k | return (*_t_self)._t_parse_PE__DataDirectory_3_stage2(_t_data, _t_cur, _t_trim); |
1480 | 11.7k | } |
1481 | | |
1482 | 411 | auto hlt_internal_pe_ImageFile::PE::ExportAddressTable::_t_parse_PE__ExportAddressTable_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1483 | 411 | auto _t_self = ExportAddressTable::_t_self(); |
1484 | 411 | ::hilti::rt::detail::checkStack(); |
1485 | 411 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:369:27-371:1"); |
1486 | 411 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:370:5-370:72"); |
1487 | | |
1488 | | // Begin parsing production: Counter: entries_9 -> counter(min(entryCount, MaxExportSyms)): Resolved_34; |
1489 | 411 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse_entries_9_stage1(_t_data, _t_cur, _t_trim, _t_error, (*_t_self).entries.valueOrInit())); |
1490 | | // End parsing production: Counter: entries_9 -> counter(min(entryCount, MaxExportSyms)): Resolved_34; |
1491 | | |
1492 | 411 | ::hilti::rt::debug::dedent("spicy"sv); |
1493 | 411 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_error)); |
1494 | 411 | } |
1495 | | |
1496 | 411 | auto hlt_internal_pe_ImageFile::PE::ExportAddressTable::_t_parse_entries_9_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1497 | 411 | auto _t_self = ExportAddressTable::_t_self(); |
1498 | 411 | ::hilti::rt::detail::checkStack(); |
1499 | 411 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:370:5-370:72"); |
1500 | 411 | ::hilti::rt::integer::safe<uint64_t> _t_repeat = min(::hilti::rt::integer::safe<uint64_t>{_t_self->_t_p_entryCount}, hlt_internal_pe_ImageFile::PE::MaxExportSyms); |
1501 | 411 | _t_dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _t_repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _t_repeat)); |
1502 | 275k | for ( ::hilti::rt::integer::safe<uint64_t> _t_i = ::hilti::rt::detail::move_non_trivial(_t_repeat); ::hilti::rt::Bool{static_cast<bool>(_t_i)}; ) { |
1503 | 275k | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_4; |
1504 | 275k | _t_i--; |
1505 | 275k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>> _t_elem; |
1506 | 275k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:393:32-413:1"); |
1507 | | |
1508 | | // Begin parsing production: Unit: PE__ExportAddressTableEntry_3 -> rva_5 forwarder_3 (field '_anon_4', id n/a, parser, args: (f)) (container 'entries'); |
1509 | 275k | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry>>((hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_4=(_t_self->_t_p_f.derefAsValue()).asSharedPtr())})); |
1510 | 275k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_error)); |
1511 | | // End parsing production: Unit: PE__ExportAddressTableEntry_3 -> rva_5 forwarder_3 (field '_anon_4', id n/a, parser, args: (f)) (container 'entries'); |
1512 | | |
1513 | 275k | _t_dst.emplace_back(::hilti::rt::detail::move_non_trivial(_t_elem).value()); |
1514 | 275k | } |
1515 | | |
1516 | 411 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
1517 | 411 | } |
1518 | | |
1519 | 411 | auto hlt_internal_pe_ImageFile::PE::ExportAddressTable::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1520 | 411 | auto _t_self = ExportAddressTable::_t_self(); |
1521 | 411 | ::hilti::rt::detail::checkStack(); |
1522 | 411 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:369:27-371:1"); |
1523 | 411 | ::hilti::rt::debug::indent("spicy"sv); |
1524 | 411 | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1525 | 411 | return (*_t_self)._t_parse_PE__ExportAddressTable_3_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_error); |
1526 | 411 | } |
1527 | | |
1528 | 274k | inline void hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry::_t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
1529 | 274k | auto _t_self = PE::ExportAddressTableEntry::_t_self(); |
1530 | 274k | return hlt_internal_pe_ImageFile::PE::_t_hook_ExportAddressTableEntry__t_on_rva(_t_dd, _t_self); |
1531 | 274k | } |
1532 | | |
1533 | 275k | auto hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry::_t_parse_PE__ExportAddressTableEntry_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1534 | 275k | auto _t_self = ExportAddressTableEntry::_t_self(); |
1535 | 275k | ::hilti::rt::detail::checkStack(); |
1536 | 275k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:393:32-413:1"); |
1537 | 275k | ::hilti::rt::integer::safe<uint32_t> _t_v_rva; |
1538 | 275k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:394:16-394:21"); |
1539 | | |
1540 | | // Begin parsing production: Variable: rva_8 -> uint<32>; |
1541 | 275k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:394:16-394:21"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1542 | 275k | ::hilti::rt::tuple::assign(std::tie(_t_v_rva, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1543 | 275k | if ( _t_trim ) { |
1544 | 0 | (*_t_data).trim(_t_cur.begin()); |
1545 | 0 | } |
1546 | | |
1547 | | // End parsing production: Variable: rva_8 -> uint<32>; |
1548 | | |
1549 | 275k | (*_t_self)._t_error = _t_error; |
1550 | 275k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:394:5-394:22"); |
1551 | 275k | (*_t_self)._t_on_rva(::hilti::rt::detail::move_non_trivial(_t_v_rva)); |
1552 | 275k | _t_error = (*_t_self)._t_error; |
1553 | 275k | ::hilti::rt::location("<no location>"); |
1554 | 275k | if ( (*_t_self).forwarderOffset.hasValue() ) { |
1555 | 6.32k | ::hilti::rt::stream::SafeConstIterator _t_parse_at = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).forwarderOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
1556 | 6.32k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1557 | 6.32k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin = _t_parse_at; |
1558 | 6.32k | ::hilti::rt::stream::View _t_parse_cur = _t_cur.advance(_t_parse_at); |
1559 | | |
1560 | | // Begin parsing production: Enclosure: forwarder_4 -> Resolved_43; |
1561 | 6.32k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
1562 | 6.32k | hlt_internal_pe_ImageFile::PE::NullTerminatedString _t_parsed__anon_8; |
1563 | | |
1564 | | // Begin parsing production: Unit: PE__NullTerminatedString_7 -> s_7; |
1565 | 6.32k | _t_parsed__anon_8 = (hlt_internal_pe_ImageFile::PE::NullTerminatedString{}); |
1566 | 6.32k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur, _t_parse_lah), _t_parsed__anon_8._t_parse_stage1(_t_data, _t_parse_cur, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah))); |
1567 | | // End parsing production: Unit: PE__NullTerminatedString_7 -> s_7; |
1568 | | |
1569 | 6.32k | ::hilti::rt::detail::move_non_trivial(_t_parsed__anon_8)._t_convert(); |
1570 | | // End parsing production: Enclosure: forwarder_4 -> Resolved_43; |
1571 | 6.32k | } |
1572 | | |
1573 | 275k | ::hilti::rt::debug::dedent("spicy"sv); |
1574 | 275k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
1575 | 275k | } |
1576 | | |
1577 | 275k | auto hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1578 | 275k | auto _t_self = ExportAddressTableEntry::_t_self(); |
1579 | 275k | ::hilti::rt::detail::checkStack(); |
1580 | 275k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:393:32-413:1"); |
1581 | 275k | ::hilti::rt::debug::indent("spicy"sv); |
1582 | 275k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1583 | 275k | return (*_t_self)._t_parse_PE__ExportAddressTableEntry_4_stage2(_t_data, _t_cur, _t_trim, _t_error); |
1584 | 275k | } |
1585 | | |
1586 | 1.13k | inline void hlt_internal_pe_ImageFile::PE::ExportDirectoryTable::_t_on_addressTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
1587 | 1.13k | auto _t_self = PE::ExportDirectoryTable::_t_self(); |
1588 | 1.13k | return hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_addressTableRVA(_t_dd, _t_self); |
1589 | 1.13k | } |
1590 | | |
1591 | 1.15k | inline void hlt_internal_pe_ImageFile::PE::ExportDirectoryTable::_t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
1592 | 1.15k | auto _t_self = PE::ExportDirectoryTable::_t_self(); |
1593 | 1.15k | return hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_dllNameRVA(_t_dd, _t_self); |
1594 | 1.15k | } |
1595 | | |
1596 | 1.13k | inline void hlt_internal_pe_ImageFile::PE::ExportDirectoryTable::_t_on_namePtrTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
1597 | 1.13k | auto _t_self = PE::ExportDirectoryTable::_t_self(); |
1598 | 1.13k | return hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_namePtrTableRVA(_t_dd, _t_self); |
1599 | 1.13k | } |
1600 | | |
1601 | 1.13k | inline void hlt_internal_pe_ImageFile::PE::ExportDirectoryTable::_t_on_ordinalTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
1602 | 1.13k | auto _t_self = PE::ExportDirectoryTable::_t_self(); |
1603 | 1.13k | return hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_ordinalTableRVA(_t_dd, _t_self); |
1604 | 1.13k | } |
1605 | | |
1606 | 1.17k | auto hlt_internal_pe_ImageFile::PE::ExportDirectoryTable::_t_parse_PE__ExportDirectoryTable_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1607 | 1.17k | auto _t_self = ExportDirectoryTable::_t_self(); |
1608 | 1.17k | ::hilti::rt::detail::checkStack(); |
1609 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:332:29-367:1"); |
1610 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_flags; |
1611 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:333:24-333:29"); |
1612 | | |
1613 | | // Begin parsing production: Variable: flags_2 -> uint<32>; |
1614 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:333:24-333:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1615 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_flags, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1616 | 1.17k | if ( _t_trim ) { |
1617 | 0 | (*_t_data).trim(_t_cur.begin()); |
1618 | 0 | } |
1619 | | |
1620 | | // End parsing production: Variable: flags_2 -> uint<32>; |
1621 | | |
1622 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_timeDateStamp; |
1623 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:334:24-334:29"); |
1624 | | |
1625 | | // Begin parsing production: Variable: timeDateStamp_5 -> uint<32>; |
1626 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:334:24-334:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1627 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_timeDateStamp, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1628 | 1.17k | if ( _t_trim ) { |
1629 | 0 | (*_t_data).trim(_t_cur.begin()); |
1630 | 0 | } |
1631 | | |
1632 | | // End parsing production: Variable: timeDateStamp_5 -> uint<32>; |
1633 | | |
1634 | 1.17k | ::hilti::rt::integer::safe<uint16_t> _t_v_majorVersion; |
1635 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:335:24-335:29"); |
1636 | | |
1637 | | // Begin parsing production: Variable: majorVersion_2 -> uint<16>; |
1638 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:335:24-335:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1639 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_majorVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1640 | 1.17k | if ( _t_trim ) { |
1641 | 0 | (*_t_data).trim(_t_cur.begin()); |
1642 | 0 | } |
1643 | | |
1644 | | // End parsing production: Variable: majorVersion_2 -> uint<16>; |
1645 | | |
1646 | 1.17k | ::hilti::rt::integer::safe<uint16_t> _t_v_minorVersion; |
1647 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:336:24-336:29"); |
1648 | | |
1649 | | // Begin parsing production: Variable: minorVersion_2 -> uint<16>; |
1650 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:336:24-336:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1651 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_minorVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1652 | 1.17k | if ( _t_trim ) { |
1653 | 0 | (*_t_data).trim(_t_cur.begin()); |
1654 | 0 | } |
1655 | | |
1656 | | // End parsing production: Variable: minorVersion_2 -> uint<16>; |
1657 | | |
1658 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_dllNameRVA; |
1659 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:337:24-337:29"); |
1660 | | |
1661 | | // Begin parsing production: Variable: dllNameRVA_3 -> uint<32>; |
1662 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:337:24-337:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1663 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_dllNameRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1664 | 1.17k | if ( _t_trim ) { |
1665 | 0 | (*_t_data).trim(_t_cur.begin()); |
1666 | 0 | } |
1667 | | |
1668 | | // End parsing production: Variable: dllNameRVA_3 -> uint<32>; |
1669 | | |
1670 | 1.17k | (*_t_self)._t_error = _t_error; |
1671 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:337:5-337:30"); |
1672 | 1.17k | (*_t_self)._t_on_dllNameRVA(::hilti::rt::detail::move_non_trivial(_t_v_dllNameRVA)); |
1673 | 1.17k | _t_error = (*_t_self)._t_error; |
1674 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_ordinalBase; |
1675 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:338:24-338:29"); |
1676 | | |
1677 | | // Begin parsing production: Variable: ordinalBase_2 -> uint<32>; |
1678 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:338:24-338:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1679 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_ordinalBase, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1680 | 1.17k | if ( _t_trim ) { |
1681 | 0 | (*_t_data).trim(_t_cur.begin()); |
1682 | 0 | } |
1683 | | |
1684 | | // End parsing production: Variable: ordinalBase_2 -> uint<32>; |
1685 | | |
1686 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_addressTableCount; |
1687 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:339:24-339:29"); |
1688 | | |
1689 | | // Begin parsing production: Variable: addressTableCount_2 -> uint<32>; |
1690 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:339:24-339:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1691 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_addressTableCount, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1692 | 1.17k | if ( _t_trim ) { |
1693 | 0 | (*_t_data).trim(_t_cur.begin()); |
1694 | 0 | } |
1695 | | |
1696 | | // End parsing production: Variable: addressTableCount_2 -> uint<32>; |
1697 | | |
1698 | 1.17k | (*_t_self).addressTableCount.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_addressTableCount); |
1699 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_namePtrTableCount; |
1700 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:340:24-340:29"); |
1701 | | |
1702 | | // Begin parsing production: Variable: namePtrTableCount_2 -> uint<32>; |
1703 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:340:24-340:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1704 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_namePtrTableCount, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1705 | 1.17k | if ( _t_trim ) { |
1706 | 0 | (*_t_data).trim(_t_cur.begin()); |
1707 | 0 | } |
1708 | | |
1709 | | // End parsing production: Variable: namePtrTableCount_2 -> uint<32>; |
1710 | | |
1711 | 1.17k | (*_t_self).namePtrTableCount.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_namePtrTableCount); |
1712 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_addressTableRVA; |
1713 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:341:24-341:29"); |
1714 | | |
1715 | | // Begin parsing production: Variable: addressTableRVA_2 -> uint<32>; |
1716 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:341:24-341:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1717 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_addressTableRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1718 | 1.17k | if ( _t_trim ) { |
1719 | 0 | (*_t_data).trim(_t_cur.begin()); |
1720 | 0 | } |
1721 | | |
1722 | | // End parsing production: Variable: addressTableRVA_2 -> uint<32>; |
1723 | | |
1724 | 1.17k | (*_t_self)._t_error = _t_error; |
1725 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:341:5-341:30"); |
1726 | 1.17k | (*_t_self)._t_on_addressTableRVA(::hilti::rt::detail::move_non_trivial(_t_v_addressTableRVA)); |
1727 | 1.17k | _t_error = (*_t_self)._t_error; |
1728 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_namePtrTableRVA; |
1729 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:342:24-342:29"); |
1730 | | |
1731 | | // Begin parsing production: Variable: namePtrTableRVA_2 -> uint<32>; |
1732 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:342:24-342:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1733 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_namePtrTableRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1734 | 1.17k | if ( _t_trim ) { |
1735 | 0 | (*_t_data).trim(_t_cur.begin()); |
1736 | 0 | } |
1737 | | |
1738 | | // End parsing production: Variable: namePtrTableRVA_2 -> uint<32>; |
1739 | | |
1740 | 1.17k | (*_t_self)._t_error = _t_error; |
1741 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:342:5-342:30"); |
1742 | 1.17k | (*_t_self)._t_on_namePtrTableRVA(::hilti::rt::detail::move_non_trivial(_t_v_namePtrTableRVA)); |
1743 | 1.17k | _t_error = (*_t_self)._t_error; |
1744 | 1.17k | ::hilti::rt::integer::safe<uint32_t> _t_v_ordinalTableRVA; |
1745 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:343:24-343:29"); |
1746 | | |
1747 | | // Begin parsing production: Variable: ordinalTableRVA_2 -> uint<32>; |
1748 | 1.17k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:343:24-343:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1749 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_v_ordinalTableRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1750 | 1.17k | if ( _t_trim ) { |
1751 | 0 | (*_t_data).trim(_t_cur.begin()); |
1752 | 0 | } |
1753 | | |
1754 | | // End parsing production: Variable: ordinalTableRVA_2 -> uint<32>; |
1755 | | |
1756 | 1.17k | (*_t_self)._t_error = _t_error; |
1757 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:343:5-343:30"); |
1758 | 1.17k | (*_t_self)._t_on_ordinalTableRVA(::hilti::rt::detail::move_non_trivial(_t_v_ordinalTableRVA)); |
1759 | 1.17k | _t_error = (*_t_self)._t_error; |
1760 | 1.17k | ::hilti::rt::location("<no location>"); |
1761 | 1.17k | if ( (*_t_self).dllNameOffset.hasValue() ) { |
1762 | 231 | ::hilti::rt::stream::SafeConstIterator _t_parse_at = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).dllNameOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
1763 | 231 | ::hilti::rt::integer::safe<int64_t> _t_parse_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1764 | 231 | ::hilti::rt::stream::SafeConstIterator _t_parse_begin = _t_parse_at; |
1765 | 231 | ::hilti::rt::stream::View _t_parse_cur = _t_cur.advance(_t_parse_at); |
1766 | | |
1767 | | // Begin parsing production: Enclosure: dllName_3 -> Resolved_27; |
1768 | 231 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
1769 | 231 | hlt_internal_pe_ImageFile::PE::NullTerminatedString _t_parsed__anon_3; |
1770 | | |
1771 | | // Begin parsing production: Unit: PE__NullTerminatedString_3 -> s_3; |
1772 | 231 | _t_parsed__anon_3 = (hlt_internal_pe_ImageFile::PE::NullTerminatedString{}); |
1773 | 231 | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur, _t_parse_lah), _t_parsed__anon_3._t_parse_stage1(_t_data, _t_parse_cur, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah))); |
1774 | | // End parsing production: Unit: PE__NullTerminatedString_3 -> s_3; |
1775 | | |
1776 | 231 | ::hilti::rt::detail::move_non_trivial(_t_parsed__anon_3)._t_convert(); |
1777 | | // End parsing production: Enclosure: dllName_3 -> Resolved_27; |
1778 | 231 | } |
1779 | | |
1780 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:369:27-371:1"); |
1781 | 1.17k | if ( (*_t_self).addressTableOffset.hasValue() ) { |
1782 | 417 | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_5; |
1783 | 417 | ::hilti::rt::stream::SafeConstIterator _t_parse_at_ = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).addressTableOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
1784 | 417 | ::hilti::rt::integer::safe<int64_t> _t_parse_lah_ = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1785 | 417 | ::hilti::rt::stream::SafeConstIterator _t_parse_begin_ = _t_parse_at_; |
1786 | 417 | ::hilti::rt::stream::View _t_parse_cur_ = _t_cur.advance(_t_parse_at_); |
1787 | | |
1788 | | // Begin parsing production: Unit: PE__ExportAddressTable_2 -> entries_6 (field 'addressTable', id n/a, parser, args: (f, self.addressTableCount)); |
1789 | 417 | (*_t_self).addressTable.valueOrInit() = (hlt_internal_pe_ImageFile::PE::ExportAddressTable{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_5=(_t_self->_t_p_f.derefAsValue()).asSharedPtr()), (*_t_self).addressTableCount.value()}); |
1790 | 417 | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur_, _t_parse_lah_, _t_error), (*(*_t_self).addressTable.value())._t_parse_stage1(_t_data, _t_parse_cur_, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah_), _t_error)); |
1791 | | // End parsing production: Unit: PE__ExportAddressTable_2 -> entries_6 (field 'addressTable', id n/a, parser, args: (f, self.addressTableCount)); |
1792 | 417 | } |
1793 | | |
1794 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:373:27-375:1"); |
1795 | 1.17k | if ( (*_t_self).namePtrTableOffset.hasValue() ) { |
1796 | 339 | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_6; |
1797 | 339 | ::hilti::rt::stream::SafeConstIterator _t_parse_at__ = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).namePtrTableOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
1798 | 339 | ::hilti::rt::integer::safe<int64_t> _t_parse_lah__ = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1799 | 339 | ::hilti::rt::stream::SafeConstIterator _t_parse_begin__ = _t_parse_at__; |
1800 | 339 | ::hilti::rt::stream::View _t_parse_cur__ = _t_cur.advance(_t_parse_at__); |
1801 | | |
1802 | | // Begin parsing production: Unit: PE__ExportNamePtrTable_2 -> entries_7 (field 'namePtrTable', id n/a, parser, args: (f, self.namePtrTableCount)); |
1803 | 339 | (*_t_self).namePtrTable.valueOrInit() = (hlt_internal_pe_ImageFile::PE::ExportNamePtrTable{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_6=(_t_self->_t_p_f.derefAsValue()).asSharedPtr()), (*_t_self).namePtrTableCount.value()}); |
1804 | 339 | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur__, _t_parse_lah__, _t_error), (*(*_t_self).namePtrTable.value())._t_parse_stage1(_t_data, _t_parse_cur__, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah__), _t_error)); |
1805 | | // End parsing production: Unit: PE__ExportNamePtrTable_2 -> entries_7 (field 'namePtrTable', id n/a, parser, args: (f, self.namePtrTableCount)); |
1806 | 339 | } |
1807 | | |
1808 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:377:27-379:1"); |
1809 | 1.17k | if ( (*_t_self).ordinalTableOffset.hasValue() ) { |
1810 | 178 | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_7; |
1811 | 178 | ::hilti::rt::stream::SafeConstIterator _t_parse_at___ = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).ordinalTableOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
1812 | 178 | ::hilti::rt::integer::safe<int64_t> _t_parse_lah___ = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1813 | 178 | ::hilti::rt::stream::SafeConstIterator _t_parse_begin___ = _t_parse_at___; |
1814 | 178 | ::hilti::rt::stream::View _t_parse_cur___ = _t_cur.advance(_t_parse_at___); |
1815 | | |
1816 | | // Begin parsing production: Unit: PE__ExportOrdinalTable_2 -> entries_8 (field 'ordinalTable', id n/a, parser, args: (f, self.namePtrTableCount)); |
1817 | 178 | (*_t_self).ordinalTable.valueOrInit() = (hlt_internal_pe_ImageFile::PE::ExportOrdinalTable{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_7=(_t_self->_t_p_f.derefAsValue()).asSharedPtr()), (*_t_self).namePtrTableCount.value()}); |
1818 | 178 | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur___, _t_parse_lah___), (*(*_t_self).ordinalTable.value())._t_parse_stage1(_t_data, _t_parse_cur___, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah___))); |
1819 | | // End parsing production: Unit: PE__ExportOrdinalTable_2 -> entries_8 (field 'ordinalTable', id n/a, parser, args: (f, self.namePtrTableCount)); |
1820 | 178 | } |
1821 | | |
1822 | 1.17k | ::hilti::rt::debug::dedent("spicy"sv); |
1823 | 1.17k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_error)); |
1824 | 1.17k | } |
1825 | | |
1826 | 1.17k | auto hlt_internal_pe_ImageFile::PE::ExportDirectoryTable::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1827 | 1.17k | auto _t_self = ExportDirectoryTable::_t_self(); |
1828 | 1.17k | ::hilti::rt::detail::checkStack(); |
1829 | 1.17k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:332:29-367:1"); |
1830 | 1.17k | ::hilti::rt::debug::indent("spicy"sv); |
1831 | 1.17k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1832 | 1.17k | return (*_t_self)._t_parse_PE__ExportDirectoryTable_2_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_error); |
1833 | 1.17k | } |
1834 | | |
1835 | 329 | auto hlt_internal_pe_ImageFile::PE::ExportNamePtrTable::_t_parse_PE__ExportNamePtrTable_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1836 | 329 | auto _t_self = ExportNamePtrTable::_t_self(); |
1837 | 329 | ::hilti::rt::detail::checkStack(); |
1838 | 329 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:373:27-375:1"); |
1839 | 329 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:374:5-374:72"); |
1840 | | |
1841 | | // Begin parsing production: Counter: entries_10 -> counter(min(entryCount, MaxExportSyms)): Resolved_37; |
1842 | 329 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse_entries_10_stage1(_t_data, _t_cur, _t_trim, _t_error, (*_t_self).entries.valueOrInit())); |
1843 | | // End parsing production: Counter: entries_10 -> counter(min(entryCount, MaxExportSyms)): Resolved_37; |
1844 | | |
1845 | 329 | ::hilti::rt::debug::dedent("spicy"sv); |
1846 | 329 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_error)); |
1847 | 329 | } |
1848 | | |
1849 | 329 | auto hlt_internal_pe_ImageFile::PE::ExportNamePtrTable::_t_parse_entries_10_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1850 | 329 | auto _t_self = ExportNamePtrTable::_t_self(); |
1851 | 329 | ::hilti::rt::detail::checkStack(); |
1852 | 329 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:374:5-374:72"); |
1853 | 329 | ::hilti::rt::integer::safe<uint64_t> _t_repeat = min(::hilti::rt::integer::safe<uint64_t>{_t_self->_t_p_entryCount}, hlt_internal_pe_ImageFile::PE::MaxExportSyms); |
1854 | 329 | _t_dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _t_repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _t_repeat)); |
1855 | 88.6k | for ( ::hilti::rt::integer::safe<uint64_t> _t_i = ::hilti::rt::detail::move_non_trivial(_t_repeat); ::hilti::rt::Bool{static_cast<bool>(_t_i)}; ) { |
1856 | 88.3k | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_8; |
1857 | 88.3k | _t_i--; |
1858 | 88.3k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>> _t_elem; |
1859 | 88.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:381:32-391:1"); |
1860 | | |
1861 | | // Begin parsing production: Unit: PE__ExportNamePtrTableEntry_3 -> rva_6 name_6 (field '_anon_5', id n/a, parser, args: (f)) (container 'entries'); |
1862 | 88.3k | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry>>((hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_8=(_t_self->_t_p_f.derefAsValue()).asSharedPtr())})); |
1863 | 88.3k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_error)); |
1864 | | // End parsing production: Unit: PE__ExportNamePtrTableEntry_3 -> rva_6 name_6 (field '_anon_5', id n/a, parser, args: (f)) (container 'entries'); |
1865 | | |
1866 | 88.3k | _t_dst.emplace_back(::hilti::rt::detail::move_non_trivial(_t_elem).value()); |
1867 | 88.3k | } |
1868 | | |
1869 | 329 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
1870 | 329 | } |
1871 | | |
1872 | 329 | auto hlt_internal_pe_ImageFile::PE::ExportNamePtrTable::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1873 | 329 | auto _t_self = ExportNamePtrTable::_t_self(); |
1874 | 329 | ::hilti::rt::detail::checkStack(); |
1875 | 329 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:373:27-375:1"); |
1876 | 329 | ::hilti::rt::debug::indent("spicy"sv); |
1877 | 329 | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1878 | 329 | return (*_t_self)._t_parse_PE__ExportNamePtrTable_3_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_error); |
1879 | 329 | } |
1880 | | |
1881 | 88.2k | inline void hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry::_t_on_rva(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
1882 | 88.2k | auto _t_self = PE::ExportNamePtrTableEntry::_t_self(); |
1883 | 88.2k | return hlt_internal_pe_ImageFile::PE::_t_hook_ExportNamePtrTableEntry__t_on_rva(_t_dd, _t_self); |
1884 | 88.2k | } |
1885 | | |
1886 | 88.3k | auto hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry::_t_parse_PE__ExportNamePtrTableEntry_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1887 | 88.3k | auto _t_self = ExportNamePtrTableEntry::_t_self(); |
1888 | 88.3k | ::hilti::rt::detail::checkStack(); |
1889 | 88.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:381:32-391:1"); |
1890 | 88.3k | ::hilti::rt::integer::safe<uint32_t> _t_v_rva; |
1891 | 88.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:382:11-382:16"); |
1892 | | |
1893 | | // Begin parsing production: Variable: rva_7 -> uint<32>; |
1894 | 88.3k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:382:11-382:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1895 | 88.3k | ::hilti::rt::tuple::assign(std::tie(_t_v_rva, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1896 | 88.3k | if ( _t_trim ) { |
1897 | 0 | (*_t_data).trim(_t_cur.begin()); |
1898 | 0 | } |
1899 | | |
1900 | | // End parsing production: Variable: rva_7 -> uint<32>; |
1901 | | |
1902 | 88.3k | (*_t_self)._t_error = _t_error; |
1903 | 88.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:382:5-382:17"); |
1904 | 88.3k | (*_t_self)._t_on_rva(::hilti::rt::detail::move_non_trivial(_t_v_rva)); |
1905 | 88.3k | _t_error = (*_t_self)._t_error; |
1906 | 88.3k | ::hilti::rt::location("<no location>"); |
1907 | 88.3k | if ( (*_t_self).nameOffset.hasValue() ) { |
1908 | 3.37k | ::hilti::rt::stream::SafeConstIterator _t_parse_at = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).nameOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
1909 | 3.37k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1910 | 3.37k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin = _t_parse_at; |
1911 | 3.37k | ::hilti::rt::stream::View _t_parse_cur = _t_cur.advance(_t_parse_at); |
1912 | | |
1913 | | // Begin parsing production: Enclosure: name_7 -> Resolved_41; |
1914 | 3.37k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
1915 | 3.37k | hlt_internal_pe_ImageFile::PE::NullTerminatedString _t_parsed__anon_7; |
1916 | | |
1917 | | // Begin parsing production: Unit: PE__NullTerminatedString_6 -> s_6; |
1918 | 3.37k | _t_parsed__anon_7 = (hlt_internal_pe_ImageFile::PE::NullTerminatedString{}); |
1919 | 3.37k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur, _t_parse_lah), _t_parsed__anon_7._t_parse_stage1(_t_data, _t_parse_cur, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah))); |
1920 | | // End parsing production: Unit: PE__NullTerminatedString_6 -> s_6; |
1921 | | |
1922 | 3.37k | ::hilti::rt::detail::move_non_trivial(_t_parsed__anon_7)._t_convert(); |
1923 | | // End parsing production: Enclosure: name_7 -> Resolved_41; |
1924 | 3.37k | } |
1925 | | |
1926 | 88.3k | ::hilti::rt::debug::dedent("spicy"sv); |
1927 | 88.3k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
1928 | 88.3k | } |
1929 | | |
1930 | 88.3k | auto hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1931 | 88.3k | auto _t_self = ExportNamePtrTableEntry::_t_self(); |
1932 | 88.3k | ::hilti::rt::detail::checkStack(); |
1933 | 88.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:381:32-391:1"); |
1934 | 88.3k | ::hilti::rt::debug::indent("spicy"sv); |
1935 | 88.3k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1936 | 88.3k | return (*_t_self)._t_parse_PE__ExportNamePtrTableEntry_4_stage2(_t_data, _t_cur, _t_trim, _t_error); |
1937 | 88.3k | } |
1938 | | |
1939 | 176 | auto hlt_internal_pe_ImageFile::PE::ExportOrdinalTable::_t_parse_PE__ExportOrdinalTable_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>> { |
1940 | 176 | auto _t_self = ExportOrdinalTable::_t_self(); |
1941 | 176 | ::hilti::rt::detail::checkStack(); |
1942 | 176 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:377:27-379:1"); |
1943 | 176 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:378:5-378:52"); |
1944 | | |
1945 | | // Begin parsing production: Counter: entries_11 -> counter(min(entryCount, MaxExportSyms)): _anon_6_3; |
1946 | 176 | _t_cur = (*_t_self)._t_parse_entries_11_stage1(_t_data, _t_cur, _t_trim, (*_t_self).entries.valueOrInit()); |
1947 | | // End parsing production: Counter: entries_11 -> counter(min(entryCount, MaxExportSyms)): _anon_6_3; |
1948 | | |
1949 | 176 | ::hilti::rt::debug::dedent("spicy"sv); |
1950 | 176 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah)); |
1951 | 176 | } |
1952 | | |
1953 | 176 | auto hlt_internal_pe_ImageFile::PE::ExportOrdinalTable::_t_parse_entries_11_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>& _t_dst) -> ::hilti::rt::stream::View { |
1954 | 176 | auto _t_self = ExportOrdinalTable::_t_self(); |
1955 | 176 | ::hilti::rt::detail::checkStack(); |
1956 | 176 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:378:5-378:52"); |
1957 | 176 | ::hilti::rt::integer::safe<uint64_t> _t_repeat = min(::hilti::rt::integer::safe<uint64_t>{_t_self->_t_p_entryCount}, hlt_internal_pe_ImageFile::PE::MaxExportSyms); |
1958 | 176 | _t_dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _t_repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _t_repeat)); |
1959 | 1.08M | for ( ::hilti::rt::integer::safe<uint64_t> _t_i = ::hilti::rt::detail::move_non_trivial(_t_repeat); ::hilti::rt::Bool{static_cast<bool>(_t_i)}; ) { |
1960 | 1.08M | _t_i--; |
1961 | 1.08M | ::hilti::rt::integer::safe<uint16_t> _t_elem; |
1962 | 1.08M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:378:14-378:19"); |
1963 | | |
1964 | | // Begin parsing production: Variable: _anon_6_3 -> uint<16> (container 'entries'); |
1965 | 1.08M | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:378:14-378:19"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1966 | 1.08M | ::hilti::rt::tuple::assign(std::tie(_t_elem, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1967 | 1.08M | if ( _t_trim ) { |
1968 | 0 | (*_t_data).trim(_t_cur.begin()); |
1969 | 0 | } |
1970 | | |
1971 | | // End parsing production: Variable: _anon_6_3 -> uint<16> (container 'entries'); |
1972 | | |
1973 | 1.08M | _t_dst.emplace_back(_t_elem); |
1974 | 1.08M | } |
1975 | | |
1976 | 176 | return _t_cur; |
1977 | 176 | } |
1978 | | |
1979 | 176 | auto hlt_internal_pe_ImageFile::PE::ExportOrdinalTable::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>> { |
1980 | 176 | auto _t_self = ExportOrdinalTable::_t_self(); |
1981 | 176 | ::hilti::rt::detail::checkStack(); |
1982 | 176 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:377:27-379:1"); |
1983 | 176 | ::hilti::rt::debug::indent("spicy"sv); |
1984 | 176 | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1985 | 176 | return (*_t_self)._t_parse_PE__ExportOrdinalTable_3_stage2(_t_data, _t_cur, _t_trim, _t_lah); |
1986 | 176 | } |
1987 | | |
1988 | 3.32k | auto hlt_internal_pe_ImageFile::PE::HintName::_t_parse_PE__HintName_6_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>> { |
1989 | 3.32k | auto _t_self = HintName::_t_self(); |
1990 | 3.32k | ::hilti::rt::detail::checkStack(); |
1991 | 3.32k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:521:17-525:1"); |
1992 | 3.32k | ::hilti::rt::integer::safe<uint16_t> _t_v_hint; |
1993 | 3.32k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:522:11-522:16"); |
1994 | | |
1995 | | // Begin parsing production: Variable: hint_6 -> uint<16>; |
1996 | 3.32k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:522:11-522:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
1997 | 3.32k | ::hilti::rt::tuple::assign(std::tie(_t_v_hint, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
1998 | 3.32k | if ( _t_trim ) { |
1999 | 0 | (*_t_data).trim(_t_cur.begin()); |
2000 | 0 | } |
2001 | | |
2002 | | // End parsing production: Variable: hint_6 -> uint<16>; |
2003 | | |
2004 | 3.32k | ::hilti::rt::location("<no location>"); |
2005 | | |
2006 | | // Begin parsing production: Enclosure: name_12 -> Resolved_63; |
2007 | 3.32k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
2008 | 3.32k | hlt_internal_pe_ImageFile::PE::NullTerminatedString _t_parsed__anon_13; |
2009 | | |
2010 | | // Begin parsing production: Unit: PE__NullTerminatedString_12 -> s_12; |
2011 | 3.32k | _t_parsed__anon_13 = (hlt_internal_pe_ImageFile::PE::NullTerminatedString{}); |
2012 | 3.32k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah), _t_parsed__anon_13._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah)); |
2013 | | // End parsing production: Unit: PE__NullTerminatedString_12 -> s_12; |
2014 | | |
2015 | 3.32k | ::hilti::rt::detail::move_non_trivial(_t_parsed__anon_13)._t_convert(); |
2016 | | // End parsing production: Enclosure: name_12 -> Resolved_63; |
2017 | | |
2018 | 3.32k | ::hilti::rt::debug::dedent("spicy"sv); |
2019 | 3.32k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah)); |
2020 | 3.32k | } |
2021 | | |
2022 | 3.32k | auto hlt_internal_pe_ImageFile::PE::HintName::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>> { |
2023 | 3.32k | auto _t_self = HintName::_t_self(); |
2024 | 3.32k | ::hilti::rt::detail::checkStack(); |
2025 | 3.32k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:521:17-525:1"); |
2026 | 3.32k | ::hilti::rt::debug::indent("spicy"sv); |
2027 | 3.32k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2028 | 3.32k | return (*_t_self)._t_parse_PE__HintName_6_stage2(_t_data, _t_cur, _t_trim, _t_lah); |
2029 | 3.32k | } |
2030 | | |
2031 | 4.23k | inline void hlt_internal_pe_ImageFile::PE::ImageFile::_t_on_0x25_init() { |
2032 | 4.23k | auto _t_self = PE::ImageFile::_t_self(); |
2033 | 4.23k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_0x25_init(_t_self); |
2034 | 4.23k | } |
2035 | | |
2036 | 4.12k | inline void hlt_internal_pe_ImageFile::PE::ImageFile::_t_on_dosHeader() { |
2037 | 4.12k | auto _t_self = PE::ImageFile::_t_self(); |
2038 | 4.12k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_dosHeader(_t_self); |
2039 | 4.12k | } |
2040 | | |
2041 | 3.44k | inline void hlt_internal_pe_ImageFile::PE::ImageFile::_t_on_optHeader() { |
2042 | 3.44k | auto _t_self = PE::ImageFile::_t_self(); |
2043 | 3.44k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_optHeader(_t_self); |
2044 | 3.44k | } |
2045 | | |
2046 | 2.84k | inline void hlt_internal_pe_ImageFile::PE::ImageFile::_t_on_sectionData(const ::hilti::rt::Bytes& _t_dd) { |
2047 | 2.84k | auto _t_self = PE::ImageFile::_t_self(); |
2048 | 2.84k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_sectionData(_t_dd, _t_self); |
2049 | 2.84k | } |
2050 | | |
2051 | 3.24k | inline void hlt_internal_pe_ImageFile::PE::ImageFile::_t_on_sectionHeaders() { |
2052 | 3.24k | auto _t_self = PE::ImageFile::_t_self(); |
2053 | 3.24k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_sectionHeaders(_t_self); |
2054 | 3.24k | } |
2055 | | |
2056 | 4.23k | auto hlt_internal_pe_ImageFile::PE::ImageFile::_t_parse_PE__ImageFile_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::stream::SafeConstIterator& _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2057 | 4.23k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_9; |
2058 | 4.23k | auto _t_self = ImageFile::_t_self(); |
2059 | 4.23k | ::hilti::rt::detail::checkStack(); |
2060 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2061 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:222:19-242:1"); |
2062 | | |
2063 | | // Begin parsing production: Unit: PE__DOS_Header -> magic bytesInLastPage pagesInFile relocations paragraphsInHeader minExtraParagraphs maxExtraParagraphs initialRelativeSS initialSP checksum initialIP initialRelativeCS relocationTableAddress overlayNumber reserved1 oemID oemInfo reserved2 peHeaderOffset; |
2064 | 4.23k | (*_t_self).dosHeader.valueOrInit() = (hlt_internal_pe_ImageFile::PE::DOS_Header{}); |
2065 | 4.23k | _t_cur = (*_t_self).dosHeader.value()._t_parse_stage1(_t_data, _t_cur, _t_trim); |
2066 | | // End parsing production: Unit: PE__DOS_Header -> magic bytesInLastPage pagesInFile relocations paragraphsInHeader minExtraParagraphs maxExtraParagraphs initialRelativeSS initialSP checksum initialIP initialRelativeCS relocationTableAddress overlayNumber reserved1 oemID oemInfo reserved2 peHeaderOffset; |
2067 | | |
2068 | 4.23k | (*_t_self)._t_error = _t_error; |
2069 | 4.23k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2070 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:85:5-85:31"); |
2071 | 4.23k | (*_t_self)._t_on_dosHeader(); |
2072 | 4.23k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2073 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2074 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2075 | 0 | } |
2076 | | |
2077 | 4.23k | _t_error = (*_t_self)._t_error; |
2078 | 4.23k | (*_t_self)._t_begin = _t_begin; |
2079 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:86:21-86:25"); |
2080 | | |
2081 | | // Begin parsing production: Variable: dosStub -> bytes; |
2082 | 4.23k | ::hilti::rt::integer::safe<uint64_t> _t_size = (*_t_self).dosStubSize; |
2083 | 4.23k | ::spicy::rt::detail::extractBytes(_t_data, _t_cur, _t_size, ::hilti::rt::Bool{false}, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:86:5-86:49"sv, (_t_lhs_9=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
2084 | 4.23k | _t_cur = _t_cur.advance(::hilti::rt::detail::move_non_trivial(_t_size)); |
2085 | 4.23k | if ( _t_trim ) { |
2086 | 0 | (*_t_data).trim(_t_cur.begin()); |
2087 | 0 | } |
2088 | | |
2089 | | // End parsing production: Variable: dosStub -> bytes; |
2090 | | |
2091 | 4.23k | (*_t_self)._t_error = _t_error; |
2092 | 4.23k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2093 | 4.23k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2094 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2095 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2096 | 0 | } |
2097 | | |
2098 | 4.23k | _t_error = (*_t_self)._t_error; |
2099 | 4.23k | (*_t_self)._t_begin = _t_begin; |
2100 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:244:18-253:1"); |
2101 | | |
2102 | | // Begin parsing production: Unit: PE__PE_Header -> magic_2 machine numberOfSections timeDateStamp pointerToSymbolTable numberOfSymbols sizeOfOptionalHeader characteristics; |
2103 | 4.23k | (*_t_self).peHeader.valueOrInit() = (hlt_internal_pe_ImageFile::PE::PE_Header{}); |
2104 | 4.23k | _t_cur = (*_t_self).peHeader.value()._t_parse_stage1(_t_data, _t_cur, _t_trim); |
2105 | | // End parsing production: Unit: PE__PE_Header -> magic_2 machine numberOfSections timeDateStamp pointerToSymbolTable numberOfSymbols sizeOfOptionalHeader characteristics; |
2106 | | |
2107 | 4.23k | hlt_internal_pe_ImageFile::PE::PE_Header _t_dd = (*_t_self).peHeader.value(); |
2108 | 4.23k | ::hilti::rt::Result<::hilti::rt::Nothing> _t_requires = (((_t_dd.sizeOfOptionalHeader.value() > ::hilti::rt::integer::safe<std::uint16_t>{0U}) && (::hilti::rt::integer::safe<uint64_t>{_t_dd.numberOfSections.value()} <= hlt_internal_pe_ImageFile::PE::MaxSections)) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error{"&requires failed: ($$.sizeOfOptionalHeader > 0 && $$.numberOfSections <= MaxSections)"}); |
2109 | 4.23k | if ( ! (::hilti::rt::Bool{static_cast<bool>(_t_requires)}) ) { |
2110 | 15 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:88:25-89:70"); |
2111 | 15 | throw ::spicy::rt::ParseError{::hilti::rt::detail::move_non_trivial(_t_requires).errorOrThrow(), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:88:25-89:70"}; |
2112 | 15 | } |
2113 | | |
2114 | 4.22k | (*_t_self)._t_error = _t_error; |
2115 | 4.22k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2116 | 4.22k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2117 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2118 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2119 | 0 | } |
2120 | | |
2121 | 4.22k | _t_error = (*_t_self)._t_error; |
2122 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2123 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:255:23-308:1"); |
2124 | | |
2125 | | // Begin parsing production: Unit: PE__OptionalHeader -> magic_3 majorLinkerVersion minorLinkerVersion sizeOfCode sizeOfInitializedData sizeOfUninitializedData addressOfEntryPoint baseOfCode switch sectionAlignment fileAlignment majorOperatingSystemVersion minorOperatingSystemVersion majorImageVersion minorImageVersion majorSubsystemVersion minorSubsystemVersion win32VersionValue sizeOfImage sizeOfHeaders checkSum subsystem dllCharacteristics switch_2 loaderFlags numberOfRvaAndSizes dataDirectories; |
2126 | 4.22k | (*_t_self).optHeader.valueOrInit() = (hlt_internal_pe_ImageFile::PE::OptionalHeader{}); |
2127 | 4.22k | _t_cur = (*_t_self).optHeader.value()._t_parse_stage1(_t_data, _t_cur, _t_trim); |
2128 | | // End parsing production: Unit: PE__OptionalHeader -> magic_3 majorLinkerVersion minorLinkerVersion sizeOfCode sizeOfInitializedData sizeOfUninitializedData addressOfEntryPoint baseOfCode switch sectionAlignment fileAlignment majorOperatingSystemVersion minorOperatingSystemVersion majorImageVersion minorImageVersion majorSubsystemVersion minorSubsystemVersion win32VersionValue sizeOfImage sizeOfHeaders checkSum subsystem dllCharacteristics switch_2 loaderFlags numberOfRvaAndSizes dataDirectories; |
2129 | | |
2130 | 4.22k | (*_t_self)._t_error = _t_error; |
2131 | 4.22k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2132 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:90:5-90:35"); |
2133 | 4.22k | (*_t_self)._t_on_optHeader(); |
2134 | 4.22k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2135 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2136 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2137 | 0 | } |
2138 | | |
2139 | 4.22k | _t_error = (*_t_self)._t_error; |
2140 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2141 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:91:5-91:66"); |
2142 | | |
2143 | | // Begin parsing production: Counter: sectionHeaders -> counter(self.peHeader.numberOfSections): Resolved_7; |
2144 | 4.22k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse_sectionHeaders_stage1(_t_data, _t_begin, _t_cur, _t_trim, _t_error, (*_t_self).sectionHeaders.valueOrInit())); |
2145 | | // End parsing production: Counter: sectionHeaders -> counter(self.peHeader.numberOfSections): Resolved_7; |
2146 | | |
2147 | 4.22k | (*_t_self)._t_error = _t_error; |
2148 | 4.22k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2149 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:91:5-91:66"); |
2150 | 4.22k | (*_t_self)._t_on_sectionHeaders(); |
2151 | 4.22k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2152 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2153 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2154 | 0 | } |
2155 | | |
2156 | 4.22k | _t_error = (*_t_self)._t_error; |
2157 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2158 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:92:21-92:25"); |
2159 | 4.22k | if ( (*_t_self).fileSize <= hlt_internal_pe_ImageFile::PE::MaxFileSize ) { |
2160 | 3.09k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_10; |
2161 | | // Begin parsing production: Variable: sectionData -> bytes; |
2162 | 3.09k | ::hilti::rt::integer::safe<uint64_t> _t_size_ = (*_t_self).headerPadSize + (*_t_self).sectionDataSize; |
2163 | 3.09k | (*_t_self).sectionData.valueOrInit() = ::spicy::rt::detail::extractBytes(_t_data, _t_cur, _t_size_, ::hilti::rt::Bool{false}, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:92:5-93:60"sv, (_t_lhs_10=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
2164 | 3.09k | _t_cur = _t_cur.advance(::hilti::rt::detail::move_non_trivial(_t_size_)); |
2165 | 3.09k | if ( _t_trim ) { |
2166 | 0 | (*_t_data).trim(_t_cur.begin()); |
2167 | 0 | } |
2168 | | |
2169 | | // End parsing production: Variable: sectionData -> bytes; |
2170 | | |
2171 | 3.09k | (*_t_self)._t_error = _t_error; |
2172 | 3.09k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2173 | 3.09k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:92:5-93:60"); |
2174 | 3.09k | (*_t_self)._t_on_sectionData((*_t_self).sectionData.value()); |
2175 | 3.09k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2176 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2177 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2178 | 0 | } |
2179 | | |
2180 | 3.09k | _t_error = (*_t_self)._t_error; |
2181 | 3.09k | } |
2182 | | |
2183 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2184 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:332:29-367:1"); |
2185 | 4.22k | if ( ::hilti::rt::tuple::get<0>((*_t_self).exportDirInfo).hasValue() ) { |
2186 | 1.17k | ::hilti::rt::stream::SafeConstIterator _t_parse_at = checkpointOffset((*_t_self).peStart + ::hilti::rt::tuple::get<0>((*_t_self).exportDirInfo).value(), (*_t_self).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
2187 | 1.17k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2188 | 1.17k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin = _t_parse_at; |
2189 | 1.17k | ::hilti::rt::stream::View _t_parse_cur = _t_cur.advance(_t_parse_at); |
2190 | | |
2191 | | // Begin parsing production: Unit: PE__ExportDirectoryTable -> flags timeDateStamp_2 majorVersion minorVersion dllNameRVA ordinalBase addressTableCount namePtrTableCount addressTableRVA namePtrTableRVA ordinalTableRVA dllName Resolved_10 Resolved_12 Resolved_14 (field 'exportTable', id n/a, parser, args: (self)); |
2192 | 1.17k | (*_t_self).exportTable.valueOrInit() = (hlt_internal_pe_ImageFile::PE::ExportDirectoryTable{::hilti::rt::struct_::tag::Parameters(), _t_self}); |
2193 | 1.17k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur, _t_parse_lah, _t_error), (*(*_t_self).exportTable.value())._t_parse_stage1(_t_data, _t_parse_cur, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah), _t_error)); |
2194 | | // End parsing production: Unit: PE__ExportDirectoryTable -> flags timeDateStamp_2 majorVersion minorVersion dllNameRVA ordinalBase addressTableCount namePtrTableCount addressTableRVA namePtrTableRVA ordinalTableRVA dllName Resolved_10 Resolved_12 Resolved_14 (field 'exportTable', id n/a, parser, args: (self)); |
2195 | | |
2196 | 1.17k | (*_t_self)._t_begin = _t_begin; |
2197 | 1.17k | (*_t_self)._t_error = _t_error; |
2198 | 1.17k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2199 | 1.17k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2200 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2201 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2202 | 0 | } |
2203 | | |
2204 | 1.17k | _t_error = (*_t_self)._t_error; |
2205 | 1.17k | } |
2206 | | |
2207 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2208 | 4.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:419:29-422:1"); |
2209 | 4.22k | if ( ::hilti::rt::tuple::get<0>((*_t_self).importDirInfo).hasValue() ) { |
2210 | 1.20k | ::hilti::rt::stream::SafeConstIterator _t_parse_at_ = checkpointOffset((*_t_self).peStart + ::hilti::rt::tuple::get<0>((*_t_self).importDirInfo).value(), (*_t_self).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
2211 | 1.20k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah_ = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2212 | 1.20k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin_ = _t_parse_at_; |
2213 | 1.20k | ::hilti::rt::stream::View _t_parse_cur_ = _t_cur.advance(_t_parse_at_); |
2214 | | |
2215 | | // Begin parsing production: Unit: PE__ImportDirectoryTable -> entries_5 (field 'importTable', id n/a, parser, args: (self)); |
2216 | 1.20k | (*_t_self).importTable.valueOrInit() = (hlt_internal_pe_ImageFile::PE::ImportDirectoryTable{::hilti::rt::struct_::tag::Parameters(), _t_self}); |
2217 | 1.20k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur_, _t_parse_lah_, _t_error), (*(*_t_self).importTable.value())._t_parse_stage1(_t_data, _t_parse_cur_, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah_), _t_error)); |
2218 | | // End parsing production: Unit: PE__ImportDirectoryTable -> entries_5 (field 'importTable', id n/a, parser, args: (self)); |
2219 | | |
2220 | 1.20k | (*_t_self)._t_begin = _t_begin; |
2221 | 1.20k | (*_t_self)._t_error = _t_error; |
2222 | 1.20k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2223 | 1.20k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2224 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2225 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2226 | 0 | } |
2227 | | |
2228 | 1.20k | _t_error = (*_t_self)._t_error; |
2229 | 1.20k | } |
2230 | | |
2231 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2232 | 4.22k | (*_t_self)._t_begin = _t_begin; |
2233 | 4.22k | (*_t_self)._t_error = _t_error; |
2234 | 4.22k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2235 | 4.22k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2236 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2237 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2238 | 0 | } |
2239 | | |
2240 | 4.22k | _t_error = (*_t_self)._t_error; |
2241 | 4.22k | ::hilti::rt::debug::dedent("spicy"sv); |
2242 | 4.22k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2243 | 4.23k | } |
2244 | | |
2245 | 3.44k | auto hlt_internal_pe_ImageFile::PE::ImageFile::_t_parse_sectionHeaders_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::SectionHeader>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2246 | 3.44k | auto _t_self = ImageFile::_t_self(); |
2247 | 3.44k | ::hilti::rt::detail::checkStack(); |
2248 | 3.44k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:91:5-91:66"); |
2249 | 3.44k | ::hilti::rt::integer::safe<uint64_t> _t_repeat = ::hilti::rt::integer::safe<uint64_t>{(*_t_self).peHeader.value().numberOfSections.value()}; |
2250 | 3.44k | _t_dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _t_repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _t_repeat)); |
2251 | 60.9k | for ( ::hilti::rt::integer::safe<uint64_t> _t_i = ::hilti::rt::detail::move_non_trivial(_t_repeat); ::hilti::rt::Bool{static_cast<bool>(_t_i)}; ) { |
2252 | 57.5k | _t_i--; |
2253 | 57.5k | hlt_internal_pe_ImageFile::PE::SectionHeader _t_elem; |
2254 | 57.5k | (*_t_self)._t_begin = _t_begin; |
2255 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:315:22-326:1"); |
2256 | | |
2257 | | // Begin parsing production: Unit: PE__SectionHeader -> name virtualSize virtualAddress_2 sizeOfRawData pointerToRawData pointerToRelocations pointerToLinenumbers numberOfRelocations numberOfLinenumbers characteristics_2 (container 'sectionHeaders'); |
2258 | 57.5k | _t_elem = (hlt_internal_pe_ImageFile::PE::SectionHeader{}); |
2259 | 57.5k | _t_cur = _t_elem._t_parse_stage1(_t_data, _t_cur, _t_trim); |
2260 | | // End parsing production: Unit: PE__SectionHeader -> name virtualSize virtualAddress_2 sizeOfRawData pointerToRawData pointerToRelocations pointerToLinenumbers numberOfRelocations numberOfLinenumbers characteristics_2 (container 'sectionHeaders'); |
2261 | | |
2262 | 57.5k | (*_t_self)._t_error = _t_error; |
2263 | 57.5k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2264 | 57.5k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2265 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2266 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2267 | 0 | } |
2268 | | |
2269 | 57.5k | _t_error = (*_t_self)._t_error; |
2270 | 57.5k | _t_dst.emplace_back(::hilti::rt::detail::move_non_trivial(_t_elem)); |
2271 | 57.5k | (*_t_self)._t_begin = _t_begin; |
2272 | 57.5k | } |
2273 | | |
2274 | 3.44k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
2275 | 3.44k | } |
2276 | | |
2277 | 4.23k | auto hlt_internal_pe_ImageFile::PE::ImageFile::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::stream::SafeConstIterator& _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2278 | 4.23k | auto _t_self = ImageFile::_t_self(); |
2279 | 4.23k | ::hilti::rt::detail::checkStack(); |
2280 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2281 | 4.23k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _t_result; |
2282 | 4.23k | try { |
2283 | 4.23k | ::hilti::rt::debug::indent("spicy"sv); |
2284 | 4.23k | ::hilti::rt::stream::SafeConstIterator _t_begin = _t_cur.begin(); |
2285 | 4.23k | (*_t_self)._t_begin = _t_begin; |
2286 | 4.23k | (*_t_self)._t_error = _t_error; |
2287 | 4.23k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2288 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2289 | 4.23k | (*_t_self)._t_on_0x25_init(); |
2290 | 4.23k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2291 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2292 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2293 | 0 | } |
2294 | | |
2295 | 4.23k | _t_error = (*_t_self)._t_error; |
2296 | 4.23k | _t_result = (*_t_self)._t_parse_PE__ImageFile_stage2(_t_data, _t_begin, _t_cur, ::hilti::rt::Bool{false}, _t_lah, _t_lahe, _t_error); |
2297 | 4.23k | } |
2298 | 4.23k | catch ( const ::std::exception& _t_except ) { |
2299 | 1.32k | (*_t_self)._t_begin = _t_begin; |
2300 | 1.32k | (*_t_self)._t_error = _t_error; |
2301 | 1.32k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2302 | 1.32k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2303 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2304 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2305 | 0 | } |
2306 | | |
2307 | 1.32k | _t_error = (*_t_self)._t_error; |
2308 | 1.32k | throw; |
2309 | 1.32k | } |
2310 | | |
2311 | 1.01k | (*_t_self)._t_error = _t_error; |
2312 | 1.01k | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2313 | 1.01k | if ( (*_t_self)._t_position_update.hasValue() ) { |
2314 | 0 | _t_cur = _t_cur.advance((*_t_self)._t_position_update.value()); |
2315 | 0 | (*_t_self)._t_position_update = ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>{}; |
2316 | 0 | } |
2317 | | |
2318 | 1.01k | return _t_result; |
2319 | 4.23k | } |
2320 | | |
2321 | 4.23k | auto hlt_internal_pe_ImageFile::PE::ImageFile::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2322 | 4.23k | ::hilti::rt::detail::checkStack(); |
2323 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2324 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2325 | 4.23k | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_unit = ::hilti::rt::reference::make_value<hlt_internal_pe_ImageFile::PE::ImageFile>((hlt_internal_pe_ImageFile::PE::ImageFile{})); |
2326 | 4.23k | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2327 | 4.23k | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2328 | 4.23k | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2329 | 4.23k | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>{}; |
2330 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2331 | | |
2332 | | // Begin parsing production: Unit: PE__ImageFile -> Resolved_3 dosStub Resolved_4 Resolved_5 sectionHeaders sectionData Resolved_8 Resolved_15; |
2333 | 4.23k | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*::hilti::rt::detail::move_non_trivial(_t_unit))._t_parse_stage1(_t_data, _t_ncur.begin(), _t_ncur, ::hilti::rt::detail::move_non_trivial(_t_lahead), _t_lahead_end, _t_error)); |
2334 | | // End parsing production: Unit: PE__ImageFile -> Resolved_3 dosStub Resolved_4 Resolved_5 sectionHeaders sectionData Resolved_8 Resolved_15; |
2335 | | |
2336 | 4.23k | if ( _t_error.hasValue() ) { |
2337 | 0 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())}; |
2338 | 0 | } |
2339 | | |
2340 | 4.23k | return _t_ncur; |
2341 | 4.23k | } |
2342 | | |
2343 | 0 | auto hlt_internal_pe_ImageFile::PE::ImageFile::parse2(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2344 | 0 | ::hilti::rt::detail::checkStack(); |
2345 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2346 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2347 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2348 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2349 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2350 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>{}; |
2351 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2352 | | |
2353 | | // Begin parsing production: Unit: PE__ImageFile -> Resolved_3 dosStub Resolved_4 Resolved_5 sectionHeaders sectionData Resolved_8 Resolved_15; |
2354 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur.begin(), _t_ncur, ::hilti::rt::detail::move_non_trivial(_t_lahead), _t_lahead_end, _t_error)); |
2355 | | // End parsing production: Unit: PE__ImageFile -> Resolved_3 dosStub Resolved_4 Resolved_5 sectionHeaders sectionData Resolved_8 Resolved_15; |
2356 | |
|
2357 | 0 | (*_t_unit)._t_begin = _t_ncur.begin(); |
2358 | 0 | if ( _t_error.hasValue() ) { |
2359 | 0 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())}; |
2360 | 0 | } |
2361 | | |
2362 | 0 | return _t_ncur; |
2363 | 0 | } |
2364 | | |
2365 | 0 | auto hlt_internal_pe_ImageFile::PE::ImageFile::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2366 | 0 | ::hilti::rt::detail::checkStack(); |
2367 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2368 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2369 | 0 | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_unit = ::hilti::rt::reference::make_value<hlt_internal_pe_ImageFile::PE::ImageFile>((hlt_internal_pe_ImageFile::PE::ImageFile{})); |
2370 | 0 | ::spicy::rt::ParsedUnit::initialize((*_t_gunit), _t_unit, &type_info::_t_ti_value_ref_PE__ImageFile__value_refx2anamex2aPE__ImageFilex2bx2b); |
2371 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2372 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2373 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2374 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>{}; |
2375 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:77:25-220:1"); |
2376 | | |
2377 | | // Begin parsing production: Unit: PE__ImageFile -> Resolved_3 dosStub Resolved_4 Resolved_5 sectionHeaders sectionData Resolved_8 Resolved_15; |
2378 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*::hilti::rt::detail::move_non_trivial(_t_unit))._t_parse_stage1(_t_data, _t_ncur.begin(), _t_ncur, ::hilti::rt::detail::move_non_trivial(_t_lahead), _t_lahead_end, _t_error)); |
2379 | | // End parsing production: Unit: PE__ImageFile -> Resolved_3 dosStub Resolved_4 Resolved_5 sectionHeaders sectionData Resolved_8 Resolved_15; |
2380 | |
|
2381 | 0 | if ( _t_error.hasValue() ) { |
2382 | 0 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())}; |
2383 | 0 | } |
2384 | | |
2385 | 0 | return _t_ncur; |
2386 | 0 | } |
2387 | | |
2388 | 1.19k | auto hlt_internal_pe_ImageFile::PE::ImportDirectoryTable::_t_parse_PE__ImportDirectoryTable_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2389 | 1.19k | auto _t_self = ImportDirectoryTable::_t_self(); |
2390 | 1.19k | ::hilti::rt::detail::checkStack(); |
2391 | 1.19k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:419:29-422:1"); |
2392 | 1.19k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:420:5-421:64"); |
2393 | | |
2394 | | // Begin parsing production: ForEach: entries_13 -> foreach: Resolved_45; |
2395 | 1.19k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse_entries_13_stage1(_t_data, _t_cur, _t_trim, _t_error, (*_t_self).entries.valueOrInit())); |
2396 | | // End parsing production: ForEach: entries_13 -> foreach: Resolved_45; |
2397 | | |
2398 | 1.19k | ::hilti::rt::debug::dedent("spicy"sv); |
2399 | 1.19k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_error)); |
2400 | 1.19k | } |
2401 | | |
2402 | 1.19k | auto hlt_internal_pe_ImageFile::PE::ImportDirectoryTable::_t_parse_entries_13_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2403 | 1.19k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_11; |
2404 | 1.19k | auto _t_self = ImportDirectoryTable::_t_self(); |
2405 | 1.19k | ::hilti::rt::detail::checkStack(); |
2406 | 1.19k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:420:5-421:64"); |
2407 | 85.2k | while ( ! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_11=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{})))) ) { |
2408 | 84.2k | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_12;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_13; |
2409 | 84.2k | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
2410 | 84.2k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>> _t_elem; |
2411 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:424:34-443:1"); |
2412 | | |
2413 | | // Begin parsing production: Unit: PE__ImportDirectoryTableEntry_2 -> importLookupTableRVA_2 timeDateStamp_6 forwarderChain_2 dllNameRVA_4 importAddressTableRVA_2 dllName_4 Resolved_47 (field '_anon_9', id n/a, parser, args: (f)) (container 'entries'); |
2414 | 84.2k | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>>((hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_12=(_t_self->_t_p_f.derefAsValue()).asSharedPtr())})); |
2415 | 84.2k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_error)); |
2416 | | // End parsing production: Unit: PE__ImportDirectoryTableEntry_2 -> importLookupTableRVA_2 timeDateStamp_6 forwarderChain_2 dllNameRVA_4 importAddressTableRVA_2 dllName_4 Resolved_47 (field '_anon_9', id n/a, parser, args: (f)) (container 'entries'); |
2417 | | |
2418 | 84.2k | ::hilti::rt::Bool _t_stop = ::hilti::rt::Bool{false}; |
2419 | 84.2k | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry> _t_dd = _t_elem.value(); |
2420 | 84.2k | _t_stop = (_t_stop) || (! (((! (isNull(_t_dd))) && ((*_t_self).entries.value().size() < hlt_internal_pe_ImageFile::PE::MaxImportDLLs)))); |
2421 | 84.2k | if ( ! (_t_stop) ) { |
2422 | 83.1k | } |
2423 | | |
2424 | 84.2k | if ( ! (_t_stop) ) { |
2425 | 83.1k | _t_dst.emplace_back(::hilti::rt::detail::move_non_trivial(_t_elem).value()); |
2426 | 83.1k | } |
2427 | | |
2428 | 84.2k | if ( _t_stop ) { |
2429 | 137 | goto _t_done_172283; |
2430 | 137 | } |
2431 | | |
2432 | 84.1k | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_13=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))))) ) { |
2433 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:420:5-421:64"); |
2434 | 0 | throw ::spicy::rt::ParseError{"loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:420:5-421:64"}; |
2435 | 0 | } |
2436 | 84.1k | } |
2437 | | |
2438 | 1.06k | _t_done_172283: {} |
2439 | | |
2440 | 137 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
2441 | 1.19k | } |
2442 | | |
2443 | 1.19k | auto hlt_internal_pe_ImageFile::PE::ImportDirectoryTable::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2444 | 1.19k | auto _t_self = ImportDirectoryTable::_t_self(); |
2445 | 1.19k | ::hilti::rt::detail::checkStack(); |
2446 | 1.19k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:419:29-422:1"); |
2447 | 1.19k | ::hilti::rt::debug::indent("spicy"sv); |
2448 | 1.19k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2449 | 1.19k | return (*_t_self)._t_parse_PE__ImportDirectoryTable_2_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_error); |
2450 | 1.19k | } |
2451 | | |
2452 | 83.9k | inline void hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry::_t_on_dllNameRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
2453 | 83.9k | auto _t_self = PE::ImportDirectoryTableEntry::_t_self(); |
2454 | 83.9k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImportDirectoryTableEntry__t_on_dllNameRVA(_t_dd, _t_self); |
2455 | 83.9k | } |
2456 | | |
2457 | 84.1k | inline void hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry::_t_on_importLookupTableRVA(const ::hilti::rt::integer::safe<uint32_t>& _t_dd) { |
2458 | 84.1k | auto _t_self = PE::ImportDirectoryTableEntry::_t_self(); |
2459 | 84.1k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImportDirectoryTableEntry__t_on_importLookupTableRVA(_t_dd, _t_self); |
2460 | 84.1k | } |
2461 | | |
2462 | 84.2k | auto hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry::_t_parse_PE__ImportDirectoryTableEntry_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2463 | 84.2k | auto _t_self = ImportDirectoryTableEntry::_t_self(); |
2464 | 84.2k | ::hilti::rt::detail::checkStack(); |
2465 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:424:34-443:1"); |
2466 | 84.2k | ::hilti::rt::integer::safe<uint32_t> _t_v_importLookupTableRVA; |
2467 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:425:28-425:33"); |
2468 | | |
2469 | | // Begin parsing production: Variable: importLookupTableRVA_3 -> uint<32>; |
2470 | 84.2k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:425:28-425:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2471 | 84.2k | ::hilti::rt::tuple::assign(std::tie(_t_v_importLookupTableRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2472 | 84.2k | if ( _t_trim ) { |
2473 | 0 | (*_t_data).trim(_t_cur.begin()); |
2474 | 0 | } |
2475 | | |
2476 | | // End parsing production: Variable: importLookupTableRVA_3 -> uint<32>; |
2477 | | |
2478 | 84.2k | (*_t_self).importLookupTableRVA.valueOrInit() = _t_v_importLookupTableRVA; |
2479 | 84.2k | (*_t_self)._t_error = _t_error; |
2480 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:425:5-425:34"); |
2481 | 84.2k | (*_t_self)._t_on_importLookupTableRVA(::hilti::rt::detail::move_non_trivial(_t_v_importLookupTableRVA)); |
2482 | 84.2k | _t_error = (*_t_self)._t_error; |
2483 | 84.2k | ::hilti::rt::integer::safe<uint32_t> _t_v_timeDateStamp; |
2484 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:426:28-426:33"); |
2485 | | |
2486 | | // Begin parsing production: Variable: timeDateStamp_7 -> uint<32>; |
2487 | 84.2k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:426:28-426:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2488 | 84.2k | ::hilti::rt::tuple::assign(std::tie(_t_v_timeDateStamp, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2489 | 84.2k | if ( _t_trim ) { |
2490 | 0 | (*_t_data).trim(_t_cur.begin()); |
2491 | 0 | } |
2492 | | |
2493 | | // End parsing production: Variable: timeDateStamp_7 -> uint<32>; |
2494 | | |
2495 | 84.2k | (*_t_self).timeDateStamp.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_timeDateStamp); |
2496 | 84.2k | ::hilti::rt::integer::safe<uint32_t> _t_v_forwarderChain; |
2497 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:427:28-427:33"); |
2498 | | |
2499 | | // Begin parsing production: Variable: forwarderChain_3 -> uint<32>; |
2500 | 84.2k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:427:28-427:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2501 | 84.2k | ::hilti::rt::tuple::assign(std::tie(_t_v_forwarderChain, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2502 | 84.2k | if ( _t_trim ) { |
2503 | 0 | (*_t_data).trim(_t_cur.begin()); |
2504 | 0 | } |
2505 | | |
2506 | | // End parsing production: Variable: forwarderChain_3 -> uint<32>; |
2507 | | |
2508 | 84.2k | (*_t_self).forwarderChain.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_forwarderChain); |
2509 | 84.2k | ::hilti::rt::integer::safe<uint32_t> _t_v_dllNameRVA; |
2510 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:428:28-428:33"); |
2511 | | |
2512 | | // Begin parsing production: Variable: dllNameRVA_5 -> uint<32>; |
2513 | 84.2k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:428:28-428:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2514 | 84.2k | ::hilti::rt::tuple::assign(std::tie(_t_v_dllNameRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2515 | 84.2k | if ( _t_trim ) { |
2516 | 0 | (*_t_data).trim(_t_cur.begin()); |
2517 | 0 | } |
2518 | | |
2519 | | // End parsing production: Variable: dllNameRVA_5 -> uint<32>; |
2520 | | |
2521 | 84.2k | (*_t_self).dllNameRVA.valueOrInit() = _t_v_dllNameRVA; |
2522 | 84.2k | (*_t_self)._t_error = _t_error; |
2523 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:428:5-428:34"); |
2524 | 84.2k | (*_t_self)._t_on_dllNameRVA(::hilti::rt::detail::move_non_trivial(_t_v_dllNameRVA)); |
2525 | 84.2k | _t_error = (*_t_self)._t_error; |
2526 | 84.2k | ::hilti::rt::integer::safe<uint32_t> _t_v_importAddressTableRVA; |
2527 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:429:28-429:33"); |
2528 | | |
2529 | | // Begin parsing production: Variable: importAddressTableRVA_3 -> uint<32>; |
2530 | 84.2k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:429:28-429:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2531 | 84.2k | ::hilti::rt::tuple::assign(std::tie(_t_v_importAddressTableRVA, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2532 | 84.2k | if ( _t_trim ) { |
2533 | 0 | (*_t_data).trim(_t_cur.begin()); |
2534 | 0 | } |
2535 | | |
2536 | | // End parsing production: Variable: importAddressTableRVA_3 -> uint<32>; |
2537 | | |
2538 | 84.2k | (*_t_self).importAddressTableRVA.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_importAddressTableRVA); |
2539 | 84.2k | ::hilti::rt::location("<no location>"); |
2540 | 84.2k | if ( (*_t_self).dllNameOffset.hasValue() ) { |
2541 | 2.82k | ::hilti::rt::stream::SafeConstIterator _t_parse_at = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).dllNameOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
2542 | 2.82k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2543 | 2.82k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin = _t_parse_at; |
2544 | 2.82k | ::hilti::rt::stream::View _t_parse_cur = _t_cur.advance(_t_parse_at); |
2545 | | |
2546 | | // Begin parsing production: Enclosure: dllName_5 -> Resolved_51; |
2547 | 2.82k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
2548 | 2.82k | hlt_internal_pe_ImageFile::PE::NullTerminatedString _t_parsed__anon_10; |
2549 | | |
2550 | | // Begin parsing production: Unit: PE__NullTerminatedString_9 -> s_9; |
2551 | 2.82k | _t_parsed__anon_10 = (hlt_internal_pe_ImageFile::PE::NullTerminatedString{}); |
2552 | 2.82k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur, _t_parse_lah), _t_parsed__anon_10._t_parse_stage1(_t_data, _t_parse_cur, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah))); |
2553 | | // End parsing production: Unit: PE__NullTerminatedString_9 -> s_9; |
2554 | | |
2555 | 2.82k | ::hilti::rt::detail::move_non_trivial(_t_parsed__anon_10)._t_convert(); |
2556 | | // End parsing production: Enclosure: dllName_5 -> Resolved_51; |
2557 | 2.82k | } |
2558 | | |
2559 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:468:26-471:1"); |
2560 | 84.2k | if ( (*_t_self).iltOffset.hasValue() ) { |
2561 | 5.49k | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_14; |
2562 | 5.49k | ::hilti::rt::stream::SafeConstIterator _t_parse_at_ = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).iltOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
2563 | 5.49k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah_ = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2564 | 5.49k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin_ = _t_parse_at_; |
2565 | 5.49k | ::hilti::rt::stream::View _t_parse_cur_ = _t_cur.advance(_t_parse_at_); |
2566 | | |
2567 | | // Begin parsing production: Unit: PE__ImportLookupTable_3 -> entries_14 (field 'importLookupTable', id n/a, parser, args: (f)); |
2568 | 5.49k | (*_t_self).importLookupTable.valueOrInit() = (hlt_internal_pe_ImageFile::PE::ImportLookupTable{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_14=(_t_self->_t_p_f.derefAsValue()).asSharedPtr())}); |
2569 | 5.49k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur_, _t_parse_lah_, _t_error), (*(*_t_self).importLookupTable.value())._t_parse_stage1(_t_data, _t_parse_cur_, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah_), _t_error)); |
2570 | | // End parsing production: Unit: PE__ImportLookupTable_3 -> entries_14 (field 'importLookupTable', id n/a, parser, args: (f)); |
2571 | 5.49k | } |
2572 | | |
2573 | 84.2k | ::hilti::rt::debug::dedent("spicy"sv); |
2574 | 84.2k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
2575 | 84.2k | } |
2576 | | |
2577 | 84.2k | auto hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2578 | 84.2k | auto _t_self = ImportDirectoryTableEntry::_t_self(); |
2579 | 84.2k | ::hilti::rt::detail::checkStack(); |
2580 | 84.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:424:34-443:1"); |
2581 | 84.2k | ::hilti::rt::debug::indent("spicy"sv); |
2582 | 84.2k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2583 | 84.2k | return (*_t_self)._t_parse_PE__ImportDirectoryTableEntry_3_stage2(_t_data, _t_cur, _t_trim, _t_error); |
2584 | 84.2k | } |
2585 | | |
2586 | 5.39k | auto hlt_internal_pe_ImageFile::PE::ImportLookupTable::_t_parse_PE__ImportLookupTable_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2587 | 5.39k | auto _t_self = ImportLookupTable::_t_self(); |
2588 | 5.39k | ::hilti::rt::detail::checkStack(); |
2589 | 5.39k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:468:26-471:1"); |
2590 | 5.39k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:469:5-470:64"); |
2591 | | |
2592 | | // Begin parsing production: ForEach: entries_15 -> foreach: Resolved_56; |
2593 | 5.39k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse_entries_15_stage1(_t_data, _t_cur, _t_trim, _t_error, (*_t_self).entries.valueOrInit())); |
2594 | | // End parsing production: ForEach: entries_15 -> foreach: Resolved_56; |
2595 | | |
2596 | 5.39k | ::hilti::rt::debug::dedent("spicy"sv); |
2597 | 5.39k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_error)); |
2598 | 5.39k | } |
2599 | | |
2600 | 5.39k | auto hlt_internal_pe_ImageFile::PE::ImportLookupTable::_t_parse_entries_15_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2601 | 5.39k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_15; |
2602 | 5.39k | auto _t_self = ImportLookupTable::_t_self(); |
2603 | 5.39k | ::hilti::rt::detail::checkStack(); |
2604 | 5.39k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:469:5-470:64"); |
2605 | 5.81M | while ( ! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_15=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{})))) ) { |
2606 | 5.81M | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile> _t_lhs_16;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_17; |
2607 | 5.81M | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
2608 | 5.81M | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>> _t_elem; |
2609 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:473:31-516:1"); |
2610 | | |
2611 | | // Begin parsing production: Unit: PE__ImportLookupTableEntry_4 -> switch_8 <epsilon> Resolved_57 (field '_anon_11', id n/a, parser, args: (f)) (container 'entries'); |
2612 | 5.81M | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>>((hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry{::hilti::rt::struct_::tag::Parameters(), (_t_lhs_16=(_t_self->_t_p_f.derefAsValue()).asSharedPtr())})); |
2613 | 5.81M | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_error)); |
2614 | | // End parsing production: Unit: PE__ImportLookupTableEntry_4 -> switch_8 <epsilon> Resolved_57 (field '_anon_11', id n/a, parser, args: (f)) (container 'entries'); |
2615 | | |
2616 | 5.81M | ::hilti::rt::Bool _t_stop = ::hilti::rt::Bool{false}; |
2617 | 5.81M | ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry> _t_dd = _t_elem.value(); |
2618 | 5.81M | _t_stop = (_t_stop) || (! (((! (isNull(_t_dd))) && ((*_t_self).entries.value().size() < hlt_internal_pe_ImageFile::PE::MaxImportSyms)))); |
2619 | 5.81M | if ( ! (_t_stop) ) { |
2620 | 5.80M | } |
2621 | | |
2622 | 5.81M | if ( ! (_t_stop) ) { |
2623 | 5.80M | _t_dst.emplace_back(::hilti::rt::detail::move_non_trivial(_t_elem).value()); |
2624 | 5.80M | } |
2625 | | |
2626 | 5.81M | if ( _t_stop ) { |
2627 | 4.97k | goto _t_done_186534; |
2628 | 4.97k | } |
2629 | | |
2630 | 5.80M | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_17=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))))) ) { |
2631 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:469:5-470:64"); |
2632 | 0 | throw ::spicy::rt::ParseError{"loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:469:5-470:64"}; |
2633 | 0 | } |
2634 | 5.80M | } |
2635 | | |
2636 | 4.97k | _t_done_186534: {} |
2637 | | |
2638 | 4.97k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
2639 | 5.39k | } |
2640 | | |
2641 | 5.39k | auto hlt_internal_pe_ImageFile::PE::ImportLookupTable::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2642 | 5.39k | auto _t_self = ImportLookupTable::_t_self(); |
2643 | 5.39k | ::hilti::rt::detail::checkStack(); |
2644 | 5.39k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:468:26-471:1"); |
2645 | 5.39k | ::hilti::rt::debug::indent("spicy"sv); |
2646 | 5.39k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2647 | 5.39k | return (*_t_self)._t_parse_PE__ImportLookupTable_4_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_error); |
2648 | 5.39k | } |
2649 | | |
2650 | 5.81M | inline void hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry::_t_on__anon_12() { |
2651 | 5.81M | auto _t_self = PE::ImportLookupTableEntry::_t_self(); |
2652 | 5.81M | return hlt_internal_pe_ImageFile::PE::_t_hook_ImportLookupTableEntry__t_on__anon_12(_t_self); |
2653 | 5.81M | } |
2654 | | |
2655 | 5.50M | inline void hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry::_t_on_f32(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd) { |
2656 | 5.50M | auto _t_self = PE::ImportLookupTableEntry::_t_self(); |
2657 | 5.50M | return hlt_internal_pe_ImageFile::PE::_t_hook_ImportLookupTableEntry__t_on_f32(_t_dd, _t_self); |
2658 | 5.50M | } |
2659 | | |
2660 | 308k | inline void hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry::_t_on_f64(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd) { |
2661 | 308k | auto _t_self = PE::ImportLookupTableEntry::_t_self(); |
2662 | 308k | return hlt_internal_pe_ImageFile::PE::_t_hook_ImportLookupTableEntry__t_on_f64(_t_dd, _t_self); |
2663 | 308k | } |
2664 | | |
2665 | 5.81M | auto hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry::_t_parse_PE__ImportLookupTableEntry_5_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2666 | 5.81M | auto _t_self = ImportLookupTableEntry::_t_self(); |
2667 | 5.81M | ::hilti::rt::detail::checkStack(); |
2668 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:473:31-516:1"); |
2669 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:479:5-503:6"); |
2670 | | |
2671 | | // Begin parsing production: Switch: switch_9 -> [PE32] -> switch_9_case_1 | [PE32_Plus] -> switch_9_case_2; |
2672 | 5.81M | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse_switch_9_stage1(_t_data, _t_cur, _t_trim, _t_error)); |
2673 | | // End parsing production: Switch: switch_9 -> [PE32] -> switch_9_case_1 | [PE32_Plus] -> switch_9_case_2; |
2674 | | |
2675 | 5.81M | ::hilti::rt::location("<no location>"); |
2676 | | |
2677 | | // Begin parsing production: Epsilon: <epsilon> -> (); |
2678 | | // End parsing production: Epsilon: <epsilon> -> (); |
2679 | | |
2680 | 5.81M | (*_t_self)._t_error = _t_error; |
2681 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:505:5-509:9"); |
2682 | 5.81M | (*_t_self)._t_on__anon_12(); |
2683 | 5.81M | _t_error = (*_t_self)._t_error; |
2684 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:521:17-525:1"); |
2685 | 5.81M | if ( (*_t_self).hintNameOffset.hasValue() ) { |
2686 | 3.52k | ::hilti::rt::stream::SafeConstIterator _t_parse_at = checkpointOffset((*_t_self->_t_p_f.derefAsValue()).peStart + (*_t_self).hintNameOffset.value(), (*_t_self->_t_p_f.derefAsValue()).consumedOffsets, ::hilti::rt::integer::safe<std::uint64_t>{256U}); |
2687 | 3.52k | ::hilti::rt::integer::safe<int64_t> _t_parse_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2688 | 3.52k | ::hilti::rt::stream::SafeConstIterator _t_parse_begin = _t_parse_at; |
2689 | 3.52k | ::hilti::rt::stream::View _t_parse_cur = _t_cur.advance(_t_parse_at); |
2690 | | |
2691 | | // Begin parsing production: Unit: PE__HintName_5 -> hint_5 name_11; |
2692 | 3.52k | (*_t_self).hintName.valueOrInit() = (hlt_internal_pe_ImageFile::PE::HintName{}); |
2693 | 3.52k | ::hilti::rt::tuple::assign(std::tie(_t_parse_cur, _t_parse_lah), (*_t_self).hintName.value()._t_parse_stage1(_t_data, _t_parse_cur, ::hilti::rt::Bool{false}, ::hilti::rt::detail::move_non_trivial(_t_parse_lah))); |
2694 | | // End parsing production: Unit: PE__HintName_5 -> hint_5 name_11; |
2695 | 3.52k | } |
2696 | | |
2697 | 5.81M | ::hilti::rt::debug::dedent("spicy"sv); |
2698 | 5.81M | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
2699 | 5.81M | } |
2700 | | |
2701 | 5.81M | auto hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>& _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2702 | 5.81M | auto _t_self = ImportLookupTableEntry::_t_self(); |
2703 | 5.81M | ::hilti::rt::detail::checkStack(); |
2704 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:473:31-516:1"); |
2705 | 5.81M | ::hilti::rt::debug::indent("spicy"sv); |
2706 | 5.81M | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2707 | 5.81M | return (*_t_self)._t_parse_PE__ImportLookupTableEntry_5_stage2(_t_data, _t_cur, _t_trim, _t_error); |
2708 | 5.81M | } |
2709 | | |
2710 | 5.81M | auto hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry::_t_parse_switch_9_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2711 | 5.81M | auto _t_self = ImportLookupTableEntry::_t_self(); |
2712 | 5.81M | ::hilti::rt::detail::checkStack(); |
2713 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:479:5-503:6"); |
2714 | 5.81M | ::hilti::rt::debug::indent("spicy"sv); |
2715 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:479:5-503:6"); |
2716 | 5.81M | switch ( auto _t_x = (*_t_self->_t_p_f.derefAsValue()).peFileFormat; (_t_x).Ref() ) { |
2717 | 5.50M | case hlt_internal_pe_ImageFile::PE::PE32: { |
2718 | 5.50M | ::hilti::rt::Result<::hilti::rt::Tuple<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::stream::View>> _t_x_1; |
2719 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:480:9-490:9"); |
2720 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:480:9-490:9"); |
2721 | | |
2722 | | // Begin parsing production: Block: switch_9_case_1 -> f32_5; |
2723 | 5.50M | ::hilti::rt::debug::indent("spicy"sv); |
2724 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:480:27-485:9"); |
2725 | | |
2726 | | // Begin parsing production: Variable: f32_5 -> bitfield(32) { full: 0..31; importByName: 31; ordinal: 0..15; hintNameRVA: 0..30; }; |
2727 | 5.50M | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:480:27-485:9"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2728 | 5.50M | ::hilti::rt::tuple::assign(std::tie((*_t_self).f32.valueOrInit(), _t_cur), (_t_x_1 = ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}), ::hilti::rt::make_result(::hilti::rt::tuple::make(::hilti::rt::make_bitfield(&type_info::_t_ti_bitfieldx2a32x2b_x73_full__0__31x3e_importByName__31x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a32_full_0_31_importByName_31_31_ordinal_0_15_hintNameRVA_0_30_x2b, ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_1), 0, 31, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_1), 31, 31, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_1), 0, 15, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_1), 0, 30, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::noop(::hilti::rt::tuple::get<0>(*_t_x_1))), ::hilti::rt::tuple::get<1>(*_t_x_1)))).valueOrThrow()); |
2729 | 5.50M | if ( _t_trim ) { |
2730 | 0 | (*_t_data).trim(_t_cur.begin()); |
2731 | 0 | } |
2732 | | |
2733 | | // End parsing production: Variable: f32_5 -> bitfield(32) { full: 0..31; importByName: 31; ordinal: 0..15; hintNameRVA: 0..30; }; |
2734 | | |
2735 | 5.50M | (*_t_self)._t_error = _t_error; |
2736 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:480:22-490:9"); |
2737 | 5.50M | (*_t_self)._t_on_f32((*_t_self).f32.value()); |
2738 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:480:9-490:9"); |
2739 | 5.50M | _t_error = (*_t_self)._t_error; |
2740 | 5.50M | ::hilti::rt::debug::dedent("spicy"sv); |
2741 | | // End parsing production: Block: switch_9_case_1 -> f32_5; |
2742 | | |
2743 | 5.50M | break; |
2744 | 0 | } |
2745 | 308k | case hlt_internal_pe_ImageFile::PE::PE32_Plus: { |
2746 | 308k | ::hilti::rt::Result<::hilti::rt::Tuple<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::stream::View>> _t_x_2; |
2747 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:492:9-502:9"); |
2748 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:492:9-502:9"); |
2749 | | |
2750 | | // Begin parsing production: Block: switch_9_case_2 -> f64_5; |
2751 | 308k | ::hilti::rt::debug::indent("spicy"sv); |
2752 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:492:27-497:9"); |
2753 | | |
2754 | | // Begin parsing production: Variable: f64_5 -> bitfield(64) { full: 0..63; importByName: 63; ordinal: 0..15; hintNameRVA: 0..30; }; |
2755 | 308k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, "expecting 8 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:492:27-497:9"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2756 | 308k | ::hilti::rt::tuple::assign(std::tie((*_t_self).f64.valueOrInit(), _t_cur), (_t_x_2 = ::hilti::rt::integer::unpack<uint64_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}), ::hilti::rt::make_result(::hilti::rt::tuple::make(::hilti::rt::make_bitfield(&type_info::_t_ti_bitfieldx2a64x2b_x73_full__0__63x3e_importByName__63x3e_ordinal__0__15x3e_hintNameRVA__0__30x3e_x75_bitfieldx2a64_full_0_63_importByName_63_63_ordinal_0_15_hintNameRVA_0_30_x2b, ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_2), 0, 63, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_2), 63, 63, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_2), 0, 15, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::bits(::hilti::rt::tuple::get<0>(*_t_x_2), 0, 30, ::hilti::rt::integer::BitOrder{::hilti::rt::integer::BitOrder::LSB0}), ::hilti::rt::integer::noop(::hilti::rt::tuple::get<0>(*_t_x_2))), ::hilti::rt::tuple::get<1>(*_t_x_2)))).valueOrThrow()); |
2757 | 308k | if ( _t_trim ) { |
2758 | 0 | (*_t_data).trim(_t_cur.begin()); |
2759 | 0 | } |
2760 | | |
2761 | | // End parsing production: Variable: f64_5 -> bitfield(64) { full: 0..63; importByName: 63; ordinal: 0..15; hintNameRVA: 0..30; }; |
2762 | | |
2763 | 308k | (*_t_self)._t_error = _t_error; |
2764 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:492:22-502:9"); |
2765 | 308k | (*_t_self)._t_on_f64((*_t_self).f64.value()); |
2766 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:492:9-502:9"); |
2767 | 308k | _t_error = (*_t_self)._t_error; |
2768 | 308k | ::hilti::rt::debug::dedent("spicy"sv); |
2769 | | // End parsing production: Block: switch_9_case_2 -> f64_5; |
2770 | | |
2771 | 308k | break; |
2772 | 0 | } |
2773 | 0 | default: { |
2774 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:479:5-503:6"); |
2775 | 0 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, (*_t_self->_t_p_f.derefAsValue()).peFileFormat), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:479:5-503:6"}; |
2776 | 0 | } |
2777 | 5.81M | } |
2778 | 5.81M | ::hilti::rt::debug::dedent("spicy"sv); |
2779 | 5.81M | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
2780 | 5.81M | } |
2781 | | |
2782 | 15.4k | inline auto hlt_internal_pe_ImageFile::PE::NullTerminatedString::_t_convert() -> ::hilti::rt::Bytes { |
2783 | 15.4k | auto _t_self = PE::NullTerminatedString::_t_self(); |
2784 | 15.4k | return (*_t_self).s.value(); |
2785 | 15.4k | } |
2786 | | |
2787 | 15.6k | auto hlt_internal_pe_ImageFile::PE::NullTerminatedString::_t_parse_PE__NullTerminatedString_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>> { |
2788 | 15.6k | auto _t_self = NullTerminatedString::_t_self(); |
2789 | 15.6k | ::hilti::rt::detail::checkStack(); |
2790 | 15.6k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
2791 | 15.6k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:59:8-59:12"); |
2792 | | |
2793 | | // Begin parsing production: Variable: s -> bytes; |
2794 | 15.6k | ::hilti::rt::integer::safe<uint64_t> _t_max_size_with_sentinel = hlt_internal_pe_ImageFile::PE::MaxStringSize + ::hilti::rt::integer::safe<std::uint64_t>{1U}; |
2795 | 15.6k | ::hilti::rt::stream::View _t_limited_ = _t_cur.limit(_t_max_size_with_sentinel); |
2796 | 15.6k | ::hilti::rt::stream::View _t_ncur = _t_cur.advance(_t_max_size_with_sentinel); |
2797 | 15.6k | ::hilti::rt::Bytes _t_until_bytes = "\000"_b; |
2798 | 15.6k | ::hilti::rt::integer::safe<uint64_t> _t_until_bytes_sz = "\000"_b.size(); |
2799 | 15.6k | (*_t_self).s.valueOrInit() = ""_b; |
2800 | 16.0k | while ( ::hilti::rt::Bool{true} ) { |
2801 | 15.8k | ::spicy::rt::detail::waitForInput(_t_data, _t_limited_, _t_until_bytes_sz, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:59:21-59:27"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2802 | 15.8k | ::hilti::rt::Bool found; |
2803 | 15.8k | ::hilti::rt::stream::SafeConstIterator it; |
2804 | 15.8k | ::hilti::rt::tuple::assign(std::tie(found, it), _t_limited_.find(_t_until_bytes)); |
2805 | 15.8k | if ( ::hilti::rt::Bool{static_cast<bool>(_t_limited_.sub(it).size())} ) { |
2806 | 9.71k | (*_t_self).s.value().append(_t_limited_.sub(it)); |
2807 | 9.71k | } |
2808 | | |
2809 | 15.8k | if ( found ) { |
2810 | 15.4k | _t_limited_ = _t_limited_.advance(it + _t_until_bytes_sz); |
2811 | 15.4k | if ( _t_trim ) { |
2812 | 0 | (*_t_data).trim(_t_limited_.begin()); |
2813 | 0 | } |
2814 | | |
2815 | 15.4k | goto _t_done_56232; |
2816 | 15.4k | } |
2817 | 417 | else { |
2818 | 417 | _t_limited_ = _t_limited_.advance(it); |
2819 | 417 | if ( _t_trim ) { |
2820 | 0 | (*_t_data).trim(_t_limited_.begin()); |
2821 | 0 | } |
2822 | 417 | } |
2823 | 15.8k | } |
2824 | | |
2825 | 15.4k | _t_done_56232: {} |
2826 | | |
2827 | 15.4k | if ( _t_trim ) { |
2828 | 0 | (*_t_data).trim(_t_limited_.begin()); |
2829 | 0 | } |
2830 | | |
2831 | 15.4k | if ( _t_limited_.offset() >= _t_ncur.offset() ) { |
2832 | 1 | (*_t_self).s.reset(); |
2833 | 1 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:59:29-59:51"); |
2834 | 1 | throw ::spicy::rt::ParseError{"parsing not done within &max-size bytes"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:59:29-59:51"}; |
2835 | 1 | } |
2836 | | |
2837 | | // End parsing production: Variable: s -> bytes; |
2838 | | |
2839 | 15.4k | _t_cur = _t_cur.advance(_t_limited_.offset() - _t_cur.offset()); |
2840 | 15.4k | ::hilti::rt::debug::dedent("spicy"sv); |
2841 | 15.4k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah)); |
2842 | 15.4k | } |
2843 | | |
2844 | 15.6k | auto hlt_internal_pe_ImageFile::PE::NullTerminatedString::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim, const ::hilti::rt::integer::safe<int64_t>& _t_lah) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>> { |
2845 | 15.6k | auto _t_self = NullTerminatedString::_t_self(); |
2846 | 15.6k | ::hilti::rt::detail::checkStack(); |
2847 | 15.6k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:58:29-60:17"); |
2848 | 15.6k | ::hilti::rt::debug::indent("spicy"sv); |
2849 | 15.6k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2850 | 15.6k | return (*_t_self)._t_parse_PE__NullTerminatedString_stage2(_t_data, _t_cur, _t_trim, _t_lah); |
2851 | 15.6k | } |
2852 | | |
2853 | 3.87k | auto hlt_internal_pe_ImageFile::PE::OptionalHeader::_t_parse_PE__OptionalHeader_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
2854 | 3.87k | auto _t_self = OptionalHeader::_t_self(); |
2855 | 3.87k | ::hilti::rt::detail::checkStack(); |
2856 | 3.87k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:255:23-308:1"); |
2857 | 3.87k | ::hilti::rt::integer::safe<uint16_t> _t_v_magic; |
2858 | 3.87k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:256:34-256:39"); |
2859 | | |
2860 | | // Begin parsing production: Variable: magic_6 -> uint<16>; |
2861 | 3.87k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:256:34-256:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2862 | 3.87k | ::hilti::rt::tuple::assign(std::tie(_t_v_magic, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2863 | 3.87k | if ( _t_trim ) { |
2864 | 0 | (*_t_data).trim(_t_cur.begin()); |
2865 | 0 | } |
2866 | | |
2867 | | // End parsing production: Variable: magic_6 -> uint<16>; |
2868 | | |
2869 | 3.87k | (*_t_self).magic.valueOrInit() = _t_v_magic; |
2870 | 3.87k | ::hilti::rt::Result<::hilti::rt::Nothing> _t_requires = (((_t_v_magic == hlt_internal_pe_ImageFile::PE::PE32) || (_t_v_magic == hlt_internal_pe_ImageFile::PE::PE32_Plus)) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error{"&requires failed: ($$ == PE32 || $$ == PE32_Plus)"}); |
2871 | 3.87k | if ( ! (::hilti::rt::Bool{static_cast<bool>(_t_requires)}) ) { |
2872 | 28 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:256:41-256:81"); |
2873 | 28 | throw ::spicy::rt::ParseError{::hilti::rt::detail::move_non_trivial(_t_requires).errorOrThrow(), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:256:41-256:81"}; |
2874 | 28 | } |
2875 | | |
2876 | 3.84k | ::hilti::rt::integer::safe<uint8_t> _t_v_majorLinkerVersion; |
2877 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:257:34-257:38"); |
2878 | | |
2879 | | // Begin parsing production: Variable: majorLinkerVersion_2 -> uint<8>; |
2880 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:257:34-257:38"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2881 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_majorLinkerVersion, _t_cur), ::hilti::rt::integer::unpack<uint8_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2882 | 3.84k | if ( _t_trim ) { |
2883 | 0 | (*_t_data).trim(_t_cur.begin()); |
2884 | 0 | } |
2885 | | |
2886 | | // End parsing production: Variable: majorLinkerVersion_2 -> uint<8>; |
2887 | | |
2888 | 3.84k | ::hilti::rt::integer::safe<uint8_t> _t_v_minorLinkerVersion; |
2889 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:258:34-258:38"); |
2890 | | |
2891 | | // Begin parsing production: Variable: minorLinkerVersion_2 -> uint<8>; |
2892 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:258:34-258:38"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2893 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_minorLinkerVersion, _t_cur), ::hilti::rt::integer::unpack<uint8_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2894 | 3.84k | if ( _t_trim ) { |
2895 | 0 | (*_t_data).trim(_t_cur.begin()); |
2896 | 0 | } |
2897 | | |
2898 | | // End parsing production: Variable: minorLinkerVersion_2 -> uint<8>; |
2899 | | |
2900 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_sizeOfCode; |
2901 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:259:34-259:39"); |
2902 | | |
2903 | | // Begin parsing production: Variable: sizeOfCode_2 -> uint<32>; |
2904 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:259:34-259:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2905 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfCode, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2906 | 3.84k | if ( _t_trim ) { |
2907 | 0 | (*_t_data).trim(_t_cur.begin()); |
2908 | 0 | } |
2909 | | |
2910 | | // End parsing production: Variable: sizeOfCode_2 -> uint<32>; |
2911 | | |
2912 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_sizeOfInitializedData; |
2913 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:260:34-260:39"); |
2914 | | |
2915 | | // Begin parsing production: Variable: sizeOfInitializedData_2 -> uint<32>; |
2916 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:260:34-260:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2917 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfInitializedData, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2918 | 3.84k | if ( _t_trim ) { |
2919 | 0 | (*_t_data).trim(_t_cur.begin()); |
2920 | 0 | } |
2921 | | |
2922 | | // End parsing production: Variable: sizeOfInitializedData_2 -> uint<32>; |
2923 | | |
2924 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_sizeOfUninitializedData; |
2925 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:261:34-261:39"); |
2926 | | |
2927 | | // Begin parsing production: Variable: sizeOfUninitializedData_2 -> uint<32>; |
2928 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:261:34-261:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2929 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfUninitializedData, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2930 | 3.84k | if ( _t_trim ) { |
2931 | 0 | (*_t_data).trim(_t_cur.begin()); |
2932 | 0 | } |
2933 | | |
2934 | | // End parsing production: Variable: sizeOfUninitializedData_2 -> uint<32>; |
2935 | | |
2936 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_addressOfEntryPoint; |
2937 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:262:34-262:39"); |
2938 | | |
2939 | | // Begin parsing production: Variable: addressOfEntryPoint_2 -> uint<32>; |
2940 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:262:34-262:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2941 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_addressOfEntryPoint, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2942 | 3.84k | if ( _t_trim ) { |
2943 | 0 | (*_t_data).trim(_t_cur.begin()); |
2944 | 0 | } |
2945 | | |
2946 | | // End parsing production: Variable: addressOfEntryPoint_2 -> uint<32>; |
2947 | | |
2948 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_baseOfCode; |
2949 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:263:34-263:39"); |
2950 | | |
2951 | | // Begin parsing production: Variable: baseOfCode_2 -> uint<32>; |
2952 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:263:34-263:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2953 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_baseOfCode, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2954 | 3.84k | if ( _t_trim ) { |
2955 | 0 | (*_t_data).trim(_t_cur.begin()); |
2956 | 0 | } |
2957 | | |
2958 | | // End parsing production: Variable: baseOfCode_2 -> uint<32>; |
2959 | | |
2960 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:265:5-273:6"); |
2961 | | |
2962 | | // Begin parsing production: Switch: switch_4 -> [PE32] -> switch_4_case_1 | [PE32_Plus] -> switch_4_case_2; |
2963 | 3.84k | _t_cur = (*_t_self)._t_parse_switch_4_stage1(_t_data, _t_cur, _t_trim); |
2964 | | // End parsing production: Switch: switch_4 -> [PE32] -> switch_4_case_1 | [PE32_Plus] -> switch_4_case_2; |
2965 | | |
2966 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_sectionAlignment; |
2967 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:275:34-275:39"); |
2968 | | |
2969 | | // Begin parsing production: Variable: sectionAlignment_2 -> uint<32>; |
2970 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:275:34-275:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2971 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_sectionAlignment, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2972 | 3.84k | if ( _t_trim ) { |
2973 | 0 | (*_t_data).trim(_t_cur.begin()); |
2974 | 0 | } |
2975 | | |
2976 | | // End parsing production: Variable: sectionAlignment_2 -> uint<32>; |
2977 | | |
2978 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_fileAlignment; |
2979 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:276:34-276:39"); |
2980 | | |
2981 | | // Begin parsing production: Variable: fileAlignment_2 -> uint<32>; |
2982 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:276:34-276:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2983 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_fileAlignment, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2984 | 3.84k | if ( _t_trim ) { |
2985 | 0 | (*_t_data).trim(_t_cur.begin()); |
2986 | 0 | } |
2987 | | |
2988 | | // End parsing production: Variable: fileAlignment_2 -> uint<32>; |
2989 | | |
2990 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_majorOperatingSystemVersion; |
2991 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:277:34-277:39"); |
2992 | | |
2993 | | // Begin parsing production: Variable: majorOperatingSystemVersion_2 -> uint<16>; |
2994 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:277:34-277:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
2995 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_majorOperatingSystemVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
2996 | 3.84k | if ( _t_trim ) { |
2997 | 0 | (*_t_data).trim(_t_cur.begin()); |
2998 | 0 | } |
2999 | | |
3000 | | // End parsing production: Variable: majorOperatingSystemVersion_2 -> uint<16>; |
3001 | | |
3002 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_minorOperatingSystemVersion; |
3003 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:278:34-278:39"); |
3004 | | |
3005 | | // Begin parsing production: Variable: minorOperatingSystemVersion_2 -> uint<16>; |
3006 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:278:34-278:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3007 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_minorOperatingSystemVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3008 | 3.84k | if ( _t_trim ) { |
3009 | 0 | (*_t_data).trim(_t_cur.begin()); |
3010 | 0 | } |
3011 | | |
3012 | | // End parsing production: Variable: minorOperatingSystemVersion_2 -> uint<16>; |
3013 | | |
3014 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_majorImageVersion; |
3015 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:279:34-279:39"); |
3016 | | |
3017 | | // Begin parsing production: Variable: majorImageVersion_2 -> uint<16>; |
3018 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:279:34-279:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3019 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_majorImageVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3020 | 3.84k | if ( _t_trim ) { |
3021 | 0 | (*_t_data).trim(_t_cur.begin()); |
3022 | 0 | } |
3023 | | |
3024 | | // End parsing production: Variable: majorImageVersion_2 -> uint<16>; |
3025 | | |
3026 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_minorImageVersion; |
3027 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:280:34-280:39"); |
3028 | | |
3029 | | // Begin parsing production: Variable: minorImageVersion_2 -> uint<16>; |
3030 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:280:34-280:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3031 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_minorImageVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3032 | 3.84k | if ( _t_trim ) { |
3033 | 0 | (*_t_data).trim(_t_cur.begin()); |
3034 | 0 | } |
3035 | | |
3036 | | // End parsing production: Variable: minorImageVersion_2 -> uint<16>; |
3037 | | |
3038 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_majorSubsystemVersion; |
3039 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:281:34-281:39"); |
3040 | | |
3041 | | // Begin parsing production: Variable: majorSubsystemVersion_2 -> uint<16>; |
3042 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:281:34-281:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3043 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_majorSubsystemVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3044 | 3.84k | if ( _t_trim ) { |
3045 | 0 | (*_t_data).trim(_t_cur.begin()); |
3046 | 0 | } |
3047 | | |
3048 | | // End parsing production: Variable: majorSubsystemVersion_2 -> uint<16>; |
3049 | | |
3050 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_minorSubsystemVersion; |
3051 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:282:34-282:39"); |
3052 | | |
3053 | | // Begin parsing production: Variable: minorSubsystemVersion_2 -> uint<16>; |
3054 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:282:34-282:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3055 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_minorSubsystemVersion, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3056 | 3.84k | if ( _t_trim ) { |
3057 | 0 | (*_t_data).trim(_t_cur.begin()); |
3058 | 0 | } |
3059 | | |
3060 | | // End parsing production: Variable: minorSubsystemVersion_2 -> uint<16>; |
3061 | | |
3062 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_win32VersionValue; |
3063 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:283:34-283:39"); |
3064 | | |
3065 | | // Begin parsing production: Variable: win32VersionValue_2 -> uint<32>; |
3066 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:283:34-283:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3067 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_win32VersionValue, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3068 | 3.84k | if ( _t_trim ) { |
3069 | 0 | (*_t_data).trim(_t_cur.begin()); |
3070 | 0 | } |
3071 | | |
3072 | | // End parsing production: Variable: win32VersionValue_2 -> uint<32>; |
3073 | | |
3074 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_sizeOfImage; |
3075 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:284:34-284:39"); |
3076 | | |
3077 | | // Begin parsing production: Variable: sizeOfImage_2 -> uint<32>; |
3078 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:284:34-284:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3079 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfImage, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3080 | 3.84k | if ( _t_trim ) { |
3081 | 0 | (*_t_data).trim(_t_cur.begin()); |
3082 | 0 | } |
3083 | | |
3084 | | // End parsing production: Variable: sizeOfImage_2 -> uint<32>; |
3085 | | |
3086 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_sizeOfHeaders; |
3087 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:285:34-285:39"); |
3088 | | |
3089 | | // Begin parsing production: Variable: sizeOfHeaders_2 -> uint<32>; |
3090 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:285:34-285:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3091 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfHeaders, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3092 | 3.84k | if ( _t_trim ) { |
3093 | 0 | (*_t_data).trim(_t_cur.begin()); |
3094 | 0 | } |
3095 | | |
3096 | | // End parsing production: Variable: sizeOfHeaders_2 -> uint<32>; |
3097 | | |
3098 | 3.84k | (*_t_self).sizeOfHeaders.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_sizeOfHeaders); |
3099 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_checkSum; |
3100 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:286:34-286:39"); |
3101 | | |
3102 | | // Begin parsing production: Variable: checkSum_2 -> uint<32>; |
3103 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:286:34-286:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3104 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_checkSum, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3105 | 3.84k | if ( _t_trim ) { |
3106 | 0 | (*_t_data).trim(_t_cur.begin()); |
3107 | 0 | } |
3108 | | |
3109 | | // End parsing production: Variable: checkSum_2 -> uint<32>; |
3110 | | |
3111 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_subsystem; |
3112 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:287:34-287:39"); |
3113 | | |
3114 | | // Begin parsing production: Variable: subsystem_2 -> uint<16>; |
3115 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:287:34-287:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3116 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_subsystem, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3117 | 3.84k | if ( _t_trim ) { |
3118 | 0 | (*_t_data).trim(_t_cur.begin()); |
3119 | 0 | } |
3120 | | |
3121 | | // End parsing production: Variable: subsystem_2 -> uint<16>; |
3122 | | |
3123 | 3.84k | ::hilti::rt::integer::safe<uint16_t> _t_v_dllCharacteristics; |
3124 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:288:34-288:39"); |
3125 | | |
3126 | | // Begin parsing production: Variable: dllCharacteristics_2 -> uint<16>; |
3127 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:288:34-288:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3128 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_dllCharacteristics, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3129 | 3.84k | if ( _t_trim ) { |
3130 | 0 | (*_t_data).trim(_t_cur.begin()); |
3131 | 0 | } |
3132 | | |
3133 | | // End parsing production: Variable: dllCharacteristics_2 -> uint<16>; |
3134 | | |
3135 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:290:5-303:6"); |
3136 | | |
3137 | | // Begin parsing production: Switch: switch_5 -> [PE32] -> switch_5_case_1 | [PE32_Plus] -> switch_5_case_2; |
3138 | 3.84k | _t_cur = (*_t_self)._t_parse_switch_5_stage1(_t_data, _t_cur, _t_trim); |
3139 | | // End parsing production: Switch: switch_5 -> [PE32] -> switch_5_case_1 | [PE32_Plus] -> switch_5_case_2; |
3140 | | |
3141 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_loaderFlags; |
3142 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:305:34-305:39"); |
3143 | | |
3144 | | // Begin parsing production: Variable: loaderFlags_2 -> uint<32>; |
3145 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:305:34-305:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3146 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_loaderFlags, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3147 | 3.84k | if ( _t_trim ) { |
3148 | 0 | (*_t_data).trim(_t_cur.begin()); |
3149 | 0 | } |
3150 | | |
3151 | | // End parsing production: Variable: loaderFlags_2 -> uint<32>; |
3152 | | |
3153 | 3.84k | ::hilti::rt::integer::safe<uint32_t> _t_v_numberOfRvaAndSizes; |
3154 | 3.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:306:34-306:39"); |
3155 | | |
3156 | | // Begin parsing production: Variable: numberOfRvaAndSizes_2 -> uint<32>; |
3157 | 3.84k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:306:34-306:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3158 | 3.84k | ::hilti::rt::tuple::assign(std::tie(_t_v_numberOfRvaAndSizes, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3159 | 3.84k | if ( _t_trim ) { |
3160 | 0 | (*_t_data).trim(_t_cur.begin()); |
3161 | 0 | } |
3162 | | |
3163 | | // End parsing production: Variable: numberOfRvaAndSizes_2 -> uint<32>; |
3164 | | |
3165 | 3.84k | (*_t_self).numberOfRvaAndSizes.valueOrInit() = _t_v_numberOfRvaAndSizes; |
3166 | 3.84k | ::hilti::rt::Result<::hilti::rt::Nothing> _t_requires_ = ((::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_v_numberOfRvaAndSizes)} < hlt_internal_pe_ImageFile::PE::MaxDirectories) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error{"&requires failed: ($$ < MaxDirectories)"}); |
3167 | 3.84k | if ( ! (::hilti::rt::Bool{static_cast<bool>(_t_requires_)}) ) { |
3168 | 112 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:306:41-306:71"); |
3169 | 112 | throw ::spicy::rt::ParseError{::hilti::rt::detail::move_non_trivial(_t_requires_).errorOrThrow(), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:306:41-306:71"}; |
3170 | 112 | } |
3171 | | |
3172 | 3.73k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:307:5-307:73"); |
3173 | | |
3174 | | // Begin parsing production: Counter: dataDirectories_2 -> counter(self.numberOfRvaAndSizes): Resolved_23; |
3175 | 3.73k | _t_cur = (*_t_self)._t_parse_dataDirectories_2_stage1(_t_data, _t_cur, _t_trim, (*_t_self).dataDirectories.valueOrInit()); |
3176 | | // End parsing production: Counter: dataDirectories_2 -> counter(self.numberOfRvaAndSizes): Resolved_23; |
3177 | | |
3178 | 3.73k | ::hilti::rt::debug::dedent("spicy"sv); |
3179 | 3.73k | return _t_cur; |
3180 | 3.84k | } |
3181 | | |
3182 | 3.52k | auto hlt_internal_pe_ImageFile::PE::OptionalHeader::_t_parse_dataDirectories_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim, ::hilti::rt::Vector<hlt_internal_pe_ImageFile::PE::DataDirectory>& _t_dst) -> ::hilti::rt::stream::View { |
3183 | 3.52k | auto _t_self = OptionalHeader::_t_self(); |
3184 | 3.52k | ::hilti::rt::detail::checkStack(); |
3185 | 3.52k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:307:5-307:73"); |
3186 | 3.52k | ::hilti::rt::integer::safe<uint64_t> _t_repeat = ::hilti::rt::integer::safe<uint64_t>{(*_t_self).numberOfRvaAndSizes.value()}; |
3187 | 3.52k | _t_dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _t_repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _t_repeat)); |
3188 | 15.2k | for ( ::hilti::rt::integer::safe<uint64_t> _t_i = ::hilti::rt::detail::move_non_trivial(_t_repeat); ::hilti::rt::Bool{static_cast<bool>(_t_i)}; ) { |
3189 | 11.7k | _t_i--; |
3190 | 11.7k | hlt_internal_pe_ImageFile::PE::DataDirectory _t_elem; |
3191 | 11.7k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:310:22-313:1"); |
3192 | | |
3193 | | // Begin parsing production: Unit: PE__DataDirectory_2 -> virtualAddress_3 size_2 (container 'dataDirectories'); |
3194 | 11.7k | _t_elem = (hlt_internal_pe_ImageFile::PE::DataDirectory{}); |
3195 | 11.7k | _t_cur = _t_elem._t_parse_stage1(_t_data, _t_cur, _t_trim); |
3196 | | // End parsing production: Unit: PE__DataDirectory_2 -> virtualAddress_3 size_2 (container 'dataDirectories'); |
3197 | | |
3198 | 11.7k | _t_dst.emplace_back(::hilti::rt::detail::move_non_trivial(_t_elem)); |
3199 | 11.7k | } |
3200 | | |
3201 | 3.52k | return _t_cur; |
3202 | 3.52k | } |
3203 | | |
3204 | 3.87k | auto hlt_internal_pe_ImageFile::PE::OptionalHeader::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3205 | 3.87k | auto _t_self = OptionalHeader::_t_self(); |
3206 | 3.87k | ::hilti::rt::detail::checkStack(); |
3207 | 3.87k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:255:23-308:1"); |
3208 | 3.87k | ::hilti::rt::debug::indent("spicy"sv); |
3209 | 3.87k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
3210 | 3.87k | return (*_t_self)._t_parse_PE__OptionalHeader_2_stage2(_t_data, _t_cur, _t_trim); |
3211 | 3.87k | } |
3212 | | |
3213 | 3.78k | auto hlt_internal_pe_ImageFile::PE::OptionalHeader::_t_parse_switch_4_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3214 | 3.78k | auto _t_self = OptionalHeader::_t_self(); |
3215 | 3.78k | ::hilti::rt::detail::checkStack(); |
3216 | 3.78k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:265:5-273:6"); |
3217 | 3.78k | ::hilti::rt::debug::indent("spicy"sv); |
3218 | 3.78k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:265:5-273:6"); |
3219 | 3.78k | switch ( auto _t_x = (*_t_self).magic.value(); (_t_x).Ref() ) { |
3220 | 3.09k | case hlt_internal_pe_ImageFile::PE::PE32: { |
3221 | 3.09k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:266:9-269:9"); |
3222 | 3.09k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:266:9-269:9"); |
3223 | | |
3224 | | // Begin parsing production: Block: switch_4_case_1 -> baseOfData_2 imageBase_3; |
3225 | 3.09k | ::hilti::rt::debug::indent("spicy"sv); |
3226 | 3.09k | ::hilti::rt::integer::safe<uint32_t> _t_v_baseOfData; |
3227 | 3.09k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:267:34-267:39"); |
3228 | | |
3229 | | // Begin parsing production: Variable: baseOfData_2 -> uint<32>; |
3230 | 3.09k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:267:34-267:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3231 | 3.09k | ::hilti::rt::tuple::assign(std::tie(_t_v_baseOfData, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3232 | 3.09k | if ( _t_trim ) { |
3233 | 0 | (*_t_data).trim(_t_cur.begin()); |
3234 | 0 | } |
3235 | | |
3236 | | // End parsing production: Variable: baseOfData_2 -> uint<32>; |
3237 | | |
3238 | 3.09k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:268:34-268:39"); |
3239 | 3.09k | ::hilti::rt::integer::safe<uint32_t> _t_parsed_imageBase; |
3240 | | |
3241 | | // Begin parsing production: Variable: imageBase_3 -> uint<32>; |
3242 | 3.09k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:268:34-268:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3243 | 3.09k | ::hilti::rt::tuple::assign(std::tie(_t_parsed_imageBase, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3244 | 3.09k | if ( _t_trim ) { |
3245 | 0 | (*_t_data).trim(_t_cur.begin()); |
3246 | 0 | } |
3247 | | |
3248 | | // End parsing production: Variable: imageBase_3 -> uint<32>; |
3249 | | |
3250 | 3.09k | ::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_parsed_imageBase)}; |
3251 | 3.09k | ::hilti::rt::debug::dedent("spicy"sv); |
3252 | | // End parsing production: Block: switch_4_case_1 -> baseOfData_2 imageBase_3; |
3253 | | |
3254 | 3.09k | break; |
3255 | 0 | } |
3256 | 695 | case hlt_internal_pe_ImageFile::PE::PE32_Plus: { |
3257 | 695 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:270:9-272:9"); |
3258 | 695 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:270:9-272:9"); |
3259 | | |
3260 | | // Begin parsing production: Block: switch_4_case_2 -> imageBase_4; |
3261 | 695 | ::hilti::rt::debug::indent("spicy"sv); |
3262 | 695 | ::hilti::rt::integer::safe<uint64_t> _t_v_imageBase; |
3263 | 695 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:271:34-271:39"); |
3264 | | |
3265 | | // Begin parsing production: Variable: imageBase_4 -> uint<64>; |
3266 | 695 | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, "expecting 8 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:271:34-271:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3267 | 695 | ::hilti::rt::tuple::assign(std::tie(_t_v_imageBase, _t_cur), ::hilti::rt::integer::unpack<uint64_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3268 | 695 | if ( _t_trim ) { |
3269 | 0 | (*_t_data).trim(_t_cur.begin()); |
3270 | 0 | } |
3271 | | |
3272 | | // End parsing production: Variable: imageBase_4 -> uint<64>; |
3273 | | |
3274 | 695 | ::hilti::rt::debug::dedent("spicy"sv); |
3275 | | // End parsing production: Block: switch_4_case_2 -> imageBase_4; |
3276 | | |
3277 | 695 | break; |
3278 | 0 | } |
3279 | 0 | default: { |
3280 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:265:5-273:6"); |
3281 | 0 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, (*_t_self).magic.value()), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:265:5-273:6"}; |
3282 | 0 | } |
3283 | 3.78k | } |
3284 | 3.76k | ::hilti::rt::debug::dedent("spicy"sv); |
3285 | 3.76k | return _t_cur; |
3286 | 3.78k | } |
3287 | | |
3288 | 3.70k | auto hlt_internal_pe_ImageFile::PE::OptionalHeader::_t_parse_switch_5_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3289 | 3.70k | auto _t_self = OptionalHeader::_t_self(); |
3290 | 3.70k | ::hilti::rt::detail::checkStack(); |
3291 | 3.70k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:290:5-303:6"); |
3292 | 3.70k | ::hilti::rt::debug::indent("spicy"sv); |
3293 | 3.70k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:290:5-303:6"); |
3294 | 3.70k | switch ( auto _t_x = (*_t_self).magic.value(); (_t_x).Ref() ) { |
3295 | 3.04k | case hlt_internal_pe_ImageFile::PE::PE32: { |
3296 | 3.04k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:291:9-296:9"); |
3297 | 3.04k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:291:9-296:9"); |
3298 | | |
3299 | | // Begin parsing production: Block: switch_5_case_1 -> sizeOfStackReserve_3 sizeOfStackCommit_3 sizeOfHeapReserve_3 sizeOfHeapCommit_3; |
3300 | 3.04k | ::hilti::rt::debug::indent("spicy"sv); |
3301 | 3.04k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:292:34-292:39"); |
3302 | 3.04k | ::hilti::rt::integer::safe<uint32_t> _t_parsed_sizeOfStackReserve; |
3303 | | |
3304 | | // Begin parsing production: Variable: sizeOfStackReserve_3 -> uint<32>; |
3305 | 3.04k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:292:34-292:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3306 | 3.04k | ::hilti::rt::tuple::assign(std::tie(_t_parsed_sizeOfStackReserve, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3307 | 3.04k | if ( _t_trim ) { |
3308 | 0 | (*_t_data).trim(_t_cur.begin()); |
3309 | 0 | } |
3310 | | |
3311 | | // End parsing production: Variable: sizeOfStackReserve_3 -> uint<32>; |
3312 | | |
3313 | 3.04k | ::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_parsed_sizeOfStackReserve)}; |
3314 | 3.04k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:293:34-293:39"); |
3315 | 3.04k | ::hilti::rt::integer::safe<uint32_t> _t_parsed_sizeOfStackCommit; |
3316 | | |
3317 | | // Begin parsing production: Variable: sizeOfStackCommit_3 -> uint<32>; |
3318 | 3.04k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:293:34-293:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3319 | 3.04k | ::hilti::rt::tuple::assign(std::tie(_t_parsed_sizeOfStackCommit, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3320 | 3.04k | if ( _t_trim ) { |
3321 | 0 | (*_t_data).trim(_t_cur.begin()); |
3322 | 0 | } |
3323 | | |
3324 | | // End parsing production: Variable: sizeOfStackCommit_3 -> uint<32>; |
3325 | | |
3326 | 3.04k | ::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_parsed_sizeOfStackCommit)}; |
3327 | 3.04k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:294:34-294:39"); |
3328 | 3.04k | ::hilti::rt::integer::safe<uint32_t> _t_parsed_sizeOfHeapReserve; |
3329 | | |
3330 | | // Begin parsing production: Variable: sizeOfHeapReserve_3 -> uint<32>; |
3331 | 3.04k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:294:34-294:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3332 | 3.04k | ::hilti::rt::tuple::assign(std::tie(_t_parsed_sizeOfHeapReserve, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3333 | 3.04k | if ( _t_trim ) { |
3334 | 0 | (*_t_data).trim(_t_cur.begin()); |
3335 | 0 | } |
3336 | | |
3337 | | // End parsing production: Variable: sizeOfHeapReserve_3 -> uint<32>; |
3338 | | |
3339 | 3.04k | ::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_parsed_sizeOfHeapReserve)}; |
3340 | 3.04k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:295:34-295:39"); |
3341 | 3.04k | ::hilti::rt::integer::safe<uint32_t> _t_parsed_sizeOfHeapCommit; |
3342 | | |
3343 | | // Begin parsing production: Variable: sizeOfHeapCommit_3 -> uint<32>; |
3344 | 3.04k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:295:34-295:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3345 | 3.04k | ::hilti::rt::tuple::assign(std::tie(_t_parsed_sizeOfHeapCommit, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3346 | 3.04k | if ( _t_trim ) { |
3347 | 0 | (*_t_data).trim(_t_cur.begin()); |
3348 | 0 | } |
3349 | | |
3350 | | // End parsing production: Variable: sizeOfHeapCommit_3 -> uint<32>; |
3351 | | |
3352 | 3.04k | ::hilti::rt::integer::safe<uint64_t>{::hilti::rt::detail::move_non_trivial(_t_parsed_sizeOfHeapCommit)}; |
3353 | 3.04k | ::hilti::rt::debug::dedent("spicy"sv); |
3354 | | // End parsing production: Block: switch_5_case_1 -> sizeOfStackReserve_3 sizeOfStackCommit_3 sizeOfHeapReserve_3 sizeOfHeapCommit_3; |
3355 | | |
3356 | 3.04k | break; |
3357 | 0 | } |
3358 | 660 | case hlt_internal_pe_ImageFile::PE::PE32_Plus: { |
3359 | 660 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:297:9-302:9"); |
3360 | 660 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:297:9-302:9"); |
3361 | | |
3362 | | // Begin parsing production: Block: switch_5_case_2 -> sizeOfStackReserve_4 sizeOfStackCommit_4 sizeOfHeapReserve_4 sizeOfHeapCommit_4; |
3363 | 660 | ::hilti::rt::debug::indent("spicy"sv); |
3364 | 660 | ::hilti::rt::integer::safe<uint64_t> _t_v_sizeOfStackReserve; |
3365 | 660 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:298:34-298:39"); |
3366 | | |
3367 | | // Begin parsing production: Variable: sizeOfStackReserve_4 -> uint<64>; |
3368 | 660 | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, "expecting 8 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:298:34-298:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3369 | 660 | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfStackReserve, _t_cur), ::hilti::rt::integer::unpack<uint64_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3370 | 660 | if ( _t_trim ) { |
3371 | 0 | (*_t_data).trim(_t_cur.begin()); |
3372 | 0 | } |
3373 | | |
3374 | | // End parsing production: Variable: sizeOfStackReserve_4 -> uint<64>; |
3375 | | |
3376 | 660 | ::hilti::rt::integer::safe<uint64_t> _t_v_sizeOfStackCommit; |
3377 | 660 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:299:34-299:39"); |
3378 | | |
3379 | | // Begin parsing production: Variable: sizeOfStackCommit_4 -> uint<64>; |
3380 | 660 | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, "expecting 8 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:299:34-299:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3381 | 660 | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfStackCommit, _t_cur), ::hilti::rt::integer::unpack<uint64_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3382 | 660 | if ( _t_trim ) { |
3383 | 0 | (*_t_data).trim(_t_cur.begin()); |
3384 | 0 | } |
3385 | | |
3386 | | // End parsing production: Variable: sizeOfStackCommit_4 -> uint<64>; |
3387 | | |
3388 | 660 | ::hilti::rt::integer::safe<uint64_t> _t_v_sizeOfHeapReserve; |
3389 | 660 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:300:34-300:39"); |
3390 | | |
3391 | | // Begin parsing production: Variable: sizeOfHeapReserve_4 -> uint<64>; |
3392 | 660 | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, "expecting 8 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:300:34-300:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3393 | 660 | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfHeapReserve, _t_cur), ::hilti::rt::integer::unpack<uint64_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3394 | 660 | if ( _t_trim ) { |
3395 | 0 | (*_t_data).trim(_t_cur.begin()); |
3396 | 0 | } |
3397 | | |
3398 | | // End parsing production: Variable: sizeOfHeapReserve_4 -> uint<64>; |
3399 | | |
3400 | 660 | ::hilti::rt::integer::safe<uint64_t> _t_v_sizeOfHeapCommit; |
3401 | 660 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:301:34-301:39"); |
3402 | | |
3403 | | // Begin parsing production: Variable: sizeOfHeapCommit_4 -> uint<64>; |
3404 | 660 | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, "expecting 8 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:301:34-301:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3405 | 660 | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfHeapCommit, _t_cur), ::hilti::rt::integer::unpack<uint64_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3406 | 660 | if ( _t_trim ) { |
3407 | 0 | (*_t_data).trim(_t_cur.begin()); |
3408 | 0 | } |
3409 | | |
3410 | | // End parsing production: Variable: sizeOfHeapCommit_4 -> uint<64>; |
3411 | | |
3412 | 660 | ::hilti::rt::debug::dedent("spicy"sv); |
3413 | | // End parsing production: Block: switch_5_case_2 -> sizeOfStackReserve_4 sizeOfStackCommit_4 sizeOfHeapReserve_4 sizeOfHeapCommit_4; |
3414 | | |
3415 | 660 | break; |
3416 | 0 | } |
3417 | 0 | default: { |
3418 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:290:5-303:6"); |
3419 | 0 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, (*_t_self).magic.value()), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:290:5-303:6"}; |
3420 | 0 | } |
3421 | 3.70k | } |
3422 | 3.65k | ::hilti::rt::debug::dedent("spicy"sv); |
3423 | 3.65k | return _t_cur; |
3424 | 3.70k | } |
3425 | | |
3426 | 4.02k | auto hlt_internal_pe_ImageFile::PE::PE_Header::_t_parse_PE__PE_Header_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3427 | 4.02k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_18; |
3428 | 4.02k | auto _t_self = PE_Header::_t_self(); |
3429 | 4.02k | ::hilti::rt::detail::checkStack(); |
3430 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:244:18-253:1"); |
3431 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:245:27-245:39"); |
3432 | | |
3433 | | // Begin parsing production: Ctor: magic_5 -> b"PE\x00\x00" (const bytes); |
3434 | 4.02k | ::spicy::rt::detail::expectBytesLiteral(_t_data, _t_cur, hlt_internal_pe_ImageFile::PE::_t_ctor__bytes_2, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:245:27-245:39"sv, (_t_lhs_18=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
3435 | 4.02k | _t_cur = _t_cur.advance(::hilti::rt::integer::safe<std::uint64_t>{4U}); |
3436 | 4.02k | if ( _t_trim ) { |
3437 | 0 | (*_t_data).trim(_t_cur.begin()); |
3438 | 0 | } |
3439 | | |
3440 | | // End parsing production: Ctor: magic_5 -> b"PE\x00\x00" (const bytes); |
3441 | | |
3442 | 4.02k | ::hilti::rt::integer::safe<uint16_t> _t_v_machine; |
3443 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:246:27-246:32"); |
3444 | | |
3445 | | // Begin parsing production: Variable: machine_2 -> uint<16>; |
3446 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:246:27-246:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3447 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_machine, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3448 | 4.02k | if ( _t_trim ) { |
3449 | 0 | (*_t_data).trim(_t_cur.begin()); |
3450 | 0 | } |
3451 | | |
3452 | | // End parsing production: Variable: machine_2 -> uint<16>; |
3453 | | |
3454 | 4.02k | ::hilti::rt::integer::safe<uint16_t> _t_v_numberOfSections; |
3455 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:247:27-247:32"); |
3456 | | |
3457 | | // Begin parsing production: Variable: numberOfSections_2 -> uint<16>; |
3458 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:247:27-247:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3459 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_numberOfSections, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3460 | 4.02k | if ( _t_trim ) { |
3461 | 0 | (*_t_data).trim(_t_cur.begin()); |
3462 | 0 | } |
3463 | | |
3464 | | // End parsing production: Variable: numberOfSections_2 -> uint<16>; |
3465 | | |
3466 | 4.02k | (*_t_self).numberOfSections.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_numberOfSections); |
3467 | 4.02k | ::hilti::rt::integer::safe<uint32_t> _t_v_timeDateStamp; |
3468 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:248:27-248:32"); |
3469 | | |
3470 | | // Begin parsing production: Variable: timeDateStamp_4 -> uint<32>; |
3471 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:248:27-248:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3472 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_timeDateStamp, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3473 | 4.02k | if ( _t_trim ) { |
3474 | 0 | (*_t_data).trim(_t_cur.begin()); |
3475 | 0 | } |
3476 | | |
3477 | | // End parsing production: Variable: timeDateStamp_4 -> uint<32>; |
3478 | | |
3479 | 4.02k | ::hilti::rt::integer::safe<uint32_t> _t_v_pointerToSymbolTable; |
3480 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:249:27-249:32"); |
3481 | | |
3482 | | // Begin parsing production: Variable: pointerToSymbolTable_2 -> uint<32>; |
3483 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:249:27-249:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3484 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_pointerToSymbolTable, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3485 | 4.02k | if ( _t_trim ) { |
3486 | 0 | (*_t_data).trim(_t_cur.begin()); |
3487 | 0 | } |
3488 | | |
3489 | | // End parsing production: Variable: pointerToSymbolTable_2 -> uint<32>; |
3490 | | |
3491 | 4.02k | ::hilti::rt::integer::safe<uint32_t> _t_v_numberOfSymbols; |
3492 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:250:27-250:32"); |
3493 | | |
3494 | | // Begin parsing production: Variable: numberOfSymbols_2 -> uint<32>; |
3495 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:250:27-250:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3496 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_numberOfSymbols, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3497 | 4.02k | if ( _t_trim ) { |
3498 | 0 | (*_t_data).trim(_t_cur.begin()); |
3499 | 0 | } |
3500 | | |
3501 | | // End parsing production: Variable: numberOfSymbols_2 -> uint<32>; |
3502 | | |
3503 | 4.02k | ::hilti::rt::integer::safe<uint16_t> _t_v_sizeOfOptionalHeader; |
3504 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:251:27-251:32"); |
3505 | | |
3506 | | // Begin parsing production: Variable: sizeOfOptionalHeader_2 -> uint<16>; |
3507 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:251:27-251:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3508 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfOptionalHeader, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3509 | 4.02k | if ( _t_trim ) { |
3510 | 0 | (*_t_data).trim(_t_cur.begin()); |
3511 | 0 | } |
3512 | | |
3513 | | // End parsing production: Variable: sizeOfOptionalHeader_2 -> uint<16>; |
3514 | | |
3515 | 4.02k | (*_t_self).sizeOfOptionalHeader.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_sizeOfOptionalHeader); |
3516 | 4.02k | ::hilti::rt::integer::safe<uint16_t> _t_v_characteristics; |
3517 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:252:27-252:32"); |
3518 | | |
3519 | | // Begin parsing production: Variable: characteristics_3 -> uint<16>; |
3520 | 4.02k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:252:27-252:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3521 | 4.02k | ::hilti::rt::tuple::assign(std::tie(_t_v_characteristics, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3522 | 4.02k | if ( _t_trim ) { |
3523 | 0 | (*_t_data).trim(_t_cur.begin()); |
3524 | 0 | } |
3525 | | |
3526 | | // End parsing production: Variable: characteristics_3 -> uint<16>; |
3527 | | |
3528 | 4.02k | ::hilti::rt::debug::dedent("spicy"sv); |
3529 | 4.02k | return _t_cur; |
3530 | 4.02k | } |
3531 | | |
3532 | 4.02k | auto hlt_internal_pe_ImageFile::PE::PE_Header::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3533 | 4.02k | auto _t_self = PE_Header::_t_self(); |
3534 | 4.02k | ::hilti::rt::detail::checkStack(); |
3535 | 4.02k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:244:18-253:1"); |
3536 | 4.02k | ::hilti::rt::debug::indent("spicy"sv); |
3537 | 4.02k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
3538 | 4.02k | return (*_t_self)._t_parse_PE__PE_Header_2_stage2(_t_data, _t_cur, _t_trim); |
3539 | 4.02k | } |
3540 | | |
3541 | 57.5k | auto hlt_internal_pe_ImageFile::PE::SectionHeader::_t_parse_PE__SectionHeader_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3542 | 57.5k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_19; |
3543 | 57.5k | auto _t_self = SectionHeader::_t_self(); |
3544 | 57.5k | ::hilti::rt::detail::checkStack(); |
3545 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:315:22-326:1"); |
3546 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:316:27-316:31"); |
3547 | | |
3548 | | // Begin parsing production: Variable: name_4 -> bytes; |
3549 | 57.5k | (*_t_self).name.valueOrInit() = ::spicy::rt::detail::extractBytes(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, ::hilti::rt::Bool{false}, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:316:5-316:40"sv, (_t_lhs_19=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}))); |
3550 | 57.5k | _t_cur = _t_cur.advance(::hilti::rt::integer::safe<std::uint64_t>{8U}); |
3551 | 57.5k | if ( _t_trim ) { |
3552 | 0 | (*_t_data).trim(_t_cur.begin()); |
3553 | 0 | } |
3554 | | |
3555 | | // End parsing production: Variable: name_4 -> bytes; |
3556 | | |
3557 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_virtualSize; |
3558 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:317:27-317:32"); |
3559 | | |
3560 | | // Begin parsing production: Variable: virtualSize_2 -> uint<32>; |
3561 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:317:27-317:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3562 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_virtualSize, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3563 | 57.5k | if ( _t_trim ) { |
3564 | 0 | (*_t_data).trim(_t_cur.begin()); |
3565 | 0 | } |
3566 | | |
3567 | | // End parsing production: Variable: virtualSize_2 -> uint<32>; |
3568 | | |
3569 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_virtualAddress; |
3570 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:318:27-318:32"); |
3571 | | |
3572 | | // Begin parsing production: Variable: virtualAddress_5 -> uint<32>; |
3573 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:318:27-318:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3574 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_virtualAddress, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3575 | 57.5k | if ( _t_trim ) { |
3576 | 0 | (*_t_data).trim(_t_cur.begin()); |
3577 | 0 | } |
3578 | | |
3579 | | // End parsing production: Variable: virtualAddress_5 -> uint<32>; |
3580 | | |
3581 | 57.5k | (*_t_self).virtualAddress.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_virtualAddress); |
3582 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_sizeOfRawData; |
3583 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:319:27-319:32"); |
3584 | | |
3585 | | // Begin parsing production: Variable: sizeOfRawData_2 -> uint<32>; |
3586 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:319:27-319:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3587 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_sizeOfRawData, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3588 | 57.5k | if ( _t_trim ) { |
3589 | 0 | (*_t_data).trim(_t_cur.begin()); |
3590 | 0 | } |
3591 | | |
3592 | | // End parsing production: Variable: sizeOfRawData_2 -> uint<32>; |
3593 | | |
3594 | 57.5k | (*_t_self).sizeOfRawData.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_sizeOfRawData); |
3595 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_pointerToRawData; |
3596 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:320:27-320:32"); |
3597 | | |
3598 | | // Begin parsing production: Variable: pointerToRawData_2 -> uint<32>; |
3599 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:320:27-320:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3600 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_pointerToRawData, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3601 | 57.5k | if ( _t_trim ) { |
3602 | 0 | (*_t_data).trim(_t_cur.begin()); |
3603 | 0 | } |
3604 | | |
3605 | | // End parsing production: Variable: pointerToRawData_2 -> uint<32>; |
3606 | | |
3607 | 57.5k | (*_t_self).pointerToRawData.valueOrInit() = ::hilti::rt::detail::move_non_trivial(_t_v_pointerToRawData); |
3608 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_pointerToRelocations; |
3609 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:321:27-321:32"); |
3610 | | |
3611 | | // Begin parsing production: Variable: pointerToRelocations_2 -> uint<32>; |
3612 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:321:27-321:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3613 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_pointerToRelocations, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3614 | 57.5k | if ( _t_trim ) { |
3615 | 0 | (*_t_data).trim(_t_cur.begin()); |
3616 | 0 | } |
3617 | | |
3618 | | // End parsing production: Variable: pointerToRelocations_2 -> uint<32>; |
3619 | | |
3620 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_pointerToLinenumbers; |
3621 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:322:27-322:32"); |
3622 | | |
3623 | | // Begin parsing production: Variable: pointerToLinenumbers_2 -> uint<32>; |
3624 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:322:27-322:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3625 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_pointerToLinenumbers, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3626 | 57.5k | if ( _t_trim ) { |
3627 | 0 | (*_t_data).trim(_t_cur.begin()); |
3628 | 0 | } |
3629 | | |
3630 | | // End parsing production: Variable: pointerToLinenumbers_2 -> uint<32>; |
3631 | | |
3632 | 57.5k | ::hilti::rt::integer::safe<uint16_t> _t_v_numberOfRelocations; |
3633 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:323:27-323:32"); |
3634 | | |
3635 | | // Begin parsing production: Variable: numberOfRelocations_2 -> uint<16>; |
3636 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:323:27-323:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3637 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_numberOfRelocations, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3638 | 57.5k | if ( _t_trim ) { |
3639 | 0 | (*_t_data).trim(_t_cur.begin()); |
3640 | 0 | } |
3641 | | |
3642 | | // End parsing production: Variable: numberOfRelocations_2 -> uint<16>; |
3643 | | |
3644 | 57.5k | ::hilti::rt::integer::safe<uint16_t> _t_v_numberOfLinenumbers; |
3645 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:324:27-324:32"); |
3646 | | |
3647 | | // Begin parsing production: Variable: numberOfLinenumbers_2 -> uint<16>; |
3648 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:324:27-324:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3649 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_numberOfLinenumbers, _t_cur), ::hilti::rt::integer::unpack<uint16_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3650 | 57.5k | if ( _t_trim ) { |
3651 | 0 | (*_t_data).trim(_t_cur.begin()); |
3652 | 0 | } |
3653 | | |
3654 | | // End parsing production: Variable: numberOfLinenumbers_2 -> uint<16>; |
3655 | | |
3656 | 57.5k | ::hilti::rt::integer::safe<uint32_t> _t_v_characteristics; |
3657 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:325:27-325:32"); |
3658 | | |
3659 | | // Begin parsing production: Variable: characteristics_4 -> uint<32>; |
3660 | 57.5k | ::spicy::rt::detail::waitForInput(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-pe/analyzer/analyzer.spicy:325:27-325:32"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>{}); |
3661 | 57.5k | ::hilti::rt::tuple::assign(std::tie(_t_v_characteristics, _t_cur), ::hilti::rt::integer::unpack<uint32_t>(_t_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Little}).valueOrThrow()); |
3662 | 57.5k | if ( _t_trim ) { |
3663 | 0 | (*_t_data).trim(_t_cur.begin()); |
3664 | 0 | } |
3665 | | |
3666 | | // End parsing production: Variable: characteristics_4 -> uint<32>; |
3667 | | |
3668 | 57.5k | ::hilti::rt::debug::dedent("spicy"sv); |
3669 | 57.5k | return _t_cur; |
3670 | 57.5k | } |
3671 | | |
3672 | 57.5k | auto hlt_internal_pe_ImageFile::PE::SectionHeader::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::View& _t_cur, const ::hilti::rt::Bool& _t_trim) -> ::hilti::rt::stream::View { |
3673 | 57.5k | auto _t_self = SectionHeader::_t_self(); |
3674 | 57.5k | ::hilti::rt::detail::checkStack(); |
3675 | 57.5k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:315:22-326:1"); |
3676 | 57.5k | ::hilti::rt::debug::indent("spicy"sv); |
3677 | 57.5k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
3678 | 57.5k | return (*_t_self)._t_parse_PE__SectionHeader_2_stage2(_t_data, _t_cur, _t_trim); |
3679 | 57.5k | } |
3680 | | |
3681 | 274k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ExportAddressTableEntry__t_on_rva_12214573325368762658(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportAddressTableEntry>& _t_self) { |
3682 | 274k | ::hilti::rt::detail::checkStack(); |
3683 | 274k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:402:9-402:39"); |
3684 | 274k | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> off = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3685 | 274k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:404:9-405:19"); |
3686 | 274k | if ( ! (off.hasValue()) ) { |
3687 | 220k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:405:13-405:19"); |
3688 | 220k | return; |
3689 | 220k | } |
3690 | | |
3691 | 54.8k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:407:9-409:39"); |
3692 | 54.8k | if ( (off.value() >= ::hilti::rt::tuple::get<0>((*_t_self->_t_p_f.derefAsValue()).exportDirInfo).value()) && (off.value() < ::hilti::rt::tuple::get<0>((*_t_self->_t_p_f.derefAsValue()).exportDirInfo).value() + ::hilti::rt::tuple::get<1>((*_t_self->_t_p_f.derefAsValue()).exportDirInfo)) ) { |
3693 | 6.32k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:409:13-409:38"); |
3694 | 6.32k | (*_t_self).forwarderOffset = ::hilti::rt::detail::move_non_trivial(off); |
3695 | 6.32k | } |
3696 | 54.8k | } |
3697 | | |
3698 | 1.13k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_addressTableRVA_15201512829653598939(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self) { |
3699 | 1.13k | ::hilti::rt::detail::checkStack(); |
3700 | 1.13k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:359:26-359:69"); |
3701 | 1.13k | (*_t_self).addressTableOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3702 | 1.13k | } |
3703 | | |
3704 | 1.15k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_dllNameRVA_3293904088300835943(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self) { |
3705 | 1.15k | ::hilti::rt::detail::checkStack(); |
3706 | 1.15k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:358:21-358:59"); |
3707 | 1.15k | (*_t_self).dllNameOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3708 | 1.15k | } |
3709 | | |
3710 | 1.13k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_namePtrTableRVA_11656397205816205229(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self) { |
3711 | 1.13k | ::hilti::rt::detail::checkStack(); |
3712 | 1.13k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:360:26-360:69"); |
3713 | 1.13k | (*_t_self).namePtrTableOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3714 | 1.13k | } |
3715 | | |
3716 | 1.13k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ExportDirectoryTable__t_on_ordinalTableRVA_15928344153389523969(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportDirectoryTable>& _t_self) { |
3717 | 1.13k | ::hilti::rt::detail::checkStack(); |
3718 | 1.13k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:361:26-361:69"); |
3719 | 1.13k | (*_t_self).ordinalTableOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3720 | 1.13k | } |
3721 | | |
3722 | 88.2k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ExportNamePtrTableEntry__t_on_rva_15037868803365436765(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ExportNamePtrTableEntry>& _t_self) { |
3723 | 88.2k | ::hilti::rt::detail::checkStack(); |
3724 | 88.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:388:14-388:49"); |
3725 | 88.2k | (*_t_self).nameOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3726 | 88.2k | } |
3727 | | |
3728 | 4.23k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_0x25_init_10989292239488911451(::hilti::rt::ValueReference<ImageFile>& _t_self) { |
3729 | 4.23k | ::hilti::rt::detail::checkStack(); |
3730 | 4.23k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:103:11-103:37"); |
3731 | 4.23k | (*_t_self).peStart = (*_t_self)._t_begin; |
3732 | 4.23k | } |
3733 | | |
3734 | 4.12k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_dosHeader_8079375724760300214(::hilti::rt::ValueReference<ImageFile>& _t_self) { |
3735 | 4.12k | ::hilti::rt::detail::checkStack(); |
3736 | 4.12k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:107:9-107:73"); |
3737 | 4.12k | (*_t_self).dosStubSize = ::hilti::rt::integer::safe<uint64_t>{(*_t_self).dosHeader.value().peHeaderOffset.value()} - hlt_internal_pe_ImageFile::PE::DOS_HeaderSize; |
3738 | 4.12k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:109:9-111:48"); |
3739 | 4.12k | if ( (*_t_self).dosStubSize > hlt_internal_pe_ImageFile::PE::MaxStubSize ) { |
3740 | 63 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:110:13-111:48"); |
3741 | 63 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("DOS stub size %s greater than maximum limit of %s"_hs, (*_t_self).dosStubSize, hlt_internal_pe_ImageFile::PE::MaxStubSize), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:110:13-111:48"}; |
3742 | 63 | } |
3743 | 4.12k | } |
3744 | | |
3745 | 3.44k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_optHeader_869007308863425286(::hilti::rt::ValueReference<ImageFile>& _t_self) { |
3746 | 3.44k | ::hilti::rt::detail::checkStack(); |
3747 | 3.44k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:115:11-115:50"); |
3748 | 3.44k | (*_t_self).peFileFormat = (*_t_self).optHeader.value().magic.value(); |
3749 | 3.44k | } |
3750 | | |
3751 | 2.84k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_sectionData_12034916000140660522(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<ImageFile>& _t_self) { |
3752 | 2.84k | ::hilti::rt::detail::checkStack(); |
3753 | 2.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:150:13-154:71"); |
3754 | 2.84k | ::hilti::rt::integer::safe<uint64_t> off = hlt_internal_pe_ImageFile::PE::DOS_HeaderSize + (*_t_self).dosStubSize + hlt_internal_pe_ImageFile::PE::PE_HeaderSize + (((*_t_self).peFileFormat == hlt_internal_pe_ImageFile::PE::PE32 ? hlt_internal_pe_ImageFile::PE::OptionalHeaderSize32 : hlt_internal_pe_ImageFile::PE::OptionalHeaderSize64)) + ::hilti::rt::integer::safe<uint64_t>{(*_t_self).optHeader.value().numberOfRvaAndSizes.value()} * hlt_internal_pe_ImageFile::PE::DataDirectorySize + ::hilti::rt::integer::safe<uint64_t>{(*_t_self).peHeader.value().numberOfSections.value()} * hlt_internal_pe_ImageFile::PE::SectionHeaderSize; |
3755 | 2.84k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:156:13-195:13"); |
3756 | 15.4k | for ( const auto& sh : (*_t_self).sectionHeaders.value() ) { |
3757 | 15.4k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:158:15-158:87"); |
3758 | 15.4k | ::hilti::rt::String section_name = sh.name.value().strip("\000"_b, ::hilti::rt::bytes::Side{::hilti::rt::bytes::Side::Right}).decode(::hilti::rt::unicode::Charset{::hilti::rt::unicode::Charset::UTF8}, ::hilti::rt::unicode::DecodeErrorStrategy{::hilti::rt::unicode::DecodeErrorStrategy::REPLACE}); |
3759 | 15.4k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:160:15-194:17"); |
3760 | 15.4k | if ( sh.pointerToRawData.value() != ::hilti::rt::integer::safe<std::uint32_t>{0U} ) { |
3761 | 5.01k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:164:17-166:17"); |
3762 | 5.01k | if ( off > ::hilti::rt::integer::safe<uint64_t>{sh.pointerToRawData.value()} ) { |
3763 | 1.34k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:165:21-165:29"); |
3764 | 1.34k | continue; |
3765 | 1.34k | } |
3766 | | |
3767 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:169:17-169:72"); |
3768 | 3.67k | ::hilti::rt::integer::safe<uint64_t> relativeStart = ::hilti::rt::integer::safe<uint64_t>{sh.pointerToRawData.value()} - off; |
3769 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:171:17-171:50"); |
3770 | 3.67k | ::hilti::rt::integer::safe<uint64_t> nBytesToProcess = ::hilti::rt::integer::safe<std::uint64_t>{0U}; |
3771 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:176:17-180:17"); |
3772 | 3.67k | if ( ::hilti::rt::integer::safe<uint64_t>{sh.sizeOfRawData.value()} > hlt_internal_pe_ImageFile::PE::MaxSectionSize ) { |
3773 | 0 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:177:21-177:52"); |
3774 | 0 | nBytesToProcess = hlt_internal_pe_ImageFile::PE::MaxSectionSize; |
3775 | 0 | } |
3776 | 3.67k | else { |
3777 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:179:21-179:54"); |
3778 | 3.67k | nBytesToProcess = ::hilti::rt::integer::safe<uint64_t>{sh.sizeOfRawData.value()}; |
3779 | 3.67k | } |
3780 | | |
3781 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:182:17-182:99"); |
3782 | 3.67k | ::hilti::rt::Bytes sectionBytes = _t_dd.sub(relativeStart, relativeStart + ::hilti::rt::detail::move_non_trivial(nBytesToProcess)); |
3783 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:183:17-183:87"); |
3784 | 3.67k | ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>> sectionCount = calculateCounts(sectionBytes); |
3785 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:184:17-184:63"); |
3786 | 3.67k | (*_t_self).sectionCounts.index_assign(section_name, sectionCount); |
3787 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:185:17-185:66"); |
3788 | 3.67k | (*_t_self).sectionLengths.index_assign(section_name, sectionBytes.size()); |
3789 | 3.67k | } |
3790 | 10.4k | else { |
3791 | 10.4k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:192:17-192:71"); |
3792 | 10.4k | (*_t_self).sectionCounts.index_assign(section_name, ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>>{}); |
3793 | 10.4k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:193:17-193:53"); |
3794 | 10.4k | (*_t_self).sectionLengths.index_assign(section_name, ::hilti::rt::integer::safe<std::uint64_t>{0U}); |
3795 | 10.4k | } |
3796 | 15.4k | } |
3797 | 2.84k | } |
3798 | | |
3799 | 3.24k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImageFile__t_on_sectionHeaders_4795231626815654563(::hilti::rt::ValueReference<ImageFile>& _t_self) { |
3800 | 3.24k | ::hilti::rt::detail::checkStack(); |
3801 | 3.24k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:119:9-119:48"); |
3802 | 3.24k | (*_t_self).peFileFormat = (*_t_self).optHeader.value().magic.value(); |
3803 | 3.24k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:121:9-125:71"); |
3804 | 3.24k | ::hilti::rt::integer::safe<uint64_t> off = hlt_internal_pe_ImageFile::PE::DOS_HeaderSize + (*_t_self).dosStubSize + hlt_internal_pe_ImageFile::PE::PE_HeaderSize + (((*_t_self).peFileFormat == hlt_internal_pe_ImageFile::PE::PE32 ? hlt_internal_pe_ImageFile::PE::OptionalHeaderSize32 : hlt_internal_pe_ImageFile::PE::OptionalHeaderSize64)) + ::hilti::rt::integer::safe<uint64_t>{(*_t_self).optHeader.value().numberOfRvaAndSizes.value()} * hlt_internal_pe_ImageFile::PE::DataDirectorySize + ::hilti::rt::integer::safe<uint64_t>{(*_t_self).peHeader.value().numberOfSections.value()} * hlt_internal_pe_ImageFile::PE::SectionHeaderSize; |
3805 | 3.24k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:127:9-128:68"); |
3806 | 3.24k | if ( off < ::hilti::rt::integer::safe<uint64_t>{(*_t_self).optHeader.value().sizeOfHeaders.value()} ) { |
3807 | 1.22k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:128:13-128:67"); |
3808 | 1.22k | (*_t_self).headerPadSize = ::hilti::rt::integer::safe<uint64_t>{(*_t_self).optHeader.value().sizeOfHeaders.value()} - ::hilti::rt::detail::move_non_trivial(off); |
3809 | 1.22k | } |
3810 | | |
3811 | 3.24k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:130:9-136:13"); |
3812 | 21.3k | for ( const auto& sh : (*_t_self).sectionHeaders.value() ) { |
3813 | 21.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:132:13-132:63"); |
3814 | 21.3k | ::hilti::rt::integer::safe<uint32_t> max = sh.sizeOfRawData.value() + sh.pointerToRawData.value(); |
3815 | 21.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:134:13-135:36"); |
3816 | 21.3k | if ( ::hilti::rt::integer::safe<uint64_t>{max} > (*_t_self).fileSize ) { |
3817 | 3.69k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:135:17-135:35"); |
3818 | 3.69k | (*_t_self).fileSize = ::hilti::rt::integer::safe<uint64_t>{max}; |
3819 | 3.69k | } |
3820 | 21.3k | } |
3821 | | |
3822 | 3.24k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:138:9-139:80"); |
3823 | 3.24k | if ( ::hilti::rt::integer::safe<uint64_t>{(*_t_self).optHeader.value().sizeOfHeaders.value()} < (*_t_self).fileSize ) { |
3824 | 1.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:139:13-139:79"); |
3825 | 1.67k | (*_t_self).sectionDataSize = (*_t_self).fileSize - ::hilti::rt::integer::safe<uint64_t>{(*_t_self).optHeader.value().sizeOfHeaders.value()}; |
3826 | 1.67k | } |
3827 | | |
3828 | 3.24k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:141:9-145:13"); |
3829 | 3.24k | if ( (*_t_self).fileSize <= hlt_internal_pe_ImageFile::PE::MaxFileSize ) { |
3830 | 3.10k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:143:13-143:64"); |
3831 | 3.10k | (*_t_self).exportDirInfo = dirInfo(_t_self, PE::Dir{PE::Dir::ExportTable}); |
3832 | 3.10k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:144:13-144:64"); |
3833 | 3.10k | (*_t_self).importDirInfo = dirInfo(_t_self, PE::Dir{PE::Dir::ImportTable}); |
3834 | 3.10k | } |
3835 | 3.24k | } |
3836 | | |
3837 | 83.9k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImportDirectoryTableEntry__t_on_dllNameRVA_7393877628318478425(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self) { |
3838 | 83.9k | ::hilti::rt::detail::checkStack(); |
3839 | 83.9k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:439:21-439:59"); |
3840 | 83.9k | (*_t_self).dllNameOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3841 | 83.9k | } |
3842 | | |
3843 | 84.1k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImportDirectoryTableEntry__t_on_importLookupTableRVA_11682872924627088656(const ::hilti::rt::integer::safe<uint32_t>& _t_dd, ::hilti::rt::ValueReference<ImportDirectoryTableEntry>& _t_self) { |
3844 | 84.1k | ::hilti::rt::detail::checkStack(); |
3845 | 84.1k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:438:31-438:65"); |
3846 | 84.1k | (*_t_self).iltOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), _t_dd); |
3847 | 84.1k | } |
3848 | | |
3849 | 5.81M | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImportLookupTableEntry__t_on__anon_12_11706521456759738858(::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self) { |
3850 | 5.81M | ::hilti::rt::detail::checkStack(); |
3851 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:507:9-508:67"); |
3852 | 5.81M | if ( (*_t_self).importByName ) { |
3853 | 2.15M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:508:13-508:66"); |
3854 | 2.15M | (*_t_self).hintNameOffset = rvaToOffset(_t_self->_t_p_f.derefAsValue(), (*_t_self).hintNameRVA); |
3855 | 2.15M | } |
3856 | 5.81M | } |
3857 | | |
3858 | 5.50M | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImportLookupTableEntry__t_on_f32_16840447557779063112(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>, ::hilti::rt::integer::safe<uint32_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self) { |
3859 | 5.50M | ::hilti::rt::detail::checkStack(); |
3860 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:486:13-486:45"); |
3861 | 5.50M | (*_t_self).full = ::hilti::rt::integer::safe<uint64_t>{(::hilti::rt::tuple::get<0>(_t_dd.value))}; |
3862 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:487:13-487:61"); |
3863 | 5.50M | (*_t_self).importByName = ! (::hilti::rt::Bool{static_cast<bool>((::hilti::rt::tuple::get<1>(_t_dd.value)))}); |
3864 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:488:13-488:51"); |
3865 | 5.50M | static_cast<::hilti::rt::integer::safe<uint16_t>>((::hilti::rt::tuple::get<2>(_t_dd.value))); |
3866 | 5.50M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:489:13-489:59"); |
3867 | 5.50M | (*_t_self).hintNameRVA = (::hilti::rt::tuple::get<3>(_t_dd.value)); |
3868 | 5.50M | } |
3869 | | |
3870 | 308k | extern void hlt_internal_pe_ImageFile::PE::_t_hook_ImportLookupTableEntry__t_on_f64_16358586801730322580(const ::hilti::rt::Bitfield<::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>, ::hilti::rt::integer::safe<uint64_t>>& _t_dd, ::hilti::rt::ValueReference<ImportLookupTableEntry>& _t_self) { |
3871 | 308k | ::hilti::rt::detail::checkStack(); |
3872 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:498:13-498:45"); |
3873 | 308k | (*_t_self).full = (::hilti::rt::tuple::get<0>(_t_dd.value)); |
3874 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:499:13-499:61"); |
3875 | 308k | (*_t_self).importByName = ! (::hilti::rt::Bool{static_cast<bool>((::hilti::rt::tuple::get<1>(_t_dd.value)))}); |
3876 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:500:13-500:51"); |
3877 | 308k | static_cast<::hilti::rt::integer::safe<uint16_t>>((::hilti::rt::tuple::get<2>(_t_dd.value))); |
3878 | 308k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:501:13-501:59"); |
3879 | 308k | (*_t_self).hintNameRVA = static_cast<::hilti::rt::integer::safe<uint32_t>>((::hilti::rt::tuple::get<3>(_t_dd.value))); |
3880 | 308k | } |
3881 | | |
3882 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_init_module() { |
3883 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_DOS_Header(); |
3884 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_DataDirectory(); |
3885 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportAddressTable(); |
3886 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportAddressTableEntry(); |
3887 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportDirectoryTable(); |
3888 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportNamePtrTable(); |
3889 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportNamePtrTableEntry(); |
3890 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportOrdinalTable(); |
3891 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_HintName(); |
3892 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ImageFile(); |
3893 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportDirectoryTable(); |
3894 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportDirectoryTableEntry(); |
3895 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportLookupTable(); |
3896 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportLookupTableEntry(); |
3897 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_NullTerminatedString(); |
3898 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_OptionalHeader(); |
3899 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_PE_Header(); |
3900 | 1 | hlt_internal_pe_ImageFile::PE::_t_register_PE_SectionHeader(); |
3901 | 1 | } |
3902 | | |
3903 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_DOS_Header() { ::hilti::rt::detail::checkStack(); } |
3904 | | |
3905 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_DataDirectory() { ::hilti::rt::detail::checkStack(); } |
3906 | | |
3907 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportAddressTable() { ::hilti::rt::detail::checkStack(); } |
3908 | | |
3909 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportAddressTableEntry() { ::hilti::rt::detail::checkStack(); } |
3910 | | |
3911 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportDirectoryTable() { ::hilti::rt::detail::checkStack(); } |
3912 | | |
3913 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportNamePtrTable() { ::hilti::rt::detail::checkStack(); } |
3914 | | |
3915 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportNamePtrTableEntry() { ::hilti::rt::detail::checkStack(); } |
3916 | | |
3917 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ExportOrdinalTable() { ::hilti::rt::detail::checkStack(); } |
3918 | | |
3919 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_HintName() { ::hilti::rt::detail::checkStack(); } |
3920 | | |
3921 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ImageFile() { |
3922 | 1 | ::hilti::rt::detail::checkStack(); |
3923 | 1 | PE::ImageFile::_t_parser = ::spicy::rt::Parser{::hilti::rt::struct_::tag::Inits(), "PE::ImageFile"sv, ::hilti::rt::Bool{true}, hlt_pe_ImageFile::PE::ImageFile::parse1, hlt_pe_ImageFile::PE::ImageFile::parse2, hlt_pe_ImageFile::PE::ImageFile::parse3, ::hilti::rt::Null{}, &type_info::_t_ti_PE__ImageFile_namex2aPE__ImageFilex2b, "Parses the Portable Executable (PE) image file format"_hs, ::hilti::rt::Vector<::spicy::rt::MIMEType>({::spicy::rt::MIMEType{"application/x-dosexec"_hs}}), ::hilti::rt::Vector<::spicy::rt::ParserPort>({})}; |
3924 | 1 | ::spicy::rt::detail::registerParser(PE::ImageFile::_t_parser, hlt_internal_pe_ImageFile_hlto_scope, ::hilti::rt::StrongReference<hlt_internal_pe_ImageFile::PE::ImageFile>{}, &type_info::_t_ti_strong_ref_const_PE__ImageFile__strong_refx2anamex2aPE__ImageFilex2bx2b); |
3925 | 1 | } |
3926 | | |
3927 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportDirectoryTable() { ::hilti::rt::detail::checkStack(); } |
3928 | | |
3929 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportDirectoryTableEntry() { ::hilti::rt::detail::checkStack(); } |
3930 | | |
3931 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportLookupTable() { ::hilti::rt::detail::checkStack(); } |
3932 | | |
3933 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_ImportLookupTableEntry() { ::hilti::rt::detail::checkStack(); } |
3934 | | |
3935 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_NullTerminatedString() { ::hilti::rt::detail::checkStack(); } |
3936 | | |
3937 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_OptionalHeader() { ::hilti::rt::detail::checkStack(); } |
3938 | | |
3939 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_PE_Header() { ::hilti::rt::detail::checkStack(); } |
3940 | | |
3941 | 1 | extern void hlt_internal_pe_ImageFile::PE::_t_register_PE_SectionHeader() { ::hilti::rt::detail::checkStack(); } |
3942 | | |
3943 | 2 | extern void hlt_internal_pe_ImageFile::PE::_t_register_module() { |
3944 | 2 | ::hilti::rt::Library::setScope(&hlt_internal_pe_ImageFile_hlto_scope); |
3945 | 2 | ::hilti::rt::detail::registerModule({ "PE", hlt_internal_pe_ImageFile_hlto_scope, &_t_init_module, nullptr, nullptr, nullptr}); |
3946 | 2 | } |
3947 | | |
3948 | 3.67k | static auto hlt_internal_pe_ImageFile::PE::calculateCounts(const ::hilti::rt::Bytes& bts) -> ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>> { |
3949 | 3.67k | ::hilti::rt::detail::checkStack(); |
3950 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:455:9-455:41"); |
3951 | 3.67k | ::hilti::rt::Map<::hilti::rt::integer::safe<uint8_t>, ::hilti::rt::integer::safe<uint64_t>> counts; |
3952 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:457:9-464:9"); |
3953 | | |
3954 | 3.67k | { |
3955 | 3.67k | auto _t_seq = bts; |
3956 | 19.1M | for ( const auto& b : ::hilti::rt::range(_t_seq) ) { |
3957 | 19.1M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:458:13-463:13"); |
3958 | 19.1M | if ( counts.contains(b) ) { |
3959 | 19.0M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:459:17-459:41"); |
3960 | 19.0M | counts.index_assign(b, counts[b] + ::hilti::rt::integer::safe<std::uint64_t>{1U}); |
3961 | 19.0M | } |
3962 | 164k | else { |
3963 | 164k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:462:17-462:29"); |
3964 | 164k | counts.index_assign(b, ::hilti::rt::integer::safe<std::uint64_t>{1U}); |
3965 | 164k | } |
3966 | 19.1M | } |
3967 | 3.67k | } |
3968 | | |
3969 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:465:9-465:22"); |
3970 | 3.67k | return counts; |
3971 | 3.67k | } |
3972 | | |
3973 | 25.0k | static auto hlt_internal_pe_ImageFile::PE::checkpointOffset(const ::hilti::rt::stream::SafeConstIterator& it, ::hilti::rt::Set<::hilti::rt::integer::safe<uint64_t>>& state, const ::hilti::rt::integer::safe<uint64_t>& max_states) -> ::hilti::rt::stream::SafeConstIterator { |
3974 | 25.0k | ::hilti::rt::detail::checkStack(); |
3975 | 25.0k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:66:5-67:73"); |
3976 | 25.0k | if ( state.size() >= max_states ) { |
3977 | 2 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:67:9-67:73"); |
3978 | 2 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("Cannot track more than %d offsets, aborting"_hs, max_states), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:67:9-67:73"}; |
3979 | 2 | } |
3980 | | |
3981 | 25.0k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:68:5-68:31"); |
3982 | 25.0k | ::hilti::rt::integer::safe<uint64_t> offset = it.offset(); |
3983 | 25.0k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:70:5-71:92"); |
3984 | 25.0k | if ( state.contains(offset) ) { |
3985 | 727 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:71:9-71:92"); |
3986 | 727 | throw ::spicy::rt::ParseError{::hilti::rt::fmt("Potential infinite pointer loop, offset %d was consumed previously"_hs, offset), "/src/spicy/spicy-pe/analyzer/analyzer.spicy:71:9-71:92"}; |
3987 | 727 | } |
3988 | | |
3989 | 24.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:73:5-73:22"); |
3990 | 24.3k | state.insert(::hilti::rt::detail::move_non_trivial(offset)); |
3991 | 24.3k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:74:5-74:14"); |
3992 | 24.3k | return it; |
3993 | 25.0k | } |
3994 | | |
3995 | 6.19k | static auto hlt_internal_pe_ImageFile::PE::dirInfo(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& f, const PE::Dir& d) -> ::hilti::rt::Tuple<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>, ::hilti::rt::integer::safe<uint64_t>> { |
3996 | 6.19k | ::hilti::rt::detail::checkStack(); |
3997 | 6.19k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:540:5-540:31"); |
3998 | 6.19k | ::hilti::rt::integer::safe<uint64_t> di = static_cast<::hilti::rt::integer::safe<uint64_t>>(d.value()); |
3999 | 6.19k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:542:5-543:25"); |
4000 | 6.19k | if ( di >= ::hilti::rt::integer::safe<uint64_t>{(*f).optHeader.value().numberOfRvaAndSizes.value()} ) { |
4001 | 2.30k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:543:9-543:25"); |
4002 | 2.30k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>{}), ::hilti::rt::optional::make(::hilti::rt::integer::safe<std::uint64_t>{0U})); |
4003 | 2.30k | } |
4004 | | |
4005 | 3.89k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:545:5-545:47"); |
4006 | 3.89k | hlt_internal_pe_ImageFile::PE::DataDirectory dd = (*f).optHeader.value().dataDirectories.value()[::hilti::rt::detail::move_non_trivial(di)]; |
4007 | 3.89k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:546:5-546:37"); |
4008 | 3.89k | ::hilti::rt::integer::safe<uint32_t> dirRVA = dd.virtualAddress.value(); |
4009 | 3.89k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:547:5-547:28"); |
4010 | 3.89k | ::hilti::rt::integer::safe<uint32_t> dirSize = ::hilti::rt::detail::move_non_trivial(dd).size.value(); |
4011 | 3.89k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:548:5-548:42"); |
4012 | 3.89k | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> dirOff = rvaToOffset(f, ::hilti::rt::detail::move_non_trivial(dirRVA)); |
4013 | 3.89k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:550:5-550:29"); |
4014 | 3.89k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(dirOff), ::hilti::rt::optional::make(::hilti::rt::integer::safe<uint64_t>{dirSize})); |
4015 | 6.19k | } |
4016 | | |
4017 | 2.69M | static auto hlt_internal_pe_ImageFile::PE::getSectionForRVA(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& f, const ::hilti::rt::integer::safe<uint32_t>& rva) -> ::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::SectionHeader> { |
4018 | 2.69M | ::hilti::rt::detail::checkStack(); |
4019 | 2.69M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:530:5-533:22"); |
4020 | | |
4021 | 2.69M | { |
4022 | 2.69M | auto _t_seq = (*f).sectionHeaders.value(); |
4023 | 9.96M | for ( const auto& sh : ::hilti::rt::range(_t_seq) ) { |
4024 | 9.96M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:531:9-533:22"); |
4025 | 9.96M | if ( (sh.virtualAddress.value() <= rva) && (sh.virtualAddress.value() + sh.sizeOfRawData.value() > rva) ) { |
4026 | 74.0k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:533:13-533:22"); |
4027 | 74.0k | return ::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::SectionHeader>(sh); |
4028 | 74.0k | } |
4029 | 9.96M | } |
4030 | 2.69M | } |
4031 | | |
4032 | 2.62M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:535:5-535:16"); |
4033 | 2.62M | return ::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::SectionHeader>{}; |
4034 | 2.69M | } |
4035 | | |
4036 | 83.2k | static auto hlt_internal_pe_ImageFile::PE::isNull(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry>& e) -> ::hilti::rt::Bool { |
4037 | 83.2k | ::hilti::rt::detail::checkStack(); |
4038 | 83.2k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:447:5-449:40"); |
4039 | 83.2k | return (((((*e).importLookupTableRVA.value() == ::hilti::rt::integer::safe<std::uint32_t>{0U}) && ((*e).timeDateStamp.value() == ::hilti::rt::integer::safe<std::uint32_t>{0U})) && ((*e).forwarderChain.value() == ::hilti::rt::integer::safe<std::uint32_t>{0U})) && ((*e).dllNameRVA.value() == ::hilti::rt::integer::safe<std::uint32_t>{0U})) && ((*e).importAddressTableRVA.value() == ::hilti::rt::integer::safe<std::uint32_t>{0U}); |
4040 | 83.2k | } |
4041 | | |
4042 | 5.81M | static auto hlt_internal_pe_ImageFile::PE::isNull(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry>& e) -> ::hilti::rt::Bool { |
4043 | 5.81M | ::hilti::rt::detail::checkStack(); |
4044 | 5.81M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:519:7-519:25"); |
4045 | 5.81M | return (*e).full == ::hilti::rt::integer::safe<std::uint64_t>{0U}; |
4046 | 5.81M | } |
4047 | | |
4048 | 916 | static auto hlt_internal_pe_ImageFile::PE::min(const ::hilti::rt::integer::safe<uint64_t>& a, const ::hilti::rt::integer::safe<uint64_t>& b) -> ::hilti::rt::integer::safe<uint64_t> { |
4049 | 916 | ::hilti::rt::detail::checkStack(); |
4050 | 916 | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:565:7-565:27"); |
4051 | 916 | return (a < b ? a : b); |
4052 | 916 | } |
4053 | | |
4054 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::DOS_Header& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4055 | | |
4056 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::DataDirectory& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4057 | | |
4058 | 0 | inline auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, Dir x) -> std::ostream& { o << ::hilti::rt::to_string(x); return o; } |
4059 | | |
4060 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::HintName& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4061 | | |
4062 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::OptionalHeader& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4063 | | |
4064 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::PE_Header& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4065 | | |
4066 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::SectionHeader& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4067 | | |
4068 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportLookupTableEntry& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4069 | | |
4070 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImageFile& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4071 | | |
4072 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportLookupTable& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4073 | | |
4074 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportDirectoryTableEntry& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4075 | | |
4076 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ImportDirectoryTable& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4077 | | |
4078 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportDirectoryTable& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4079 | | |
4080 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportAddressTable& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4081 | | |
4082 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportAddressTableEntry& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4083 | | |
4084 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportNamePtrTable& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4085 | | |
4086 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportNamePtrTableEntry& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4087 | | |
4088 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::ExportOrdinalTable& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4089 | | |
4090 | 0 | extern auto hlt_internal_pe_ImageFile::PE::operator<<(std::ostream& o, const hlt_internal_pe_ImageFile::PE::NullTerminatedString& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
4091 | | |
4092 | 2.69M | static auto hlt_internal_pe_ImageFile::PE::rvaToOffset(const ::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& f, const ::hilti::rt::integer::safe<uint32_t>& rva) -> ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> { |
4093 | 2.69M | ::hilti::rt::detail::checkStack(); |
4094 | 2.69M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:555:5-555:43"); |
4095 | 2.69M | ::hilti::rt::Optional<hlt_internal_pe_ImageFile::PE::SectionHeader> optSH = getSectionForRVA(f, rva); |
4096 | 2.69M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:557:5-558:20"); |
4097 | 2.69M | if ( ! (optSH.hasValue()) ) { |
4098 | 2.62M | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:558:9-558:20"); |
4099 | 2.62M | return ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>{}; |
4100 | 2.62M | } |
4101 | | |
4102 | 74.1k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:560:5-560:22"); |
4103 | 74.1k | hlt_internal_pe_ImageFile::PE::SectionHeader sh = ::hilti::rt::detail::move_non_trivial(optSH).value(); |
4104 | 74.1k | ::hilti::rt::location("/src/spicy/spicy-pe/analyzer/analyzer.spicy:561:5-561:59"); |
4105 | 74.1k | return ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(::hilti::rt::integer::safe<uint64_t>{sh.pointerToRawData.value() + (rva - sh.virtualAddress.value())}); |
4106 | 2.69M | } |
4107 | | |
4108 | 4.23k | auto hlt_pe_ImageFile::PE::ImageFile::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
4109 | 4.23k | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
4110 | 4.23k | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
4111 | 4.23k | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
4112 | 4.23k | return hlt_internal_pe_ImageFile::PE::ImageFile::parse1(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap)); |
4113 | 4.23k | }; |
4114 | | |
4115 | 4.23k | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
4116 | 4.23k | r->run(); |
4117 | 4.23k | return std::move(*r); |
4118 | 4.23k | } |
4119 | | |
4120 | 0 | auto hlt_pe_ImageFile::PE::ImageFile::parse2(::hilti::rt::ValueReference<hlt_internal_pe_ImageFile::PE::ImageFile>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
4121 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_unit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
4122 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
4123 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
4124 | 0 | return hlt_internal_pe_ImageFile::PE::ImageFile::parse2(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
4125 | 0 | }; |
4126 | |
|
4127 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
4128 | 0 | r->run(); |
4129 | 0 | return std::move(*r); |
4130 | 0 | } |
4131 | | |
4132 | 0 | auto hlt_pe_ImageFile::PE::ImageFile::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
4133 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_gunit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
4134 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
4135 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
4136 | 0 | return hlt_internal_pe_ImageFile::PE::ImageFile::parse3(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
4137 | 0 | }; |
4138 | |
|
4139 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
4140 | 0 | r->run(); |
4141 | 0 | return std::move(*r); |
4142 | 0 | } |
4143 | | |