Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Il2CppDumper/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ public class Config
public double ForceVersion { get; set; } = 24.3;
public bool ForceDump { get; set; } = false;
public bool NoRedirectedPointer { get; set; } = false;
public bool DisablePlusSearch { get; set; } = false;
}
}
68 changes: 46 additions & 22 deletions Il2CppDumper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,33 +207,57 @@ private static bool Init(string il2cppPath, string metadataPath, out Metadata me
Console.WriteLine("Searching...");
try
{
var flag = il2Cpp.PlusSearch(metadata.methodDefs.Count(x => x.methodIndex >= 0), metadata.typeDefs.Length, metadata.imageDefs.Length);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (config.DisablePlusSearch)
{
if (!flag && il2Cpp is PE)
Console.WriteLine("PlusSearch is disabled...");
var sectionHelper = il2Cpp.GetSectionHelper(metadata.methodDefs.Count(), metadata.typeDefs.Length, metadata.imageDefs.Length);
var codeRegistration = sectionHelper.FindCodeRegistration();
var metadataRegistration = sectionHelper.FindMetadataRegistration();
if (codeRegistration != 0 && metadataRegistration != 0)
{
Console.WriteLine("Use custom PE loader");
il2Cpp = PELoader.Load(il2cppPath);
il2Cpp.SetProperties(version, metadata.metadataUsagesCount);
flag = il2Cpp.PlusSearch(metadata.methodDefs.Count(x => x.methodIndex >= 0), metadata.typeDefs.Length, metadata.imageDefs.Length);
Console.WriteLine($"Code Registration:{codeRegistration:X}\nMetadata Registration:{metadataRegistration:X}");
il2Cpp.Init(codeRegistration, metadataRegistration);
}
else
{
Console.WriteLine("ERROR: Can't use auto mode to process file, try manual mode.");
Console.Write("Input CodeRegistration: ");
codeRegistration = Convert.ToUInt64(Console.ReadLine(), 16);
Console.Write("Input MetadataRegistration: ");
metadataRegistration = Convert.ToUInt64(Console.ReadLine(), 16);
il2Cpp.Init(codeRegistration, metadataRegistration);
}
}
if (!flag)
{
flag = il2Cpp.Search();
}
if (!flag)
{
flag = il2Cpp.SymbolSearch();
}
if (!flag)
else
{
Console.WriteLine("ERROR: Can't use auto mode to process file, try manual mode.");
Console.Write("Input CodeRegistration: ");
var codeRegistration = Convert.ToUInt64(Console.ReadLine(), 16);
Console.Write("Input MetadataRegistration: ");
var metadataRegistration = Convert.ToUInt64(Console.ReadLine(), 16);
il2Cpp.Init(codeRegistration, metadataRegistration);
var flag = il2Cpp.PlusSearch(metadata.methodDefs.Count(x => x.methodIndex >= 0), metadata.typeDefs.Length, metadata.imageDefs.Length);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
if (!flag && il2Cpp is PE)
{
Console.WriteLine("Use custom PE loader");
il2Cpp = PELoader.Load(il2cppPath);
il2Cpp.SetProperties(version, metadata.metadataUsagesCount);
flag = il2Cpp.PlusSearch(metadata.methodDefs.Count(x => x.methodIndex >= 0), metadata.typeDefs.Length, metadata.imageDefs.Length);
}
}
if (!flag)
{
flag = il2Cpp.Search();
}
if (!flag)
{
flag = il2Cpp.SymbolSearch();
}
if (!flag)
{
Console.WriteLine("ERROR: Can't use auto mode to process file, try manual mode.");
Console.Write("Input CodeRegistration: ");
var codeRegistration = Convert.ToUInt64(Console.ReadLine(), 16);
Console.Write("Input MetadataRegistration: ");
var metadataRegistration = Convert.ToUInt64(Console.ReadLine(), 16);
il2Cpp.Init(codeRegistration, metadataRegistration);
}
}
if (il2Cpp.Version >= 27 && il2Cpp.IsDumped)
{
Expand Down
5 changes: 3 additions & 2 deletions Il2CppDumper/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"DummyDllAddToken": true,
"RequireAnyKey": true,
"ForceIl2CppVersion": false,
"ForceVersion": 16,
"ForceVersion": 29,
"ForceDump": false,
"NoRedirectedPointer": false
"NoRedirectedPointer": false,
"DisablePlusSearch": false
}