mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Add UnhollowerDeobfuscationRegex config option
This commit is contained in:
1 parent
3a54f7eef8
commit
ca9a9127c4
1 file changed
+12
-1
@@ -6,6 +6,7 @@ using System.IO.Compression;
|
||||
using System.Net.Http;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using AssemblyUnhollower;
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.Logging;
|
||||
@@ -64,6 +65,15 @@ internal static class ProxyAssemblyGenerator
|
||||
.AppendLine("{ProcessName} - Name of the current process")
|
||||
.ToString());
|
||||
|
||||
private static readonly ConfigEntry<string> ConfigUnhollowerDeobfuscationRegex = ConfigFile.CoreConfig.Bind(
|
||||
"IL2CPP", "UnhollowerDeobfuscationRegex",
|
||||
string.Empty,
|
||||
new StringBuilder()
|
||||
.AppendLine("The RegEx string to pass to Il2CppAssemblyUnhollower for renaming obfuscated names.")
|
||||
.AppendLine("All types and members matching this RegEx will get a name based on their signature,")
|
||||
.AppendLine("resulting in names that persist after game updates.")
|
||||
.ToString());
|
||||
|
||||
private static ManualLogSource Il2cppDumperLogger;
|
||||
|
||||
private static string unhollowedBasePath;
|
||||
@@ -367,7 +377,8 @@ internal static class ProxyAssemblyGenerator
|
||||
Source = sourceAssemblies,
|
||||
OutputDir = Preloader.IL2CPPUnhollowedPath,
|
||||
UnityBaseLibsDir = Directory.Exists(UnityBaseLibsDirectory) ? UnityBaseLibsDirectory : null,
|
||||
NoCopyUnhollowerLibs = true
|
||||
NoCopyUnhollowerLibs = true,
|
||||
ObfuscatedNamesRegex = !string.IsNullOrEmpty(ConfigUnhollowerDeobfuscationRegex.Value) ? new Regex(ConfigUnhollowerDeobfuscationRegex.Value) : null
|
||||
};
|
||||
|
||||
var renameMapLocation = Path.Combine(Paths.BepInExRootPath, "DeobfuscationMap.csv.gz");
|
||||
|
||||
Reference in new issue
Block a user