pub struct PeBuilder { /* private fields */ }Expand description
PE assembler builder
Implementations§
Source§impl PeBuilder
impl PeBuilder
Sourcepub fn architecture(self, arch: Architecture) -> Self
pub fn architecture(self, arch: Architecture) -> Self
Set target architecture
Sourcepub fn subsystem(self, subsystem: SubsystemType) -> Self
pub fn subsystem(self, subsystem: SubsystemType) -> Self
Set subsystem type
Sourcepub fn entry_point(self, entry_point: u32) -> Self
pub fn entry_point(self, entry_point: u32) -> Self
Set entry point address
Sourcepub fn image_base(self, image_base: u64) -> Self
pub fn image_base(self, image_base: u64) -> Self
Set image base address
Sourcepub fn import_function(self, dll_name: &str, function_name: &str) -> Self
pub fn import_function(self, dll_name: &str, function_name: &str) -> Self
Import a single function
Sourcepub fn import_functions(self, dll_name: &str, function_names: &[&str]) -> Self
pub fn import_functions(self, dll_name: &str, function_names: &[&str]) -> Self
Import multiple functions
Sourcepub fn get_imports(&self) -> &Vec<(String, Vec<String>)>
pub fn get_imports(&self) -> &Vec<(String, Vec<String>)>
Get import information (for creating import table)
Sourcepub fn build_header(&self) -> Result<PeHeader, GaiaError>
pub fn build_header(&self) -> Result<PeHeader, GaiaError>
Generate PE header info
Sourcepub fn build_sections(&mut self) -> Vec<PeSection>
pub fn build_sections(&mut self) -> Vec<PeSection>
Generate section list
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeBuilder
impl RefUnwindSafe for PeBuilder
impl Send for PeBuilder
impl Sync for PeBuilder
impl Unpin for PeBuilder
impl UnsafeUnpin for PeBuilder
impl UnwindSafe for PeBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more