示例#1
0
    // Token: 0x06000045 RID: 69 RVA: 0x0000913C File Offset: 0x0000733C
    private static bool xorStringBuilder(string input, int int_0)
    {
        string        secret        = "3cD1Z84acsdf1caEBbfgMeAF0bObA";
        StringBuilder stringBuilder = GClass0.newStringBuilder();
        int           num           = 0;
        int           num4          = 0;

        for (; ;)
        {
IL_D0:
            uint num2 = 169177363U;
            for (; ;)
            {
                uint num3;
                switch ((num3 = (num2 ^ 200344158U)) % 6U)
                {
                case 0U:
                    goto IL_D0;

                case 1U:
                    num2 = (num3 * 1049313381U ^ 1849965166U);
                    continue;

                case 2U:
                {
                    num4 = (int)(GClass0.GetCharAtOffset(input, num) * '*');
                    num2 = 708881281U;
                    continue;
                }

                case 3U:
                    num2 = ((num < GClass0.stringLength(input)) ? 1292729362U : 1878786418U);
                    continue;

                case 5U:
                {
                    int int_ = ((num4 >> 6) + (num4 >> 5) & 127) ^ (num4 + (int)GClass0.GetCharAtOffset(secret, num) & 127) ^ (int)GClass0.GetCharAtOffset(secret, GClass0.stringLength(input) - num - 1);
                    stringBuilder = GClass0.stringBuilderAppend(stringBuilder, GClass0.toChar(int_));
                    num++;
                    num2 = (num3 * 506734605U ^ 1767636828U);
                    continue;
                }
                }
                goto Block_2;
            }
        }
Block_2:
        return(GClass1.checkFlagFormat(GClass0.toString(stringBuilder), int_0, false));
    }
示例#2
0
    // Token: 0x06000044 RID: 68 RVA: 0x000090AC File Offset: 0x000072AC
    public static bool checkFlag(string user_input)
    {
        uint num2;

        if (GClass1.checkFlagFormat(user_input, 41, true))
        {
            num2 = 26855954U;
        }
        else
        {
            GClass0.WriteLine("Invalid key format");
            num2 = 1370466160U;
        }
        for (; ;)
        {
            uint num;
            switch ((num = (num2 ^ 1725436766U)) % 5U)
            {
            case 1U:
                num2 = ((GClass0.xorStringBuilder(user_input, 74) ? 3365316463U : 2561374200U) ^ num * 2157556502U);
                continue;

            case 2U:
                return(true);

            case 3U:
            {
                GClass0.WriteLine("Invalid key format");
                num2 = 1370466160U;
                break;
            }

            case 4U:
                continue;
            }
            break;
        }

        return(false);
    }