pub struct PeProgram {
pub header: PeHeader,
pub sections: Vec<PeSection>,
pub imports: ImportTable,
pub exports: ExportTable,
}Expand description
PE program structure
Represents a complete PE (Portable Executable) program, including all headers and section data. This is the highest level of abstraction for a PE file, containing its full parsed content.
Fields§
§header: PeHeaderPE header information, containing DOS, NT, COFF, and optional headers
sections: Vec<PeSection>Collection of all sections, containing code, data, resources, etc.
imports: ImportTableImport table, containing external functions and libraries the program depends on
exports: ExportTableExport table, containing functions and symbols the program provides to others
Implementations§
Source§impl PeProgram
impl PeProgram
Sourcepub fn create_executable(machine_code: Vec<u8>) -> Self
pub fn create_executable(machine_code: Vec<u8>) -> Self
Create a simple executable PE program from raw machine code
Sourcepub fn with_imports(self, imports: ImportTable) -> Self
pub fn with_imports(self, imports: ImportTable) -> Self
Add import table to program and automatically create .idata section
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PeProgram
impl<'de> Deserialize<'de> for PeProgram
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PeProgram
impl RefUnwindSafe for PeProgram
impl Send for PeProgram
impl Sync for PeProgram
impl Unpin for PeProgram
impl UnsafeUnpin for PeProgram
impl UnwindSafe for PeProgram
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