diff --git a/ReCodeItCLI/ReCodeItCLI.csproj b/ReCodeItCLI/ReCodeItCLI.csproj
index 311345e..6fd71bd 100644
--- a/ReCodeItCLI/ReCodeItCLI.csproj
+++ b/ReCodeItCLI/ReCodeItCLI.csproj
@@ -26,6 +26,10 @@
+
+
+
+
@@ -36,8 +40,6 @@
-
-
t.Name.Contains("GClass")))
{
- Logger.Log("You must de-obfuscate the assembly before remapping it.\n", ConsoleColor.Red);
- return;
+ Logger.Log("Assembly is obfuscated, running de-obfuscation...\n", ConsoleColor.Yellow);
+
+ Module.Dispose();
+ Module = null;
+
+ Deobfuscator.Deobfuscate(assemblyPath);
+
+ var cleanedName = Path.GetFileNameWithoutExtension(assemblyPath);
+ cleanedName = $"{cleanedName}-cleaned.dll";
+
+ var newPath = Path.GetDirectoryName(assemblyPath);
+ newPath = Path.Combine(newPath, cleanedName);
+
+ Console.WriteLine($"Cleaning assembly: {newPath}");
+
+ Module = DataProvider.LoadModule(newPath);
+ types = Module.GetTypes();
+
+ GenerateDynamicRemaps(newPath, types);
+ }
+ else
+ {
+ GenerateDynamicRemaps(assemblyPath, types);
}
-
- GenerateDynamicRemaps(assemblyPath, types);
var tasks = new List(remapModels.Count);
foreach (var remap in remapModels)