diff --git a/src/read/pe/file.rs b/src/read/pe/file.rs index 3fb4920b..dc09b0ad 100644 --- a/src/read/pe/file.rs +++ b/src/read/pe/file.rs @@ -75,7 +75,13 @@ where self.nt_headers } - fn data_directory(&self, id: usize) -> Option<&'data pe::ImageDataDirectory> { + /// Returns the section table of this binary. + pub fn section_table(&self) -> SectionTable<'data> { + self.common.sections + } + + /// Returns the data directory at the given index. + pub fn data_directory(&self, id: usize) -> Option<&'data pe::ImageDataDirectory> { self.data_directories .get(id) .filter(|d| d.size.get(LE) != 0) @@ -84,6 +90,11 @@ where fn data_at(&self, va: u32) -> Option> { self.common.sections.pe_data_at(self.data, va).map(Bytes) } + + /// Returns this binary data. + pub fn data(&self) -> R { + self.data + } } impl<'data, Pe, R> read::private::Sealed for PeFile<'data, Pe, R>