Undo the wrapped NE issues

This commit is contained in:
Matt Nadareski
2025-09-06 11:58:04 -04:00
parent 6361398b1b
commit bd1166cbab
5 changed files with 11 additions and 54 deletions

View File

@@ -60,18 +60,9 @@ namespace BinaryObjectScanner.Packer
// TODO: Don't read entire file
// TODO: Only 64 bytes at the end of the file is needed
byte[]? data;
try
{
data = nex.ReadArbitraryRange();
if (data == null)
return "Unknown 1.X";
}
catch
{
// Ignore errors reading ranges
byte[]? data = nex.ReadArbitraryRange();
if (data == null)
return "Unknown 1.X";
}
var matchers = new List<ContentMatchSet>
{

View File

@@ -9,16 +9,9 @@ namespace BinaryObjectScanner.Packer
/// <inheritdoc/>
public string? CheckExecutable(string file, NewExecutable nex, bool includeDebug)
{
try
{
// If the overlay header can be found
if (nex.FindWiseOverlayHeader() > -1)
return "Wise Installation Wizard Module";
}
catch
{
// Ignore the error for now
}
// If the overlay header can be found
if (nex.FindWiseOverlayHeader() > -1)
return "Wise Installation Wizard Module";
return null;
}

View File

@@ -73,18 +73,9 @@ namespace BinaryObjectScanner.Protection
public string? CheckExecutable(string file, NewExecutable nex, bool includeDebug)
{
// TODO: Don't read entire file
byte[]? data;
try
{
data = nex.ReadArbitraryRange();
if (data == null)
return null;
}
catch
{
// Ignore errors reading ranges
byte[]? data = nex.ReadArbitraryRange();
if (data == null)
return null;
}
// TODO: Figure out what NE section this lives in
var neMatchSets = new List<ContentMatchSet>

View File

@@ -52,18 +52,9 @@ namespace BinaryObjectScanner.Protection
}
// TODO: Don't read entire file
byte[]? data;
try
{
data = nex.ReadArbitraryRange();
if (data == null)
return null;
}
catch
{
// Ignore errors reading ranges
byte[]? data = nex.ReadArbitraryRange();
if (data == null)
return null;
}
var neMatchSets = new List<ContentMatchSet>
{

View File

@@ -41,18 +41,9 @@ namespace BinaryObjectScanner.Protection
public string? CheckExecutable(string file, NewExecutable nex, bool includeDebug)
{
// TODO: Don't read entire file
byte[]? data;
try
{
data = nex.ReadArbitraryRange();
if (data == null)
return null;
}
catch
{
// Ignore errors reading ranges
byte[]? data = nex.ReadArbitraryRange();
if (data == null)
return null;
}
// TODO: Figure out what NE section this lives in
var neMatchSets = new List<ContentMatchSet>