mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-16 05:45:03 +00:00
Add comments around remaining SourceArray usages
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BurnOutSharp.ExecutableType.Microsoft.MZ.Headers;
|
||||
using BurnOutSharp.ExecutableType.Microsoft.PE.Headers;
|
||||
using BurnOutSharp.ExecutableType.Microsoft.PE.Sections;
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace BurnOutSharp.PackerType
|
||||
return null;
|
||||
|
||||
// Check for "Inno" in the reserved words
|
||||
// TODO: Is this check needed for PE executables? The version check suggests otherwise
|
||||
if (stub.Reserved2[4] == 0x6E49 && stub.Reserved2[5] == 0x6F6E)
|
||||
{
|
||||
string version = GetOldVersion(file, pex.SourceArray);
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace BurnOutSharp.PackerType
|
||||
if (sections == null)
|
||||
return null;
|
||||
|
||||
// TODO: Figure out how to more reasonably search before the sections
|
||||
|
||||
// Standard UPX
|
||||
int foundPosition = FindData(pex, "UPX");
|
||||
if (foundPosition > -1)
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
return $"SecuROM {GetV7Version(pex.SourceArray)}";
|
||||
|
||||
// Search after the last section
|
||||
// TODO: Figure out how to do this in a more reasonable way
|
||||
var lastSection = sections.LastOrDefault();
|
||||
if (lastSection != null)
|
||||
{
|
||||
@@ -210,6 +211,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
return $"{version}.{subVersion[0]}{subVersion[1]}.{subSubVersion[0]}{subSubVersion[1]}.{subSubSubVersion[0]}{subSubSubVersion[1]}{subSubSubVersion[2]}{subSubSubVersion[3]}";
|
||||
}
|
||||
|
||||
// TODO: Figure out where this sits in an actual executable
|
||||
private static string GetV7Version(byte[] fileContent)
|
||||
{
|
||||
int index = 236;
|
||||
|
||||
Reference in New Issue
Block a user