From 4830fe1d2214793bd928a9931187897c505bc072 Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:55:47 -0500 Subject: [PATCH] Make dumper auto de-obfuscate --- RecodeItLib/Dumper/DumperClass.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/RecodeItLib/Dumper/DumperClass.cs b/RecodeItLib/Dumper/DumperClass.cs index 36e5194..b4f0737 100644 --- a/RecodeItLib/Dumper/DumperClass.cs +++ b/RecodeItLib/Dumper/DumperClass.cs @@ -3,6 +3,7 @@ using dnlib.DotNet; using dnlib.DotNet.Emit; using ReCodeItLib.Utils; using System.IO.Compression; +using ReCodeItLib.ReMapper; namespace ReCodeItLib.Dumper; @@ -25,7 +26,7 @@ public class DumperClass public DumperClass(string managedPath) { _managedPath = managedPath; - _assemblyPath = Path.Combine(managedPath, "Assembly-Csharp-cleaned.dll"); + _assemblyPath = Path.Combine(managedPath, "Assembly-Csharp.dll"); _fileCheckerPath = Path.Combine(managedPath, "FilesChecker.dll"); _mscorlibPath = Path.Combine(managedPath, "mscorlib.dll"); _dumpLibPath = "./DumpLib.dll"; @@ -50,7 +51,12 @@ public class DumperClass Logger.Log($"File DumpLib.dll does not exist at {_dumpLibPath}", ConsoleColor.Red); } - _gameModule = DataProvider.LoadModule(_assemblyPath); + _assemblyPath = AssemblyUtils.TryDeObfuscate( + DataProvider.LoadModule(_assemblyPath), + _assemblyPath, + out var gameModule); + + _gameModule = gameModule; _checkerModule = DataProvider.LoadModule(_fileCheckerPath); _msModule = DataProvider.LoadModule(_mscorlibPath); _dumpModule = DataProvider.LoadModule(_dumpLibPath);