示例#1
0
        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);
        }
示例#2
0
        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
            }
        }
示例#3
0
        private static void Dump(Metadata metadata, Il2Cpp il2Cpp)
        {
            Console.WriteLine("Dumping...");
            var decompiler = new Il2CppDecompiler(metadata, il2Cpp);

            decompiler.Decompile(config);
            Console.WriteLine("Done!");
            Console.WriteLine("Generate script...");
            var scriptGenerator = new ScriptGenerator(metadata, il2Cpp);

            scriptGenerator.WriteScript(config);
            Console.WriteLine("Done!");
            if (config.DummyDll)
            {
                Console.WriteLine("Generate dummy dll...");
                DummyAssemblyExporter.Export(metadata, il2Cpp);
                Console.WriteLine("Done!");
            }
        }
示例#4
0
        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!");
            }
        }
示例#5
0
        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.GenerateStruct)
            {
                WriteLine("Generate struct...");
                var scriptGenerator = new StructGenerator(executor);
                scriptGenerator.WriteScript(outputDir);
                WriteLine("Done!");
            }
            if (config.GenerateDummyDll)
            {
                WriteLine("Generate dummy dll...");
                DummyAssemblyExporter.Export(executor, outputDir, config.DummyDllAddToken);
                WriteLine("Done!");
                Directory.SetCurrentDirectory(RealPath); //Fix read-only directory permission
            }
        }