LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
PE/Binary.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_PE_BINARY_H
17#define LIEF_PE_BINARY_H
18
19#include "LIEF/PE/Header.hpp"
21#include "LIEF/PE/DosHeader.hpp"
22#include "LIEF/PE/Import.hpp"
24#include "LIEF/PE/Symbol.hpp"
28
30
31#include "LIEF/visibility.h"
32
33namespace LIEF {
34
36namespace PE {
37class Builder;
38class CodeViewPDB;
39class Debug;
40class Export;
41class LoadConfiguration;
42class Parser;
43class Relocation;
44class ResourceData;
45class ResourceDirectory;
46class ResourceNode;
47class RichHeader;
48class TLS;
49
53 friend class Parser;
54 friend class Builder;
55
56 public:
58 using sections_t = std::vector<std::unique_ptr<Section>>;
59
62
65
67 using data_directories_t = std::vector<std::unique_ptr<DataDirectory>>;
68
71
74
76 using relocations_t = std::vector<std::unique_ptr<Relocation>>;
77
80
83
85 using imports_t = std::vector<Import>;
86
89
92
94 using delay_imports_t = std::vector<DelayImport>;
95
98
101
103 using debug_entries_t = std::vector<std::unique_ptr<Debug>>;
104
107
110
112 using symbols_t = std::vector<Symbol>;
113
116
119
121 using strings_table_t = std::vector<std::string>;
122
125
128
130 using signatures_t = std::vector<Signature>;
131
134
137
139
140 ~Binary() override;
141
143 PE_TYPE type() const {
144 return type_;
145 }
146
151 uint64_t rva_to_offset(uint64_t RVA) const;
152
155 uint64_t va_to_offset(uint64_t VA) const;
156
161 result<uint64_t> offset_to_virtual_address(uint64_t offset, uint64_t slide = 0) const override;
162
166 uint64_t imagebase() const override {
167 return optional_header().imagebase();
168 }
169
173 Section* section_from_offset(uint64_t offset);
174 const Section* section_from_offset(uint64_t offset) const;
175
179 Section* section_from_rva(uint64_t virtual_address);
180 const Section* section_from_rva(uint64_t virtual_address) const;
181
184 return sections_;
185 }
186
188 return sections_;
189 }
190
193 return dos_header_;
194 }
195
196 const DosHeader& dos_header() const {
197 return dos_header_;
198 }
199
202 return header_;
203 }
204
205 const Header& header() const {
206 return header_;
207 }
208
212 return optional_header_;
213 }
214
216 return optional_header_;
217 }
218
224 uint32_t compute_checksum() const;
225
228 uint64_t virtual_size() const;
229
231 uint32_t sizeof_headers() const;
232
234 TLS* tls() {
235 return tls_.get();
236 }
237
238 const TLS* tls() const {
239 return tls_.get();
240 }
241
243 void tls(const TLS& tls);
244
246 bool has_tls() const {
247 return tls_ != nullptr;
248 }
249
253 bool has_imports() const {
254 return !imports_.empty();
255 }
256
260 bool has_signatures() const {
261 return !signatures_.empty();
262 }
263
267 bool has_exports() const {
268 return export_ != nullptr;
269 }
270
272 bool has_resources() const {
273 return resources_ != nullptr;
274 }
275
277 bool has_exceptions() const;
278
282 bool has_relocations() const {
283 return !relocations_.empty();
284 }
285
287 bool has_debug() const {
288 return !debug_.empty();
289 }
290
292 bool has_configuration() const {
293 return load_configuration_ != nullptr;
294 }
295
300
303 return signatures_;
304 }
305
307 return signatures_;
308 }
309
318 Signature::VERIFICATION_CHECKS checks = Signature::VERIFICATION_CHECKS::DEFAULT) const;
319
330 Signature::VERIFICATION_CHECKS checks = Signature::VERIFICATION_CHECKS::DEFAULT) const;
331
334 std::vector<uint8_t> authentihash(ALGORITHMS algo) const;
335
348 uint32_t predict_function_rva(const std::string& library, const std::string& function);
349
352 return export_.get();
353 }
354
355 const Export* get_export() const {
356 return export_.get();
357 }
358
360 std::vector<Symbol>& symbols() {
361 return symbols_;
362 }
363
364 const std::vector<Symbol>& symbols() const {
365 return symbols_;
366 }
367
370 return resources_.get();
371 }
372
373 const ResourceNode* resources() const {
374 return resources_.get();
375 }
376
378 void set_resources(const ResourceDirectory& resource);
379
381 void set_resources(const ResourceData& resource);
382
385
390 Section* get_section(const std::string& name);
391 const Section* get_section(const std::string& name) const;
392
395 const Section* import_section() const;
397
403 void remove_section(const std::string& name, bool clear = false) override;
404
408 void remove(const Section& section, bool clear = false);
409
411 Section* add_section(const Section& section,
412 PE_SECTION_TYPES type = PE_SECTION_TYPES::UNKNOWN);
413
416 return relocations_;
417 }
418
420 return relocations_;
421 }
422
425
428
431 return data_directories_;
432 }
433
435 return data_directories_;
436 }
437
441
443 bool has(DataDirectory::TYPES type) const {
444 return data_directory(type) != nullptr;
445 }
446
449 return debug_;
450 }
451
453 return debug_;
454 }
455
457 const CodeViewPDB* codeview_pdb() const;
458
462 return load_configuration_.get();
463 }
464
466 return load_configuration_.get();
467 }
468
471 return overlay_;
472 }
473
475 return overlay_;
476 }
477
479 uint64_t overlay_offset() const {
480 return overlay_offset_;
481 }
482
485 return dos_stub_;
486 }
487
489 return dos_stub_;
490 }
491
493 void dos_stub(std::vector<uint8_t> content) {
494 dos_stub_ = std::move(content);
495 }
496
497 // Rich Header
498 // -----------
499
502 return rich_header_.get();
503 }
504
505 const RichHeader* rich_header() const {
506 return rich_header_.get();
507 }
508
510 void rich_header(const RichHeader& rich_header);
511
513 bool has_rich_header() const {
514 return rich_header_ != nullptr;
515 }
516
519 return imports_;
520 }
521
523 return imports_;
524 }
525
530 Import* get_import(const std::string& import_name);
531 const Import* get_import(const std::string& import_name) const;
532
536 bool has_import(const std::string& import_name) const {
537 return get_import(import_name) != nullptr;
538 }
539
544 bool has_delay_imports() const {
545 return !delay_imports_.empty();
546 }
547
550 return delay_imports_;
551 }
552
554 return delay_imports_;
555 }
556
561 DelayImport* get_delay_import(const std::string& import_name);
562 const DelayImport* get_delay_import(const std::string& import_name) const;
563
564
568 bool has_delay_import(const std::string& import_name) const {
569 return get_delay_import(import_name) != nullptr;
570 }
571
572
578 ImportEntry* add_import_function(const std::string& library, const std::string& function);
579
581 Import& add_library(const std::string& name) {
582 imports_.emplace_back(name);
583 return imports_.back();
584 }
585
587 void remove_library(const std::string& name);
588
591 imports_.clear();
592 }
593
598 void write(const std::string& filename) override;
599
604 void write(std::ostream& os) override;
605
606 void accept(Visitor& visitor) const override;
607
613 void patch_address(uint64_t address, const std::vector<uint8_t>& patch_value,
615
616
623 void patch_address(uint64_t address, uint64_t patch_value, size_t size = sizeof(uint64_t),
625
632 uint64_t virtual_address, uint64_t size,
633 Binary::VA_TYPES addr_type = Binary::VA_TYPES::AUTO) const override;
634
636 uint64_t entrypoint() const override {
637 return optional_header_.imagebase() + optional_header_.addressof_entrypoint();
638 }
639
641 bool is_pie() const override {
642 return optional_header_.has(OptionalHeader::DLL_CHARACTERISTICS::DYNAMIC_BASE);
643 }
644
646 bool has_nx() const override {
647 return optional_header_.has(OptionalHeader::DLL_CHARACTERISTICS::NX_COMPAT);
648 }
649
654
657
660
661 static bool classof(const LIEF::Binary* bin) {
662 return bin->format() == Binary::FORMATS::PE;
663 }
664
665 std::ostream& print(std::ostream& os) const override;
666
667 private:
668 Binary();
669
672 void make_space_for_new_section();
673
675 LIEF::Binary::symbols_t get_abstract_symbols() override;
676
677 LIEF::Header get_abstract_header() const override;
678
680 LIEF::Binary::sections_t get_abstract_sections() override;
681
682 LIEF::Binary::relocations_t get_abstract_relocations() override;
683
684 LIEF::Binary::functions_t get_abstract_exported_functions() const override;
685 LIEF::Binary::functions_t get_abstract_imported_functions() const override;
686 std::vector<std::string> get_abstract_imported_libraries() const override;
687
688 void update_lookup_address_table_offset();
689 void update_iat();
690
691 PE_TYPE type_ = PE_TYPE::PE32_PLUS;
692 DosHeader dos_header_;
693 Header header_;
694 OptionalHeader optional_header_;
695
696 int32_t available_sections_space_ = 0;
697
698 signatures_t signatures_;
699 sections_t sections_;
700 data_directories_t data_directories_;
701 symbols_t symbols_;
702 strings_table_t strings_table_;
703 relocations_t relocations_;
704 imports_t imports_;
705 delay_imports_t delay_imports_;
706 debug_entries_t debug_;
707 uint64_t overlay_offset_ = 0;
708 std::vector<uint8_t> overlay_;
709 std::vector<uint8_t> dos_stub_;
710 std::vector<uint8_t> section_offset_padding_;
711
712 std::unique_ptr<RichHeader> rich_header_;
713 std::unique_ptr<Export> export_;
714 std::unique_ptr<ResourceNode> resources_;
715 std::unique_ptr<TLS> tls_;
716 std::unique_ptr<LoadConfiguration> load_configuration_;
717};
718
719}
720}
721#endif
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:41
std::vector< Function > functions_t
Definition Abstract/Binary.hpp:59
FORMATS format() const
Executable format (ELF, PE, Mach-O) of the underlying binary.
Definition Abstract/Binary.hpp:98
std::vector< Symbol * > symbols_t
Internal container.
Definition Abstract/Binary.hpp:71
VA_TYPES
Type of a virtual address.
Definition Abstract/Binary.hpp:45
@ AUTO
Try to guess if it's relative or not.
std::vector< Section * > sections_t
Internal container.
Definition Abstract/Binary.hpp:62
std::vector< Relocation * > relocations_t
Internal container.
Definition Abstract/Binary.hpp:80
Definition Abstract/Header.hpp:29
Class which represents a PE binary This is the main interface to manage and modify a PE executable.
Definition PE/Binary.hpp:52
OptionalHeader & optional_header()
Header that follows the header(). It is named optional from the COFF specfication but it is mandatory...
Definition PE/Binary.hpp:211
void remove_all_relocations()
Remove all the relocations.
std::vector< DelayImport > delay_imports_t
Internal container for storing PE's DelayImport.
Definition PE/Binary.hpp:94
std::vector< uint8_t > authentihash(ALGORITHMS algo) const
Compute the authentihash according to the algorithm provided in the first parameter.
const LoadConfiguration * load_configuration() const
Retrun the LoadConfiguration object or a nullptr if the binary does not use the LoadConfiguration.
Definition PE/Binary.hpp:461
std::ostream & print(std::ostream &os) const override
it_const_delay_imports delay_imports() const
Definition PE/Binary.hpp:553
it_const_debug_entries debug() const
Definition PE/Binary.hpp:452
void remove_section(const std::string &name, bool clear=false) override
Delete the section with the given name.
bool is_pie() const override
Check if the binary is position independent.
Definition PE/Binary.hpp:641
LIEF::Binary::functions_t ctor_functions() const override
Return the list of the binary constructors.
std::vector< std::unique_ptr< Section > > sections_t
Internal container for storing PE's Section.
Definition PE/Binary.hpp:58
void set_resources(const ResourceDirectory &resource)
Set a new resource tree.
void dos_stub(std::vector< uint8_t > content)
Update the DOS stub content.
Definition PE/Binary.hpp:493
it_imports imports()
Return an iterator over the binary imports.
Definition PE/Binary.hpp:518
bool has_resources() const
Check if the current binary has resources.
Definition PE/Binary.hpp:272
uint32_t predict_function_rva(const std::string &library, const std::string &function)
Try to predict the RVA of the function function in the import library library
std::vector< Symbol > & symbols()
Return binary Symbols.
Definition PE/Binary.hpp:360
const ResourceNode * resources() const
Definition PE/Binary.hpp:373
bool has_debug() const
Check if the current binary contains debug information.
Definition PE/Binary.hpp:287
DelayImport * get_delay_import(const std::string &import_name)
Returns the PE::DelayImport from the given name. If it can't be found, return a nullptr.
bool has_relocations() const
Check if the current binary has relocations.
Definition PE/Binary.hpp:282
ImportEntry * add_import_function(const std::string &library, const std::string &function)
Add the function function of the library library. If the function fails, it returns a nullptr.
bool has_exports() const
Check if the current binary has exports.
Definition PE/Binary.hpp:267
uint64_t virtual_size() const
Compute the binary's virtual size. It should match OptionalHeader::sizeof_image.
std::vector< std::unique_ptr< Relocation > > relocations_t
Internal container for storing PE's Relocation.
Definition PE/Binary.hpp:76
uint64_t rva_to_offset(uint64_t RVA) const
Convert a Relative Virtual Address into an offset.
result< ResourcesManager > resources_manager() const
Return the ResourcesManager (class to manage resources more easily than the tree one)
result< uint64_t > offset_to_virtual_address(uint64_t offset, uint64_t slide=0) const override
Convert the given offset into a virtual address.
it_const_imports imports() const
Definition PE/Binary.hpp:522
const OptionalHeader & optional_header() const
Definition PE/Binary.hpp:215
it_signatures signatures()
Definition PE/Binary.hpp:306
void patch_address(uint64_t address, uint64_t patch_value, size_t size=sizeof(uint64_t), LIEF::Binary::VA_TYPES addr_type=LIEF::Binary::VA_TYPES::AUTO) override
Patch the address with the given value.
Signature::VERIFICATION_FLAGS verify_signature(const Signature &sig, Signature::VERIFICATION_CHECKS checks=Signature::VERIFICATION_CHECKS::DEFAULT) const
Verify the binary with the Signature object provided in the first parameter. It can be used to verify...
span< const uint8_t > overlay() const
Return the overlay content.
Definition PE/Binary.hpp:470
span< const uint8_t > get_content_from_virtual_address(uint64_t virtual_address, uint64_t size, Binary::VA_TYPES addr_type=Binary::VA_TYPES::AUTO) const override
Return the content located at the provided virtual address.
std::vector< Symbol > symbols_t
Internal container for storing COFF Symbols.
Definition PE/Binary.hpp:112
const DataDirectory * data_directory(DataDirectory::TYPES type) const
Section * add_section(const Section &section, PE_SECTION_TYPES type=PE_SECTION_TYPES::UNKNOWN)
Add a section to the binary and return the section added.
bool has_rich_header() const
Check if the current binary has a RichHeader object.
Definition PE/Binary.hpp:513
bool has_signatures() const
Check if the current binary contains signatures.
Definition PE/Binary.hpp:260
bool has_delay_imports() const
Check if the current binary contains delay imports.
Definition PE/Binary.hpp:544
void set_resources(const ResourceData &resource)
Set a new resource tree.
void write(std::ostream &os) override
Reconstruct the binary object and write the raw PE in os stream.
void rich_header(const RichHeader &rich_header)
Set a RichHeader object in the current Binary.
TLS * tls()
Return a reference to the TLS object.
Definition PE/Binary.hpp:234
it_const_data_directories data_directories() const
Definition PE/Binary.hpp:434
uint64_t entrypoint() const override
Return the binary's entrypoint (It is the same value as OptionalHeader::addressof_entrypoint.
Definition PE/Binary.hpp:636
std::vector< Signature > signatures_t
Internal container for storing PE's authenticode Signature.
Definition PE/Binary.hpp:130
Signature::VERIFICATION_FLAGS verify_signature(Signature::VERIFICATION_CHECKS checks=Signature::VERIFICATION_CHECKS::DEFAULT) const
Verify the binary against the embedded signature(s) (if any) First, it checks that the embedded signa...
const Import * get_import(const std::string &import_name) const
void remove_all_libraries()
Remove all libraries in the binary.
Definition PE/Binary.hpp:590
static bool classof(const LIEF::Binary *bin)
Definition PE/Binary.hpp:661
const Section * get_section(const std::string &name) const
Section * import_section()
void accept(Visitor &visitor) const override
Method so that a visitor can visit us.
LIEF::Binary::functions_t functions() const
All functions found in the binary
LIEF::Binary::functions_t exception_functions() const
Functions found in the Exception table directory.
const Section * section_from_offset(uint64_t offset) const
uint32_t compute_checksum() const
Re-compute the value of OptionalHeader::checksum. If both values do not match, it could mean that the...
const std::vector< Symbol > & symbols() const
Definition PE/Binary.hpp:364
~Binary() override
span< uint8_t > overlay()
Definition PE/Binary.hpp:474
Import & add_library(const std::string &name)
Add an imported library (i.e. DLL) to the binary.
Definition PE/Binary.hpp:581
uint64_t overlay_offset() const
Return the original overlay offset.
Definition PE/Binary.hpp:479
const DelayImport * get_delay_import(const std::string &import_name) const
Section * section_from_rva(uint64_t virtual_address)
Find the section associated that encompasses the given RVA.
const Section * import_section() const
Return the section associated with import table or a nullptr if the binary does not have an import ta...
const Export * get_export() const
Definition PE/Binary.hpp:355
PE_TYPE type() const
Return PE32 or PE32+
Definition PE/Binary.hpp:143
bool has_tls() const
Check if the current binary has a TLS object.
Definition PE/Binary.hpp:246
DataDirectory * data_directory(DataDirectory::TYPES type)
Return the DataDirectory with the given type (or index)
void remove_library(const std::string &name)
Remove the library with the given name
Section * section_from_offset(uint64_t offset)
Find the section associated that encompasses the given offset.
bool has_exceptions() const
Check if the current binary has exceptions.
it_delay_imports delay_imports()
Return an iterator over the binary's delay imports.
Definition PE/Binary.hpp:549
const RichHeader * rich_header() const
Definition PE/Binary.hpp:505
bool is_reproducible_build() const
Check if the current binary is reproducible build, replacing timestamps by a compile hash.
uint64_t va_to_offset(uint64_t VA) const
Convert the absolute virtual address into an offset.
std::vector< std::unique_ptr< DataDirectory > > data_directories_t
Internal container for storing PE's DataDirectory.
Definition PE/Binary.hpp:67
DosHeader & dos_header()
Return a reference to the PE::DosHeader object.
Definition PE/Binary.hpp:192
it_const_relocations relocations() const
Definition PE/Binary.hpp:419
const Section * section_from_rva(uint64_t virtual_address) const
std::vector< Import > imports_t
Internal container for storing PE's Import.
Definition PE/Binary.hpp:85
bool has_nx() const override
Check if the binary uses NX protection.
Definition PE/Binary.hpp:646
span< const uint8_t > dos_stub() const
Return the DOS stub content.
Definition PE/Binary.hpp:484
Header & header()
Return a reference to the PE::Header object.
Definition PE/Binary.hpp:201
Binary(PE_TYPE type)
it_relocations relocations()
Return an iterator over the PE's Relocation.
Definition PE/Binary.hpp:415
uint64_t imagebase() const override
Return binary's imagebase. 0 if not relevant.
Definition PE/Binary.hpp:166
bool has_configuration() const
Check if the current binary has a load configuration.
Definition PE/Binary.hpp:292
const CodeViewPDB * codeview_pdb() const
Return the CodeViewPDB object if present.
const TLS * tls() const
Definition PE/Binary.hpp:238
ResourceNode * resources()
Return resources as a tree or a nullptr if there is no resources.
Definition PE/Binary.hpp:369
bool has(DataDirectory::TYPES type) const
Check if the current binary has the given DataDirectory::TYPES.
Definition PE/Binary.hpp:443
LoadConfiguration * load_configuration()
Definition PE/Binary.hpp:465
uint32_t sizeof_headers() const
Compute the size of all the headers.
void tls(const TLS &tls)
Set a TLS object in the current Binary.
std::vector< std::string > strings_table_t
Internal container for storing strings.
Definition PE/Binary.hpp:121
std::vector< std::unique_ptr< Debug > > debug_entries_t
Internal container for storing Debug information.
Definition PE/Binary.hpp:103
Import * get_import(const std::string &import_name)
Returns the PE::Import from the given name. If it can't be found, return a nullptr.
it_const_signatures signatures() const
Return an iterator over the Signature object(s) if the binary is signed.
Definition PE/Binary.hpp:302
it_debug_entries debug()
Return an iterator over the Debug entries.
Definition PE/Binary.hpp:448
it_const_sections sections() const
Definition PE/Binary.hpp:187
void patch_address(uint64_t address, const std::vector< uint8_t > &patch_value, LIEF::Binary::VA_TYPES addr_type=LIEF::Binary::VA_TYPES::AUTO) override
Patch the content at virtual address address with patch_value.
bool has_delay_import(const std::string &import_name) const
True if the binary delay-imports the given library name
Definition PE/Binary.hpp:568
bool has_imports() const
Check if the current binary contains imports.
Definition PE/Binary.hpp:253
void remove(const Section &section, bool clear=false)
Remove the given section.
const Header & header() const
Definition PE/Binary.hpp:205
it_data_directories data_directories()
Return an iterator over the DataDirectory present in the Binary.
Definition PE/Binary.hpp:430
it_sections sections()
Return an iterator over the PE's Section.
Definition PE/Binary.hpp:183
Export * get_export()
Return the Export object.
Definition PE/Binary.hpp:351
span< uint8_t > dos_stub()
Definition PE/Binary.hpp:488
void write(const std::string &filename) override
Reconstruct the binary object and write the raw PE in filename
bool has_import(const std::string &import_name) const
True if the binary imports the given library name
Definition PE/Binary.hpp:536
Relocation & add_relocation(const Relocation &relocation)
Add a PE::Relocation.
Section * get_section(const std::string &name)
Return binary's section from its name. If the secion can't be found, return a nullptr.
RichHeader * rich_header()
Return a reference to the RichHeader object.
Definition PE/Binary.hpp:501
const DosHeader & dos_header() const
Definition PE/Binary.hpp:196
Class that is used to rebuild a raw PE binary from a PE::Binary object.
Definition PE/Builder.hpp:45
CodeView PDB specialization.
Definition CodeViewPDB.hpp:34
Class that represents a PE data directory entry.
Definition DataDirectory.hpp:38
TYPES
Definition DataDirectory.hpp:47
Class that represents a PE delayed import.
Definition DelayImport.hpp:36
Class which represents the DosHeader, the first structure presents at the beginning of a PE file.
Definition DosHeader.hpp:38
Class which represents a PE Export.
Definition Export.hpp:38
Class that represents the PE header (which follows the DosHeader)
Definition PE/Header.hpp:36
Class that represents an entry (i.e. an import) in the import table (Import).
Definition ImportEntry.hpp:36
Class that represents a PE import.
Definition Import.hpp:39
Class that represents the default PE's LoadConfiguration
Definition LoadConfiguration.hpp:35
Class which represents the PE OptionalHeader structure.
Definition OptionalHeader.hpp:42
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:47
Class which represents the Base Relocation Block We usually find this structure in the ....
Definition PE/Relocation.hpp:37
Class which represents a Data Node in the PE resources tree.
Definition ResourceData.hpp:32
Definition ResourceDirectory.hpp:33
Class which represents a Node in the resource tree.
Definition ResourceNode.hpp:36
Class which represents the not-so-documented rich header.
Definition RichHeader.hpp:37
Class which represents a PE section.
Definition PE/Section.hpp:40
Main interface for the PKCS #7 signature scheme.
Definition Signature.hpp:39
VERIFICATION_CHECKS
Flags to tweak the verification process of the signature.
Definition Signature.hpp:91
VERIFICATION_FLAGS
Flags returned by the verification functions.
Definition Signature.hpp:68
Class which represents the PE Thread Local Storage.
Definition TLS.hpp:42
Definition Visitor.hpp:224
Iterator which returns reference on container's values.
Definition iterators.hpp:48
PE_SECTION_TYPES
Common section type.
Definition PE/enums.hpp:666
ALGORITHMS
Cryptography algorithms.
Definition PE/enums.hpp:686
PE_TYPE
Definition PE/enums.hpp:680
LIEF namespace.
Definition Abstract/Binary.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:74
#define LIEF_API
Definition visibility.h:41