pub struct OffsetTable {
pub source: OffsetTableSource,
pub version_id: u32,
pub offset_exe: u64,
pub offset_setup0: u64,
pub offset_setup1: u64,
pub uncompressed_size_exe: u32,
pub crc_exe: u32,
pub total_size: u64,
pub message_offset: u32,
pub exe_compressed_size: u32,
}Expand description
Decoded SetupLdrOffsetTable.
Field meanings, per Shared.Struct.pas:423-435:
offset_setup0⇒ where the 64-byte SetupID marker begins (canonicalOffset0).offset_setup1⇒ where the file payload chunks begin (canonicalOffset1);0means the payload lives in externalsetup-N.binfiles.offset_exe⇒ where the compressedsetup.e32/setup.e64stub-handoff payload begins (canonicalOffsetEXE).
Fields§
§source: OffsetTableSourceProvenance of the bytes we decoded.
version_id: u32OffsetTable.Version field (1 or 2 for v1/v2; 0 for the
pre-5.1.5 path that has no explicit version field).
offset_exe: u64OffsetEXE.
offset_setup0: u64Offset0 (start of setup-0.bin data).
offset_setup1: u64Offset1 (start of setup-1.bin data, or 0 for external).
uncompressed_size_exe: u32UncompressedSizeEXE.
crc_exe: u32CRCEXE.
total_size: u64TotalSize (v2 only; 0 otherwise).
message_offset: u32message_offset (pre-4.0.0 only; 0 otherwise).
exe_compressed_size: u32exe_compressed_size (pre-4.1.6 only; 0 otherwise).
Implementations§
Source§impl OffsetTable
impl OffsetTable
Sourcepub fn parse(input: &[u8], start: usize, len: usize) -> Result<Self, Error>
pub fn parse(input: &[u8], start: usize, len: usize) -> Result<Self, Error>
Decodes the offset-table bytes that the pe
locator returned.
§Errors
Error::UnknownSetupLdrMagicif the 12-byte magic is not in our recognized table.Error::Truncatedif the record runs past the buffer.Error::BadChecksumfor v1/v2 if the trailing CRC does not match.
Trait Implementations§
Source§impl Clone for OffsetTable
impl Clone for OffsetTable
Source§fn clone(&self) -> OffsetTable
fn clone(&self) -> OffsetTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OffsetTable
impl RefUnwindSafe for OffsetTable
impl Send for OffsetTable
impl Sync for OffsetTable
impl Unpin for OffsetTable
impl UnsafeUnpin for OffsetTable
impl UnwindSafe for OffsetTable
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