// Token: 0x06000992 RID: 2450 RVA: 0x00029A58 File Offset: 0x00027C58
        private static void SetupSystemConsole()
        {
            bool flag  = false;
            bool flag2 = false;

            string[] commandLineArgs = Environment.GetCommandLineArgs();
            for (int i = 0; i < commandLineArgs.Length; i++)
            {
                if (commandLineArgs[i] == "-console")
                {
                    flag = true;
                }
                if (commandLineArgs[i] == "-console_detach")
                {
                    flag2 = true;
                }
            }
            if (flag)
            {
                Console.systemConsoleType = Console.SystemConsoleType.Attach;
                if (flag2)
                {
                    Console.systemConsoleType = Console.SystemConsoleType.Alloc;
                }
            }
            switch (Console.systemConsoleType)
            {
            case Console.SystemConsoleType.Attach:
                Console.AttachConsole(-1);
                break;

            case Console.SystemConsoleType.Alloc:
                Console.AllocConsole();
                break;
            }
            if (Console.systemConsoleType != Console.SystemConsoleType.None)
            {
                Console.SetIn(new StreamReader(Console.OpenStandardInput()));
                Console.stdInReaderThread = new Thread(new ThreadStart(Console.ThreadedInputQueue));
                Console.stdInReaderThread.Start();
            }
        }