From 935ec00c86ebc4c9336383accb1939b150851e62 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 9 Sep 2025 17:15:25 -0400 Subject: [PATCH] Notes about hidden resources --- .../Deserializers/PortableExecutable.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SabreTools.Serialization/Deserializers/PortableExecutable.cs b/SabreTools.Serialization/Deserializers/PortableExecutable.cs index 86d9021f..a1aea612 100644 --- a/SabreTools.Serialization/Deserializers/PortableExecutable.cs +++ b/SabreTools.Serialization/Deserializers/PortableExecutable.cs @@ -1552,6 +1552,13 @@ namespace SabreTools.Serialization.Deserializers if (!topLevel) return obj; + // TODO: Revisit the logic for this + // - Use the table boundaries not the section ones + // - Don't check for signatures, just read anything that's there + // - If alignment is used, use the one from the optional header + // - Should this be moved out of this method entirely? + #region Hidden Resources + // If we're not aligned to a section var firstSection = Array.Find(sections, s => s != null && s.PointerToRawData == tableStart); if (firstSection == null) @@ -1596,6 +1603,8 @@ namespace SabreTools.Serialization.Deserializers }; } + #endregion + return obj; }