コード例 #1
0
        // Token: 0x060000C6 RID: 198 RVA: 0x0000EF8C File Offset: 0x0000D18C
        private static void InternalRename(MethodDef method)
        {
            string text = Renamer_v2.GenerateString();

            while (Renamer_v2.methodNewName.Contains(text))
            {
                text = Renamer_v2.GenerateString();
            }
            Renamer_v2.methodNewName.Add(text);
            method.Name = text;
        }
コード例 #2
0
        // Token: 0x060000C7 RID: 199 RVA: 0x0000EFD0 File Offset: 0x0000D1D0
        private static void InternalRename(FieldDef field)
        {
            string text = Renamer_v2.GenerateString();

            while (Renamer_v2.fieldNewName.Contains(text))
            {
                text = Renamer_v2.GenerateString();
            }
            Renamer_v2.fieldNewName.Add(text);
            field.Name = text;
        }
コード例 #3
0
        // Token: 0x060000C5 RID: 197 RVA: 0x0000EF48 File Offset: 0x0000D148
        private static void InternalRename(TypeDef type)
        {
            string text = Renamer_v2.GenerateString();

            while (Renamer_v2.typeNewName.Contains(text))
            {
                text = Renamer_v2.GenerateString();
            }
            Renamer_v2.typeNewName.Add(text);
            type.Name = text;
        }
コード例 #4
0
        // Token: 0x060000C4 RID: 196 RVA: 0x0000EC20 File Offset: 0x0000CE20
        public static void Execute(ModuleDef module)
        {
            bool isObfuscationActive = Renamer_v2.IsObfuscationActive;

            if (isObfuscationActive)
            {
                string text = Renamer_v2.GenerateString();
                foreach (TypeDef typeDef in module.Types)
                {
                    bool flag2;
                    bool flag = Renamer_v2.typeRename.TryGetValue(typeDef, out flag2);
                    if (flag)
                    {
                        bool flag3 = flag2;
                        if (flag3)
                        {
                            Renamer_v2.InternalRename(typeDef);
                        }
                    }
                    else
                    {
                        Renamer_v2.InternalRename(typeDef);
                    }
                    typeDef.Namespace = "";
                    foreach (MethodDef methodDef in typeDef.Methods)
                    {
                        bool flag5;
                        bool flag4 = Renamer_v2.methodRename.TryGetValue(methodDef, out flag5);
                        if (flag4)
                        {
                            bool flag6 = flag5 && !methodDef.IsConstructor && !methodDef.IsSpecialName;
                            if (flag6)
                            {
                                Renamer_v2.InternalRename(methodDef);
                            }
                        }
                        else
                        {
                            bool flag7 = !methodDef.IsConstructor && !methodDef.IsSpecialName;
                            if (flag7)
                            {
                                Renamer_v2.InternalRename(methodDef);
                            }
                        }
                    }
                    Renamer_v2.methodNewName.Clear();
                    foreach (FieldDef fieldDef in typeDef.Fields)
                    {
                        bool flag9;
                        bool flag8 = Renamer_v2.fieldRename.TryGetValue(fieldDef, out flag9);
                        if (flag8)
                        {
                            bool flag10 = flag9;
                            if (flag10)
                            {
                                Renamer_v2.InternalRename(fieldDef);
                            }
                        }
                        else
                        {
                            Renamer_v2.InternalRename(fieldDef);
                        }
                    }
                    Renamer_v2.fieldNewName.Clear();
                }
            }
            else
            {
                foreach (KeyValuePair <TypeDef, bool> keyValuePair in Renamer_v2.typeRename)
                {
                    bool value = keyValuePair.Value;
                    if (value)
                    {
                        Renamer_v2.InternalRename(keyValuePair.Key);
                    }
                }
                foreach (KeyValuePair <MethodDef, bool> keyValuePair2 in Renamer_v2.methodRename)
                {
                    bool value2 = keyValuePair2.Value;
                    if (value2)
                    {
                        Renamer_v2.InternalRename(keyValuePair2.Key);
                    }
                }
                foreach (KeyValuePair <FieldDef, bool> keyValuePair3 in Renamer_v2.fieldRename)
                {
                    bool value3 = keyValuePair3.Value;
                    if (value3)
                    {
                        Renamer_v2.InternalRename(keyValuePair3.Key);
                    }
                }
            }
        }