diff --git a/src/main/java/efiSeek/EfiSeekAnalyzer.java b/src/main/java/efiSeek/EfiSeekAnalyzer.java index 26c4fbd..f67f6ae 100644 --- a/src/main/java/efiSeek/EfiSeekAnalyzer.java +++ b/src/main/java/efiSeek/EfiSeekAnalyzer.java @@ -33,6 +33,7 @@ import ghidra.app.util.bin.format.pe.NTHeader; import ghidra.app.util.bin.format.pe.OptionalHeader; import ghidra.app.util.bin.format.pe.PortableExecutable; +import ghidra.app.util.bin.format.FactoryBundledWithBinaryReader; import ghidra.util.Msg; import ghidra.util.exception.CancelledException; import ghidra.util.task.TaskMonitor; @@ -73,7 +74,7 @@ public boolean canAnalyze(Program program) { new ByteArrayProvider(blockBytes), !program.getLanguage().isBigEndian()); int ntHeaderOffset = reader.readInt(0x3C); - ntHeader = new NTHeader(reader, ntHeaderOffset, + ntHeader = NTHeader.createNTHeader((FactoryBundledWithBinaryReader)reader, ntHeaderOffset, PortableExecutable.SectionLayout.FILE, false, false); } catch (Exception e) { return false; diff --git a/src/main/java/efiSeek/EfiUtils.java b/src/main/java/efiSeek/EfiUtils.java index bab97f7..5d4dd7f 100644 --- a/src/main/java/efiSeek/EfiUtils.java +++ b/src/main/java/efiSeek/EfiUtils.java @@ -21,6 +21,7 @@ import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.format.pe.NTHeader; import ghidra.app.util.bin.format.pe.PortableExecutable; +import ghidra.app.util.bin.format.FactoryBundledWithBinaryReader; import ghidra.program.flatapi.FlatProgramAPI; import ghidra.program.model.address.Address; import ghidra.program.model.data.DataType; @@ -112,7 +113,7 @@ public final Address getEntryPoint() throws Exception { new ByteArrayProvider(blockBytes), !getCurrentProgram().getLanguage().isBigEndian()); int ntHeaderOffset = reader.readInt(0x3C); - ntHeader = new NTHeader(reader, ntHeaderOffset, + ntHeader = NTHeader.createNTHeader((FactoryBundledWithBinaryReader)reader, ntHeaderOffset, PortableExecutable.SectionLayout.FILE, false, false); long baseEntyPoint = ntHeader.getOptionalHeader().getAddressOfEntryPoint();