use of org.phoenicis.win32.pe.rsrc.RsrcSection in project POL-POM-5 by PlayOnLinux.
the class PEReader method parseExecutable.
public PEFile parseExecutable(InputStream inputStream) throws IOException {
try (CountingInputStream executableInputStream = new CountingInputStream(inputStream)) {
final ImageDOSHeader imageDOSHeader = readDosHeader(executableInputStream);
final byte[] realModeStubProgram = readRealModeStubProgram(executableInputStream, imageDOSHeader);
final ImageNTHeaders imageNTHeaders = readImageNTHeaders(executableInputStream);
final SectionHeader[] sectionHeaders = readSectionHeaders(executableInputStream, imageNTHeaders);
final RsrcSection resourceSection = readResourceSection(executableInputStream, sectionHeaders);
return new PEFile(imageDOSHeader, realModeStubProgram, imageNTHeaders, sectionHeaders, resourceSection);
}
}
Aggregations