Exemplo n.º 1
0
        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
            }
        }