From 85c6353cba0895afd3807fe4d682d6d639680de0 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 9 Dec 2022 12:53:19 -0800 Subject: [PATCH] Convert Armadillo to string finding --- BurnOutSharp/PackerType/Armadillo.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/BurnOutSharp/PackerType/Armadillo.cs b/BurnOutSharp/PackerType/Armadillo.cs index f4ddf120..d8b0bea4 100644 --- a/BurnOutSharp/PackerType/Armadillo.cs +++ b/BurnOutSharp/PackerType/Armadillo.cs @@ -26,21 +26,16 @@ namespace BurnOutSharp.PackerType if (nicodeSection) return "Armadillo"; + // Loop through all "extension" sections -- usually .data1 or .text1 foreach (var sectionName in pex.SectionNames.Where(s => s != null && s.EndsWith("1"))) { - var sectionRaw = pex.GetFirstSectionData(sectionName); - if (sectionRaw != null) + // Get the section strings, if they exist + List strs = pex.GetFirstSectionStrings(sectionName); + if (strs != null) { - var matchers = new List - { - // 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; + if (strs.Any(s => s.Contains("ARMDEBUG"))) + return "Armadillo"; } }