private void Dump(Metadata metadata, Il2Cpp il2Cpp, string outputDir) { Log("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); decompiler.Decompile(config, outputDir); Log("Done!"); if (config.GenerateStruct) { Log("Generate struct..."); try { var scriptGenerator = new StructGenerator(executor); scriptGenerator.WriteScript(outputDir); Log("Done!"); } catch { Log("There was an error trying to generate struct. Skipped", Color.Orange); } } if (config.GenerateDummyDll) { Log("Generate dummy dll..."); DummyAssemblyExporter.Export(executor, outputDir, config.DummyDllAddToken); Log("Done!"); Directory.SetCurrentDirectory(realPath); //Fix read-only directory permission } }
public static bool PerformDump(string gameAssemblyPath, string metadataDatPath, string outputDirectoryPath, Config config, Action <string> reportProgressAction) { Init(gameAssemblyPath, metadataDatPath, config, reportProgressAction, out var metadata, out var il2Cpp); reportProgressAction("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); reportProgressAction("Done!"); if (config.GenerateStruct) { decompiler.Decompile(config, outputDirectoryPath, reportProgressAction); reportProgressAction("Generate struct..."); var scriptGenerator = new StructGenerator(executor); scriptGenerator.WriteScript(outputDirectoryPath); reportProgressAction("Done!"); } if (config.GenerateDummyDll) { reportProgressAction("Generate dummy dll..."); DummyAssemblyExporter.Export(executor, outputDirectoryPath, config.DummyDllAddToken); reportProgressAction("Done!"); } return(true); }
private static void Dump(Metadata metadata, Il2Cpp il2Cpp, string outputDir) { Console.WriteLine("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); decompiler.Decompile(config, outputDir); Console.WriteLine("Done!"); if (config.GenerateStruct) { Console.WriteLine("Generate struct..."); var scriptGenerator = new StructGenerator(executor); scriptGenerator.WriteScript(outputDir); Console.WriteLine("Done!"); } if (config.GenerateDummyDll) { Console.WriteLine("Generate dummy dll..."); DummyAssemblyExporter.Export(executor, outputDir, config.DummyDllAddToken); Console.WriteLine("Done!"); } }
private void Dump(Metadata metadata, Il2Cpp il2Cpp, string outputDir) { WriteOutput("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); decompiler.Decompile(_config, outputDir, 1); WriteOutput("Done!"); if (_config.GenerateStruct) { WriteOutput("Generate struct..."); var scriptGenerator = new StructGenerator(executor); scriptGenerator.WriteScript(outputDir, 1); WriteOutput("Done!"); } if (_config.GenerateDummyDll) { WriteOutput("Generate dummy dll..."); DummyAssemblyExporter.Export(executor, outputDir, _config.DummyDllAddToken); WriteOutput("Done!"); Directory.SetCurrentDirectory(realPath); //Fix read-only directory permission } }