diff --git a/BinaryObjectScanner/Packer/InnoSetup.cs b/BinaryObjectScanner/Packer/InnoSetup.cs index c6a068b7..f1b3da21 100644 --- a/BinaryObjectScanner/Packer/InnoSetup.cs +++ b/BinaryObjectScanner/Packer/InnoSetup.cs @@ -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 { diff --git a/BinaryObjectScanner/Packer/WiseInstaller.cs b/BinaryObjectScanner/Packer/WiseInstaller.cs index 9a666c3c..929b36ab 100644 --- a/BinaryObjectScanner/Packer/WiseInstaller.cs +++ b/BinaryObjectScanner/Packer/WiseInstaller.cs @@ -9,16 +9,9 @@ namespace BinaryObjectScanner.Packer /// 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; } diff --git a/BinaryObjectScanner/Protection/CDDVDCops.cs b/BinaryObjectScanner/Protection/CDDVDCops.cs index bd53ea7f..3d939cf1 100644 --- a/BinaryObjectScanner/Protection/CDDVDCops.cs +++ b/BinaryObjectScanner/Protection/CDDVDCops.cs @@ -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 diff --git a/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs b/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs index 75b955b3..415623c2 100644 --- a/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs +++ b/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs @@ -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 { diff --git a/BinaryObjectScanner/Protection/RainbowSentinel.cs b/BinaryObjectScanner/Protection/RainbowSentinel.cs index 4a663ce5..a3f1c99d 100644 --- a/BinaryObjectScanner/Protection/RainbowSentinel.cs +++ b/BinaryObjectScanner/Protection/RainbowSentinel.cs @@ -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