コード例 #1
0
        public override void DeobfuscateBegin()
        {
            base.DeobfuscateBegin();

            antiStrongName = new AntiStrongName();

            staticStringInliner.Add(decrypterType.StringDecrypter1, (method2, gim, args) => {
                return(decrypterType.Decrypt1((string)args[0]));
            });
            staticStringInliner.Add(decrypterType.StringDecrypter2, (method2, gim, args) => {
                return(decrypterType.Decrypt2((string)args[0]));
            });
            DeobfuscatedFile.StringDecryptersAdded();

            libAssemblyResolver = new LibAssemblyResolver(module);
            libAssemblyResolver.Find(DeobfuscatedFile, this);

            if (Operations.DecryptStrings == OpDecryptString.None)
            {
                canRemoveDecrypterType = false;
            }

            RemoveInitCall(nativeLibSaver.InitMethod);
            AddResourceToBeRemoved(nativeLibSaver.Resource, "Native lib resource");
            AddTypeToBeRemoved(nativeLibSaver.Type, "Native lib saver type");

            foreach (var initMethod in decrypterType.InitMethods)
            {
                RemoveInitCall(initMethod);
            }

            DumpUnpackedFiles();
            DumpResourceFiles();

            startedDeobfuscating = true;
        }
コード例 #2
0
ファイル: Deobfuscator.cs プロジェクト: GodLesZ/de4dot
		public override void DeobfuscateBegin() {
			base.DeobfuscateBegin();

			antiStrongName = new AntiStrongName();

			staticStringInliner.Add(decrypterType.StringDecrypter1, (method2, gim, args) => {
				return decrypterType.Decrypt1((string)args[0]);
			});
			staticStringInliner.Add(decrypterType.StringDecrypter2, (method2, gim, args) => {
				return decrypterType.Decrypt2((string)args[0]);
			});
			DeobfuscatedFile.StringDecryptersAdded();

			libAssemblyResolver = new LibAssemblyResolver(module);
			libAssemblyResolver.Find(DeobfuscatedFile, this);

			if (Operations.DecryptStrings == OpDecryptString.None)
				canRemoveDecrypterType = false;

			RemoveInitCall(nativeLibSaver.InitMethod);
			AddResourceToBeRemoved(nativeLibSaver.Resource, "Native lib resource");
			AddTypeToBeRemoved(nativeLibSaver.Type, "Native lib saver type");

			foreach (var initMethod in decrypterType.InitMethods)
				RemoveInitCall(initMethod);

			DumpUnpackedFiles();
			DumpResourceFiles();

			startedDeobfuscating = true;
		}