Class that is used to rebuild a raw PE binary from a PE::Binary object.
More...
#include <Builder.hpp>
|
template<typename PE_T > |
static std::vector< uint8_t > | build_jmp (uint64_t from, uint64_t address) |
| Construct a jmp [address] @ from .
|
|
template<typename PE_T > |
static std::vector< uint8_t > | build_jmp_hook (uint64_t from, uint64_t address) |
| Construct a jmp far address @ from .
|
|
Class that is used to rebuild a raw PE binary from a PE::Binary object.
◆ Builder() [1/2]
LIEF::PE::Builder::Builder |
( |
| ) |
|
|
delete |
◆ Builder() [2/2]
LIEF::PE::Builder::Builder |
( |
Binary & | binary | ) |
|
◆ ~Builder()
LIEF::PE::Builder::~Builder |
( |
| ) |
|
◆ build() [1/6]
Perform the build process.
◆ build() [2/6]
◆ build() [3/6]
◆ build() [4/6]
◆ build() [5/6]
◆ build() [6/6]
◆ build_dos_stub()
Builder & LIEF::PE::Builder::build_dos_stub |
( |
bool | flag | ) |
|
Rebuild the DOS stub content.
◆ build_imports()
Builder & LIEF::PE::Builder::build_imports |
( |
bool | flag = true | ) |
|
Rebuild the import table in new section.
◆ build_jmp()
template<typename PE_T >
static std::vector< uint8_t > LIEF::PE::Builder::build_jmp |
( |
uint64_t | from, |
|
|
uint64_t | address ) |
|
static |
Construct a jmp [address] @ from
.
It is used when patching import table
◆ build_jmp_hook()
template<typename PE_T >
static std::vector< uint8_t > LIEF::PE::Builder::build_jmp_hook |
( |
uint64_t | from, |
|
|
uint64_t | address ) |
|
static |
Construct a jmp far address @ from
.
It is used for hooking
◆ build_overlay()
Builder & LIEF::PE::Builder::build_overlay |
( |
bool | flag | ) |
|
Rebuild the binary's overlay.
◆ build_relocations()
Builder & LIEF::PE::Builder::build_relocations |
( |
bool | flag = true | ) |
|
Rebuild the relocation table in another section.
◆ build_resources()
Builder & LIEF::PE::Builder::build_resources |
( |
bool | flag | ) |
|
Rebuid the resources in another section.
◆ build_tls()
Builder & LIEF::PE::Builder::build_tls |
( |
bool | flag = true | ) |
|
Rebuild TLS object in another section.
◆ get_build()
const std::vector< uint8_t > & LIEF::PE::Builder::get_build |
( |
| ) |
|
◆ patch_imports()
Builder & LIEF::PE::Builder::patch_imports |
( |
bool | flag = true | ) |
|
Patch the original import table in order to redirect functions to the new import table.
This setting should be used with LIEF::PE::Builder::build_imports set to true
◆ write() [1/2]
void LIEF::PE::Builder::write |
( |
const std::string & | filename | ) |
const |
Write the build result into the output
file.
◆ write() [2/2]
void LIEF::PE::Builder::write |
( |
std::ostream & | os | ) |
const |
Write the build result into the os
stream.
The documentation for this class was generated from the following file: