mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-13 12:26:49 +00:00
Add NameString to SectionHeader
This commit is contained in:
@@ -23,19 +23,21 @@ namespace BurnOutSharp.PackerType
|
||||
return "Armadillo";
|
||||
|
||||
// Loop through all "extension" sections -- usually .data1 or .text1
|
||||
foreach (var section in sections.Where(s => s != null && Encoding.ASCII.GetString(s.Name).Trim('\0').EndsWith("1")))
|
||||
foreach (var section in sections.Where(s => s != null && s.NameString.EndsWith("1")))
|
||||
{
|
||||
string sectionName = Encoding.ASCII.GetString(section.Name).Trim('\0');
|
||||
var sectionRaw = pex.ReadRawSection(sectionName);
|
||||
var matchers = new List<ContentMatchSet>
|
||||
var sectionRaw = pex.ReadRawSection(section.NameString);
|
||||
if (sectionRaw != null)
|
||||
{
|
||||
// ARMDEBUG
|
||||
new ContentMatchSet(new byte?[] { 0x41, 0x52, 0x4D, 0x44, 0x45, 0x42, 0x55, 0x47 }, $"Armadillo"),
|
||||
};
|
||||
var matchers = new List<ContentMatchSet>
|
||||
{
|
||||
// ARMDEBUG
|
||||
new ContentMatchSet(new byte?[] { 0x41, 0x52, 0x4D, 0x44, 0x45, 0x42, 0x55, 0x47 }, $"Armadillo"),
|
||||
};
|
||||
|
||||
string match = MatchUtil.GetFirstMatch(file, sectionRaw, matchers, includeDebug);
|
||||
if (!string.IsNullOrWhiteSpace(match))
|
||||
return match;
|
||||
string match = MatchUtil.GetFirstMatch(file, sectionRaw, matchers, includeDebug);
|
||||
if (!string.IsNullOrWhiteSpace(match))
|
||||
return match;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user