public override void deobfuscateBegin()
        {
            base.deobfuscateBegin();

            stringDecrypter.initialize(DeobfuscatedFile);
            staticStringInliner.add(stringDecrypter.Method, (method2, gim, args) => {
                return(stringDecrypter.decrypt((int)args[0]));
            });
            DeobfuscatedFile.stringDecryptersAdded();

            assemblyResolver.initialize(DeobfuscatedFile, this);
            assemblyResolver.initializeEmbeddedFiles();
            addModuleCctorInitCallToBeRemoved(assemblyResolver.InitMethod);

            resourceResolver.initialize(DeobfuscatedFile, this);
            foreach (var info in resourceResolver.mergeResources())
            {
                addResourceToBeRemoved(info.Resource, "Encrypted resources");
            }
            addModuleCctorInitCallToBeRemoved(resourceResolver.InitMethod);

            resourceMethodsRestorer = new ResourceMethodsRestorer(module);
            if ((Operations.RenamerFlags & (RenamerFlags.RenameTypes | RenamerFlags.RenameNamespaces)) != 0)
            {
                resourceMethodsRestorer.find(DeobfuscatedFile, this);
            }

            dumpEmbeddedAssemblies();
        }
示例#2
0
        public override void deobfuscateBegin()
        {
            base.deobfuscateBegin();

            stringDecrypter.initialize(DeobfuscatedFile);
            staticStringInliner.add(stringDecrypter.Method, (method2, args) => {
                return(stringDecrypter.decrypt((int)args[0]));
            });
            DeobfuscatedFile.stringDecryptersAdded();

            assemblyResolver.initialize(DeobfuscatedFile, this);
            assemblyResolver.initializeEmbeddedFiles();
            addModuleCctorInitCallToBeRemoved(assemblyResolver.InitMethod);

            resourceResolver.initialize(DeobfuscatedFile, this);
            foreach (var info in resourceResolver.mergeResources())
            {
                addResourceToBeRemoved(info.Resource, "Encrypted resources");
            }
            addModuleCctorInitCallToBeRemoved(resourceResolver.InitMethod);

            getManifestResourceRestorer = new GetManifestResourceRestorer(module);
            getManifestResourceRestorer.find(DeobfuscatedFile, this);

            dumpEmbeddedAssemblies();
        }