private static void Dump(Metadata metadata, Il2Cpp il2Cpp) { Console.WriteLine("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); decompiler.Decompile(config); Console.WriteLine("Done!"); Console.WriteLine("Generate script..."); var scriptGenerator = new ScriptGenerator(executor); scriptGenerator.WriteScript(config); Console.WriteLine("Done!"); if (config.DummyDll) { Console.WriteLine("Generate dummy dll..."); DummyAssemblyExporter.Export(metadata, il2Cpp); Console.WriteLine("Done!"); } }
private static void Dump(Metadata metadata, Il2Cpp il2Cpp, string outputDir) { WriteLine("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); decompiler.Decompile(config, outputDir); WriteLine("Done!"); if (config.GenerateScript) { WriteLine("Generate script..."); var scriptGenerator = new ScriptGenerator(executor); scriptGenerator.WriteScript(outputDir); WriteLine("Done!"); } if (config.GenerateDummyDll) { WriteLine("Generate dummy dll..."); DummyAssemblyExporter.Export(executor, outputDir); WriteLine("Done!"); } WriteLine(""); }
private static void Dump(Metadata metadata, Il2Cpp il2Cpp) { Console.WriteLine("Dumping..."); var writer = new StreamWriter(new FileStream("dump.cs", FileMode.Create), new UTF8Encoding(false)); var decompiler = new Il2CppDecompiler(metadata, il2Cpp); decompiler.Decompile(writer, config); Console.WriteLine("Done!"); Console.WriteLine("Generate script..."); var scriptwriter = new StreamWriter(new FileStream("script.py", FileMode.Create), new UTF8Encoding(false)); var scriptGenerator = new ScriptGenerator(metadata, il2Cpp); scriptGenerator.WriteScript(scriptwriter, config); Console.WriteLine("Done!"); if (config.DummyDll) { Console.WriteLine("Generate dummy dll..."); if (Directory.Exists("DummyDll")) { Directory.Delete("DummyDll", true); } Directory.CreateDirectory("DummyDll"); Directory.SetCurrentDirectory("DummyDll"); var dummy = new DummyAssemblyGenerator(metadata, il2Cpp); foreach (var assembly in dummy.Assemblies) { using (var stream = new MemoryStream()) { assembly.Write(stream); File.WriteAllBytes(assembly.MainModule.Name, stream.ToArray()); } } Console.WriteLine("Done!"); } metadata.fsstream.Close(); }
private void Dump(Metadata metadata, Il2Cpp il2Cpp, string outputDir) { WriteLine("Dumping..."); var executor = new Il2CppExecutor(metadata, il2Cpp); var decompiler = new Il2CppDecompiler(executor); decompiler.Decompile(config, outputDir); WriteLine("Done!"); if (config.GenerateScript) { WriteLine("Generate script..."); var scriptGenerator = new ScriptGenerator(executor); scriptGenerator.WriteScript(outputDir); WriteLine("Done!"); } if (config.GenerateDummyDll) { WriteLine("Generate dummy dll..."); DummyAssemblyExporter.Export(executor, outputDir); WriteLine("Done!"); Directory.SetCurrentDirectory(RealPath); //Fix read-only directory permission } WriteLine(""); }