Esempio n. 1
0
 public void CloseServer()
 {
     if (dynocode != null)
     {
         dynocode.Dispose();
     }
     dynocode = null;
 }
Esempio n. 2
0
        bool FindConstants(ISimpleDeobfuscator simpleDeobfuscator)
        {
            dynocode = new DynamicDynocodeIterator();
            simpleDeobfuscator.Deobfuscate(stringMethod);
            stringMethodConsts = new EfConstantsReader(stringMethod);

            if (!FindResource(stringMethod))
            {
                return(false);
            }

            checkMinus2       = isV32OrLater || DeobUtils.HasInteger(stringMethod, -2);
            usePublicKeyToken = CallsGetPublicKeyToken(stringMethod);

            var int64Method = FindInt64Method(stringMethod);

            if (int64Method != null)
            {
                decrypterType.Type = int64Method.DeclaringType;
            }

            if (!FindShorts())
            {
                return(false);
            }
            if (!FindInt3())
            {
                return(false);
            }
            if (!FindInt4())
            {
                return(false);
            }
            if (checkMinus2 && !FindInt5())
            {
                return(false);
            }
            dataDecrypterType = FindDataDecrypterType(stringMethod);
            if (dataDecrypterType == null)
            {
                return(false);
            }

            if (isV32OrLater)
            {
                bool initializedAll;
                int  index = FindInitIntsIndex(stringMethod, out initializedAll);

                var cctor = stringType.FindStaticConstructor();
                if (!initializedAll && cctor != null)
                {
                    simpleDeobfuscator.Deobfuscate(cctor);
                    if (!FindIntsCctor(cctor))
                    {
                        return(false);
                    }
                }

                if (decrypterType.Detected && !decrypterType.Initialize())
                {
                    return(false);
                }

                if (!FindInts(index))
                {
                    return(false);
                }
            }

            InitializeFlags();
            Initialize();

            return(true);
        }
Esempio n. 3
0
 public MyEnumerator(DynamicDynocodeIterator ddi)
 {
     this.ddi = ddi;
 }