mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-24 07:03:09 +00:00
Add NameString to SectionHeader
This commit is contained in:
@@ -22,7 +22,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
var fourthSection = sections.Length < 4 ? null : sections[3];
|
||||
if (fourthSection != null)
|
||||
{
|
||||
var fourthSectionData = pex.ReadRawSection(Encoding.ASCII.GetString(fourthSection.Name).Trim('\0'), first: true);
|
||||
var fourthSectionData = pex.ReadRawSection(fourthSection.NameString, first: true);
|
||||
if (fourthSectionData != null)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
@@ -55,7 +55,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
var secondToLastSection = sections.Length > 1 ? sections[sections.Length - 2] : null;
|
||||
if (secondToLastSection != null)
|
||||
{
|
||||
var secondToLastSectionData = pex.ReadRawSection(Encoding.ASCII.GetString(secondToLastSection.Name).Trim('\0'), first: true);
|
||||
var secondToLastSectionData = pex.ReadRawSection(secondToLastSection.NameString, first: true);
|
||||
if (secondToLastSectionData != null)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
@@ -81,7 +81,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
var lastSection = sections.LastOrDefault();
|
||||
if (lastSection != null)
|
||||
{
|
||||
var lastSectionData = pex.ReadRawSection(Encoding.ASCII.GetString(lastSection.Name).Trim('\0'), first: true);
|
||||
var lastSectionData = pex.ReadRawSection(lastSection.NameString, first: true);
|
||||
if (lastSectionData != null)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
|
||||
@@ -50,10 +50,10 @@ namespace BurnOutSharp.ProtectionType
|
||||
for (int i = 4; i < sections.Length; i++)
|
||||
{
|
||||
var nthSection = sections[i];
|
||||
string nthSectionName = Encoding.ASCII.GetString(nthSection.Name).Trim('\0');
|
||||
string nthSectionName = nthSection.NameString;
|
||||
if (nthSection != null && nthSectionName != ".idata" && nthSectionName != ".rsrc")
|
||||
{
|
||||
var nthSectionData = pex.ReadRawSection(Encoding.ASCII.GetString(nthSection.Name).Trim('\0'), first: true);
|
||||
var nthSectionData = pex.ReadRawSection(nthSectionName, first: true);
|
||||
if (nthSectionData != null)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
var rsrcSection = pex.GetLastSection(".rsrc", exact: true);
|
||||
if (rsrcSection != null)
|
||||
{
|
||||
var rsrcSectionData = pex.ReadRawSection(Encoding.ASCII.GetString(rsrcSection.Name).Trim('\0'), first: true);
|
||||
var rsrcSectionData = pex.ReadRawSection(".rsrc", first: true);
|
||||
if (rsrcSectionData != null)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
|
||||
Reference in New Issue
Block a user