From 1308571c10c38bc197c864c93ffd7b9dd91101b1 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 28 Aug 2025 15:53:16 -0400 Subject: [PATCH] Smarter handling --- ExtractionTool/Program.cs | 42 ++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/ExtractionTool/Program.cs b/ExtractionTool/Program.cs index 90292361..35d8ecc0 100644 --- a/ExtractionTool/Program.cs +++ b/ExtractionTool/Program.cs @@ -150,29 +150,6 @@ namespace ExtractionTool #endif } - // Executable - else if (ft == WrapperType.Executable) - { - Console.WriteLine("Extracting executable contents"); - Console.WriteLine(); - - var exe = WrapperFactory.CreateExecutableWrapper(stream); - if (exe == null) - return; - - // TODO: Add Wise installer handling here - - // New Executable - if (exe is NewExecutable nex) - { - // No-op - } - - // Portable Executable - else if (exe is PortableExecutable pex) - pex.Extract(outputDirectory, includeDebug); - } - // GCF else if (wrapper is GCF gcf) { @@ -260,6 +237,15 @@ namespace ExtractionTool #endif // } + // New Executable + else if (wrapper is NewExecutable nex) + { + Console.WriteLine("Extracting New Executable contents"); + Console.WriteLine(); + + // TODO: Add Wise installer handling here + } + // PAK else if (wrapper is PAK pak) { @@ -292,6 +278,16 @@ namespace ExtractionTool #endif } + // Portable Executable + else if (wrapper is PortableExecutable pex) + { + Console.WriteLine("Extracting Portable Executable contents"); + Console.WriteLine(); + + // TODO: Add Wise installer handling here + pex.Extract(outputDirectory, includeDebug); + } + // Quantum else if (wrapper is Quantum quantum) {