Esempio n. 1
0
        public override void DeobfuscateBegin()
        {
            base.DeobfuscateBegin();

            stringDecrypter.Initialize(DeobfuscatedFile);
            staticStringInliner.Add(stringDecrypter.RealMethod, (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();
        }
Esempio n. 2
0
        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);
            resourceMethodsRestorer.find(DeobfuscatedFile, this);

            dumpEmbeddedAssemblies();
        }
		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();
		}
Esempio n. 4
0
        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);
            resourceMethodsRestorer.find(DeobfuscatedFile, this);

            dumpEmbeddedAssemblies();
        }