16#ifndef LIEF_PE_BINARY_H
17#define LIEF_PE_BINARY_H
64 using sections_t = std::vector<std::unique_ptr<Section>>;
91 using imports_t = std::vector<std::unique_ptr<Import>>;
118 using symbols_t = std::vector<std::unique_ptr<COFF::Symbol>>;
191 return const_cast<Section*
>(
static_cast<const Binary*
>(
this)->section_from_offset(offset));
199 return const_cast<Section*
>(
static_cast<const Binary*
>(
this)->section_from_rva(virtual_address));
233 return optional_header_;
237 return optional_header_;
268 return tls_ !=
nullptr;
278 return !imports_.empty();
285 return !signatures_.empty();
292 return export_ !=
nullptr;
297 return resources_ !=
nullptr;
309 return !relocations_.empty();
314 return !debug_.empty();
319 return loadconfig_ !=
nullptr;
365 return export_.get();
369 return export_.get();
385 return strings_table_;
389 return strings_table_;
397 auto it = std::find_if(strings_table_.begin(), strings_table_.end(),
399 return offset == item.offset();
402 return it == strings_table_.end() ? nullptr : &*it;
411 return resources_.get();
415 return resources_.get();
432 return const_cast<Section*
>(
static_cast<const Binary*
>(
this)->get_section(name));
440 return const_cast<Section*
>(
static_cast<const Binary*
>(
this)->import_section());
475 return data_directories_;
479 return data_directories_;
517 return loadconfig_.get();
521 return loadconfig_.get();
535 return overlay_offset_;
549 dos_stub_ = std::move(content);
554 return rich_header_.get();
558 return rich_header_.get();
566 return rich_header_ !=
nullptr;
582 return const_cast<Import*
>(
static_cast<const Binary*
>(
this)->get_import(import_name));
594 return !delay_imports_.empty();
599 return delay_imports_;
603 return delay_imports_;
609 return const_cast<DelayImport*
>(
static_cast<const Binary*
>(
this)->get_delay_import(import_name));
621 imports_.push_back(std::unique_ptr<Import>(
new Import(name)));
622 return *imports_.back();
636 std::unique_ptr<Builder>
write(
const std::string& filename) {
642 std::unique_ptr<Builder>
write(
const std::string& filename,
649 std::unique_ptr<Builder>
write(std::ostream& os) {
653 std::unique_ptr<Builder>
write(std::ostream& os,
663 void patch_address(uint64_t address,
const std::vector<uint8_t>& patch_value,
673 void patch_address(uint64_t address, uint64_t patch_value,
size_t size =
sizeof(uint64_t),
687 uint64_t virtual_address, uint64_t size,
692 return optional_header_.imagebase() + optional_header_.addressof_entrypoint();
860 return nested_.get();
864 return nested_.get();
871 std::ostream&
print(std::ostream& os)
const override;
877 LIEF_LOCAL std::unique_ptr<Binary> move_nested_pe_binary() {
878 auto ret = std::move(nested_);
884 struct sizing_info_t {
885 uint32_t nb_tls_callbacks = 0;
886 uint32_t load_config_size = 0;
907 std::vector<std::string> get_abstract_imported_libraries()
const override;
909 void update_lookup_address_table_offset();
911 void shift(uint64_t from, uint64_t by);
913 PE_TYPE type_ = PE_TYPE::PE32_PLUS;
914 DosHeader dos_header_;
916 OptionalHeader optional_header_;
918 int32_t available_sections_space_ = 0;
920 signatures_t signatures_;
921 sections_t sections_;
922 data_directories_t data_directories_;
924 strings_table_t strings_table_;
925 relocations_t relocations_;
927 delay_imports_t delay_imports_;
928 debug_entries_t debug_;
929 exceptions_t exceptions_;
930 uint64_t overlay_offset_ = 0;
931 std::vector<uint8_t> overlay_;
932 std::vector<uint8_t> dos_stub_;
933 std::vector<uint8_t> section_offset_padding_;
935 std::unique_ptr<RichHeader> rich_header_;
936 std::unique_ptr<Export> export_;
937 std::unique_ptr<ResourceNode> resources_;
938 std::unique_ptr<TLS> tls_;
939 std::unique_ptr<LoadConfiguration> loadconfig_;
940 std::unique_ptr<Binary> nested_;
942 sizing_info_t sizing_info_;
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:53
std::vector< Function > functions_t
Definition Abstract/Binary.hpp:71
@ PE
Definition Abstract/Binary.hpp:66
FORMATS format() const
Executable format (ELF, PE, Mach-O) of the underlying binary.
Definition Abstract/Binary.hpp:113
std::vector< Symbol * > symbols_t
Internal container.
Definition Abstract/Binary.hpp:83
VA_TYPES
Type of a virtual address.
Definition Abstract/Binary.hpp:57
@ VA
Absolute.
Definition Abstract/Binary.hpp:60
@ RVA
Relative.
Definition Abstract/Binary.hpp:59
@ AUTO
Try to guess if it's relative or not.
Definition Abstract/Binary.hpp:58
std::vector< Section * > sections_t
Internal container.
Definition Abstract/Binary.hpp:74
std::vector< Relocation * > relocations_t
Internal container.
Definition Abstract/Binary.hpp:92
This class represents a string located in the COFF string table.
Definition String.hpp:33
OptionalHeader & optional_header()
Header that follows the header(). It is named optional from the COFF specfication but it is mandatory...
Definition PE/Binary.hpp:232
ref_iterator< sections_t &, Section * > it_sections
Iterator that outputs Section& object.
Definition PE/Binary.hpp:67
const DataDirectory * export_dir() const
Definition PE/Binary.hpp:712
std::vector< std::unique_ptr< DelayImport > > delay_imports_t
Internal container for storing PE's DelayImport.
Definition PE/Binary.hpp:100
const_ref_iterator< const data_directories_t &, const DataDirectory * > it_const_data_directories
Iterator that outputs const DataDirectory&.
Definition PE/Binary.hpp:79
void remove_all_relocations()
Remove all the relocations.
DataDirectory * export_dir()
Return the data directory associated with the export table.
Definition PE/Binary.hpp:708
it_exceptions exceptions()
Iterator over the exception (_RUNTIME_FUNCTION) functions.
Definition PE/Binary.hpp:823
std::unique_ptr< Builder > write(std::ostream &os)
Reconstruct the binary object and write the raw PE in os stream.
Definition PE/Binary.hpp:649
const_ref_iterator< const exceptions_t &, const ExceptionInfo * > it_const_exceptions
Iterator that outputs const ExceptionInfo&.
Definition PE/Binary.hpp:151
std::vector< uint8_t > authentihash(ALGORITHMS algo) const
Compute the authentihash according to the algorithm provided in the first parameter.
ref_iterator< data_directories_t &, DataDirectory * > it_data_directories
Iterator that outputs DataDirectory&.
Definition PE/Binary.hpp:76
void remove_tls()
Remove the TLS from the binary.
const LoadConfiguration * load_configuration() const
Retrun the LoadConfiguration object or a nullptr if the binary does not use the LoadConfiguration.
Definition PE/Binary.hpp:516
std::ostream & print(std::ostream &os) const override
it_const_delay_imports delay_imports() const
Definition PE/Binary.hpp:602
it_const_debug_entries debug() const
Definition PE/Binary.hpp:498
void remove_section(const std::string &name, bool clear=false) override
Delete the section with the given name.
void patch_address(uint64_t address, uint64_t patch_value, size_t size=sizeof(uint64_t), VA_TYPES addr_type=VA_TYPES::AUTO) override
Patch the address with the given value.
bool is_pie() const override
Check if the binary is position independent.
Definition PE/Binary.hpp:696
LIEF::Binary::functions_t ctor_functions() const override
Return the list of the binary constructors.
DataDirectory * exceptions_dir()
Return the data directory associated with the exceptions.
Definition PE/Binary.hpp:735
std::vector< std::unique_ptr< Section > > sections_t
Internal container for storing PE's Section.
Definition PE/Binary.hpp:64
const_ref_iterator< const imports_t &, const Import * > it_const_imports
Iterator that outputs const Import&.
Definition PE/Binary.hpp:97
void dos_stub(std::vector< uint8_t > content)
Update the DOS stub content.
Definition PE/Binary.hpp:548
DataDirectory * delay_dir()
Return the data directory associated with delayed imports.
Definition PE/Binary.hpp:799
it_imports imports()
Return an iterator over the binary imports.
Definition PE/Binary.hpp:570
bool has_resources() const
Check if the current binary has resources.
Definition PE/Binary.hpp:296
const DataDirectory * import_dir() const
Definition PE/Binary.hpp:721
TLS & tls(const TLS &tls)
Set a TLS object in the current Binary.
const_ref_iterator< const delay_imports_t &, const DelayImport * > it_const_delay_imports
Iterator that outputs const DelayImport&.
Definition PE/Binary.hpp:106
const ResourceNode * resources() const
Definition PE/Binary.hpp:414
bool has_debug() const
Check if the current binary contains debug information.
Definition PE/Binary.hpp:313
const DataDirectory * iat_dir() const
Definition PE/Binary.hpp:794
DelayImport * get_delay_import(const std::string &import_name)
Returns the DelayImport matching the given name. If it can't be found, it returns a nullptr.
Definition PE/Binary.hpp:608
it_const_exceptions exceptions() const
Definition PE/Binary.hpp:827
friend class Factory
Definition PE/Binary.hpp:60
const DataDirectory * tls_dir() const
Definition PE/Binary.hpp:776
const DataDirectory * debug_dir() const
Definition PE/Binary.hpp:767
bool has_relocations() const
Check if the current binary has relocations.
Definition PE/Binary.hpp:308
bool has_exports() const
Check if the current binary has exports.
Definition PE/Binary.hpp:291
uint64_t virtual_size() const
Compute the binary's virtual size. It should match OptionalHeader::sizeof_image.
ref_iterator< strings_table_t & > it_strings_table
Iterator that outputs COFF::String&.
Definition PE/Binary.hpp:130
std::vector< std::unique_ptr< ExceptionInfo > > exceptions_t
Internal container for storing runtime function associated with exceptions.
Definition PE/Binary.hpp:145
std::vector< std::unique_ptr< Relocation > > relocations_t
Internal container for storing PE's Relocation.
Definition PE/Binary.hpp:82
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).
bool remove_import(const std::string &name)
Remove the imported library with the given name.
bool clear_debug()
Remove all debug info from the binary.
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:574
const OptionalHeader & optional_header() const
Definition PE/Binary.hpp:236
it_signatures signatures()
Definition PE/Binary.hpp:333
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...
const_ref_iterator< const relocations_t &, const Relocation * > it_const_relocations
Iterator that outputs const Relocation&.
Definition PE/Binary.hpp:88
Debug * add_debug_info(const Debug &entry)
Add a new debug entry.
span< const uint8_t > overlay() const
Return the overlay content.
Definition PE/Binary.hpp:525
bool is_arm64x() const
True if this binary is compiled in ARM64X mode (contains both ARM64 and ARM64EC code).
bool is_arm64ec() const
True if this binary is compiled in ARM64EC mode (emulation compatible).
DataDirectory * rsrc_dir()
Return the data directory associated with the resources tree.
Definition PE/Binary.hpp:726
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.
const_ref_iterator< const signatures_t & > it_const_signatures
Iterator that outputs const Signature&.
Definition PE/Binary.hpp:142
std::vector< std::unique_ptr< Import > > imports_t
Internal container for storing PE's Import.
Definition PE/Binary.hpp:91
const DataDirectory * data_directory(DataDirectory::TYPES type) const
std::vector< std::unique_ptr< COFF::Symbol > > symbols_t
Internal container for storing COFF Symbols.
Definition PE/Binary.hpp:118
DataDirectory * tls_dir()
Return the data directory associated with TLS.
Definition PE/Binary.hpp:772
const DataDirectory * rsrc_dir() const
Definition PE/Binary.hpp:730
void fill_address(uint64_t address, size_t size, uint8_t value=0, VA_TYPES addr_type=VA_TYPES::AUTO)
Fill the content at the provided with a fixed value.
ref_iterator< signatures_t & > it_signatures
Iterator that outputs Signature&.
Definition PE/Binary.hpp:139
bool has_rich_header() const
Check if the current binary has a RichHeader object.
Definition PE/Binary.hpp:565
ref_iterator< symbols_t &, COFF::Symbol * > it_symbols
Iterator that outputs Symbol&.
Definition PE/Binary.hpp:121
bool has_signatures() const
Check if the current binary contains signatures.
Definition PE/Binary.hpp:284
bool has_delay_imports() const
Check if the current binary contains delay imports.
Definition PE/Binary.hpp:593
const DataDirectory * load_config_dir() const
Definition PE/Binary.hpp:785
void rich_header(const RichHeader &rich_header)
Set a RichHeader object in the current Binary.
DataDirectory * relocation_dir()
Return the data directory associated with the relocation table.
Definition PE/Binary.hpp:754
const DataDirectory * exceptions_dir() const
Definition PE/Binary.hpp:739
TLS * tls()
Return a reference to the TLS object.
Definition PE/Binary.hpp:255
it_const_data_directories data_directories() const
Definition PE/Binary.hpp:478
uint64_t entrypoint() const override
Return the binary's entrypoint (It is the same value as OptionalHeader::addressof_entrypoint.
Definition PE/Binary.hpp:691
std::vector< Signature > signatures_t
Internal container for storing PE's authenticode Signature.
Definition PE/Binary.hpp:136
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 ExceptionInfo * find_exception_at(uint32_t rva) const
Definition PE/Binary.hpp:838
const Import * get_import(const std::string &import_name) const
uint64_t last_section_offset() const
const_ref_iterator< const strings_table_t & > it_const_strings_table
Iterator that outputs const COFF::String&.
Definition PE/Binary.hpp:133
const DataDirectory * delay_dir() const
Definition PE/Binary.hpp:803
ref_iterator< relocations_t &, Relocation * > it_relocations
Iterator that outputs Relocation&.
Definition PE/Binary.hpp:85
static bool classof(const LIEF::Binary *bin)
Definition PE/Binary.hpp:867
const Section * get_section(const std::string &name) const
it_symbols symbols()
Return binary Symbols.
Definition PE/Binary.hpp:375
Section * import_section()
Definition PE/Binary.hpp:439
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.
void patch_address(uint64_t address, const std::vector< uint8_t > &patch_value, VA_TYPES addr_type=VA_TYPES::AUTO) override
Patch the content at virtual address address with patch_value.
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...
std::unique_ptr< Builder > write(std::ostream &os, const Builder::config_t &config)
Import & add_import(const std::string &name)
Add an imported library (i.e. DLL) to the binary.
Definition PE/Binary.hpp:620
friend class Builder
Definition PE/Binary.hpp:59
COFF::String * find_coff_string(uint32_t offset)
Try to find the COFF string at the given offset in the COFF string table.
Definition PE/Binary.hpp:396
ResourceNode * set_resources(std::unique_ptr< ResourceNode > root)
std::vector< COFF::String > strings_table_t
Internal container for storing strings.
Definition PE/Binary.hpp:127
span< uint8_t > overlay()
Definition PE/Binary.hpp:529
const_ref_iterator< const sections_t &, const Section * > it_const_sections
Iterator that outputs const Section& object.
Definition PE/Binary.hpp:70
uint64_t overlay_offset() const
Return the original overlay offset.
Definition PE/Binary.hpp:534
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.
Definition PE/Binary.hpp:198
Section * add_section(const Section §ion)
Add a section to the binary and return the section added.
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:368
ref_iterator< debug_entries_t &, Debug * > it_debug_entries
Iterator that outputs Debug&.
Definition PE/Binary.hpp:112
PE_TYPE type() const
Return PE32 or PE32+.
Definition PE/Binary.hpp:157
bool has_tls() const
Check if the current binary has a TLS object.
Definition PE/Binary.hpp:267
Export & set_export(const Export &export_table)
DataDirectory * data_directory(DataDirectory::TYPES type)
Return the DataDirectory with the given type (or index).
Definition PE/Binary.hpp:483
Section * section_from_offset(uint64_t offset)
Find the section associated that encompasses the given offset.
Definition PE/Binary.hpp:190
bool has_exceptions() const
Check if the current binary has exceptions.
Definition PE/Binary.hpp:301
it_delay_imports delay_imports()
Return an iterator over the binary's delay imports.
Definition PE/Binary.hpp:598
const_ref_iterator< const symbols_t &, const COFF::Symbol * > it_const_symbols
Iterator that outputs const Symbol&.
Definition PE/Binary.hpp:124
it_const_symbols symbols() const
Definition PE/Binary.hpp:379
const RichHeader * rich_header() const
Definition PE/Binary.hpp:557
ref_iterator< exceptions_t &, ExceptionInfo * > it_exceptions
Iterator that outputs ExceptionInfo&.
Definition PE/Binary.hpp:148
bool is_reproducible_build() const
Check if the current binary is reproducible build, replacing timestamps by a compile hash.
std::unique_ptr< Builder > write(const std::string &filename, const Builder::config_t &config)
Reconstruct the binary object with the given configuration and write it in filename.
DataDirectory * debug_dir()
Return the data directory associated with the debug table.
Definition PE/Binary.hpp:763
uint64_t va_to_offset(uint64_t VA) const
Convert the absolute virtual address into an offset.
Definition PE/Binary.hpp:169
std::vector< std::unique_ptr< DataDirectory > > data_directories_t
Internal container for storing PE's DataDirectory.
Definition PE/Binary.hpp:73
const DataDirectory * relocation_dir() const
Definition PE/Binary.hpp:758
Binary * nested_pe_binary()
Definition PE/Binary.hpp:863
DosHeader & dos_header()
Return a reference to the PE::DosHeader object.
Definition PE/Binary.hpp:213
friend class Parser
Definition PE/Binary.hpp:58
it_const_relocations relocations() const
Definition PE/Binary.hpp:463
const Section * section_from_rva(uint64_t virtual_address) const
DataDirectory * iat_dir()
Return the data directory associated with the IAT.
Definition PE/Binary.hpp:790
DataDirectory * cert_dir()
Return the data directory associated with the certificate table (authenticode).
Definition PE/Binary.hpp:745
bool has_nx() const override
Check if the binary uses NX protection.
Definition PE/Binary.hpp:701
span< const uint8_t > dos_stub() const
Return the DOS stub content.
Definition PE/Binary.hpp:539
const COFF::String * find_coff_string(uint32_t offset) const
Definition PE/Binary.hpp:405
Header & header()
Return a reference to the PE::Header object.
Definition PE/Binary.hpp:222
it_relocations relocations()
Return an iterator over the PE's Relocation.
Definition PE/Binary.hpp:459
uint64_t imagebase() const override
Return binary's imagebase. 0 if not relevant.
Definition PE/Binary.hpp:183
bool has_configuration() const
Check if the current binary has a load configuration.
Definition PE/Binary.hpp:318
const CodeViewPDB * codeview_pdb() const
Return the CodeViewPDB object if present.
const TLS * tls() const
Definition PE/Binary.hpp:259
ResourceNode * resources()
Return resources as a tree or a nullptr if there is no resources.
Definition PE/Binary.hpp:410
ResourceNode * set_resources(const ResourceNode &root)
Change or set the current resource tree with the new one provided in parameter.
bool has(DataDirectory::TYPES type) const
Check if the current binary has the given DataDirectory::TYPES.
Definition PE/Binary.hpp:489
LoadConfiguration * load_configuration()
Definition PE/Binary.hpp:520
uint32_t sizeof_headers() const
Compute the size of all the headers.
bool remove_debug(const Debug &entry)
Remove a specific debug entry.
DataDirectory * load_config_dir()
Return the data directory associated with the load config.
Definition PE/Binary.hpp:781
const Binary * nested_pe_binary() const
If the current binary contains dynamic relocations (e.g. LIEF::PE::DynamicFixupARM64X),...
Definition PE/Binary.hpp:859
std::vector< std::unique_ptr< Debug > > debug_entries_t
Internal container for storing Debug information.
Definition PE/Binary.hpp:109
Import * get_import(const std::string &import_name)
Return the Import matching the provided name (case sensitive).
Definition PE/Binary.hpp:581
std::unique_ptr< Builder > write(const std::string &filename)
Reconstruct the binary object and write the raw PE in filename.
Definition PE/Binary.hpp:636
it_strings_table coff_string_table()
Definition PE/Binary.hpp:388
it_const_signatures signatures() const
Return an iterator over the Signature object(s) if the binary is signed.
Definition PE/Binary.hpp:329
it_debug_entries debug()
Return an iterator over the Debug entries.
Definition PE/Binary.hpp:494
it_const_sections sections() const
Definition PE/Binary.hpp:208
it_const_strings_table coff_string_table() const
Iterator over the strings located in the COFF string table.
Definition PE/Binary.hpp:384
ref_iterator< imports_t &, Import * > it_imports
Iterator that output Import&.
Definition PE/Binary.hpp:94
bool has_delay_import(const std::string &import_name) const
True if the binary delay-imports the given library name
Definition PE/Binary.hpp:615
bool has_imports() const
Check if the current binary contains imports.
Definition PE/Binary.hpp:277
ExceptionInfo * find_exception_at(uint32_t rva)
Try to find the exception info at the given RVA.
void remove(const Section §ion, bool clear=false)
Remove the given section.
const Header & header() const
Definition PE/Binary.hpp:226
const_ref_iterator< const debug_entries_t &, const Debug * > it_const_debug_entries
Iterator that outputs const Debug&.
Definition PE/Binary.hpp:115
const DataDirectory * cert_dir() const
Definition PE/Binary.hpp:749
it_data_directories data_directories()
Return an iterator over the DataDirectory present in the Binary.
Definition PE/Binary.hpp:474
it_sections sections()
Return an iterator over the PE's Section.
Definition PE/Binary.hpp:204
void remove_all_imports()
Remove all libraries in the binary.
Definition PE/Binary.hpp:631
Export * get_export()
Return the Export object.
Definition PE/Binary.hpp:364
span< uint8_t > dos_stub()
Definition PE/Binary.hpp:543
bool has_import(const std::string &import_name) const
True if the binary imports the given library name
Definition PE/Binary.hpp:588
DataDirectory * import_dir()
Return the data directory associated with the import table.
Definition PE/Binary.hpp:717
ref_iterator< delay_imports_t &, DelayImport * > it_delay_imports
Iterator that output DelayImport&.
Definition PE/Binary.hpp:103
Relocation & add_relocation(const Relocation &relocation)
Add a new 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.
Definition PE/Binary.hpp:431
RichHeader * rich_header()
Return a reference to the RichHeader object.
Definition PE/Binary.hpp:553
const DosHeader & dos_header() const
Definition PE/Binary.hpp:217
CodeView PDB specialization.
Definition CodeViewPDB.hpp:35
Class that represents a PE data directory entry.
Definition DataDirectory.hpp:42
TYPES
Definition DataDirectory.hpp:51
@ EXPORT_TABLE
Definition DataDirectory.hpp:52
@ DELAY_IMPORT_DESCRIPTOR
Definition DataDirectory.hpp:65
@ RESOURCE_TABLE
Definition DataDirectory.hpp:54
@ BASE_RELOCATION_TABLE
Definition DataDirectory.hpp:57
@ EXCEPTION_TABLE
Definition DataDirectory.hpp:55
@ IAT
Definition DataDirectory.hpp:64
@ LOAD_CONFIG_TABLE
Definition DataDirectory.hpp:62
@ CERTIFICATE_TABLE
Definition DataDirectory.hpp:56
@ DEBUG_DIR
Definition DataDirectory.hpp:58
@ IMPORT_TABLE
Definition DataDirectory.hpp:53
@ TLS_TABLE
Definition DataDirectory.hpp:61
This class represents a generic entry in the debug data directory. For known types,...
Definition debug/Debug.hpp:40
Class that represents a PE delayed import.
Definition DelayImport.hpp:37
This class is the base class for any exception or runtime function entry.
Definition ExceptionInfo.hpp:33
Class which represents a PE Export.
Definition Export.hpp:39
This factory is used to create PE from scratch.
Definition Factory.hpp:29
Class that represents a PE import.
Definition Import.hpp:40
This class represents the load configuration data associated with the IMAGE_LOAD_CONFIG_DIRECTORY.
Definition LoadConfiguration.hpp:46
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Class which represents the Base Relocation Block We usually find this structure in the ....
Definition PE/Relocation.hpp:43
Class which represents a Data Node in the PE resources tree.
Definition ResourceData.hpp:33
Definition ResourceDirectory.hpp:33
Class which represents a Node in the resource tree.
Definition ResourceNode.hpp:46
Class which represents a PE section.
Definition PE/Section.hpp:46
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
@ DEFAULT
Definition Signature.hpp:92
VERIFICATION_FLAGS
Flags returned by the verification functions.
Definition Signature.hpp:68
Class which represents the PE Thread Local Storage.
Definition TLS.hpp:43
Definition Visitor.hpp:210
Iterator which returns reference on container's values.
Definition iterators.hpp:46
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
ALGORITHMS
Cryptography algorithms.
Definition PE/enums.hpp:28
PE_TYPE
Definition PE/enums.hpp:22
LIEF namespace.
Definition Abstract/Binary.hpp:40
tcb::span< ElementType, Extent > span
Definition span.hpp:22
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which return const ref on container's values.
Definition iterators.hpp:257
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:75
This structure is used to configure the build operation.
Definition PE/Builder.hpp:54
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42