Beispiel #1
0
        void Find(TypeDef type, ICflowDeobfuscator cflowDeobfuscator)
        {
            var additionalTypes = new List <string> {
                "System.IO.BinaryWriter",
            };

            foreach (var method in type.Methods)
            {
                if (!DotNetUtils.IsMethod(method, "System.Void", "(System.Int32[],System.UInt32[])"))
                {
                    continue;
                }
                if (!DecryptMethod.CouldBeDecryptMethod(method, additionalTypes))
                {
                    continue;
                }
                cflowDeobfuscator.Deobfuscate(method);
                if (!decryptMethod.GetKey(method))
                {
                    continue;
                }

                FindPatchData(type, cflowDeobfuscator);
                return;
            }
        }
Beispiel #2
0
        void Find(TypeDef type, ICflowDeobfuscator cflowDeobfuscator)
        {
            var additionalTypes = new List <string> {
                "System.IO.BinaryReader",
                "System.IO.FileStream",
                "System.Reflection.Assembly",
                "System.Reflection.Assembly[]",
                "System.String",
            };

            foreach (var method in type.Methods)
            {
                if (!DotNetUtils.IsMethod(method, "System.Reflection.Assembly", "(System.Object,System.ResolveEventArgs)"))
                {
                    continue;
                }
                if (!DecryptMethod.CouldBeDecryptMethod(method, additionalTypes))
                {
                    continue;
                }
                cflowDeobfuscator.Deobfuscate(method);
                if (!decryptMethod.GetKey(method))
                {
                    continue;
                }

                return;
            }
        }