コード例 #1
0
        // Token: 0x06000007 RID: 7 RVA: 0x0000289C File Offset: 0x00000A9C
        public static void Main(string[] args)
        {
            int num = Privileges.RemoveAllExcept(new string[]
            {
                "SeAuditPrivilege",
                "SeChangeNotifyPrivilege",
                "SeCreateGlobalPrivilege"
            });

            if (num != 0)
            {
                Environment.Exit(num);
            }
            ExWatson.Register();
            AntispamUpdateSvc.runningAsService = !Environment.UserInteractive;
            bool flag = false;
            int  i    = 0;

            while (i < args.Length)
            {
                string text = args[i];
                string a;
                if ((a = text.Trim()) == null)
                {
                    goto IL_BD;
                }
                if (!(a == "-?"))
                {
                    if (!(a == "-console"))
                    {
                        if (!(a == "-wait"))
                        {
                            if (!(a == "-60"))
                            {
                                goto IL_BD;
                            }
                            AntispamUpdateSvc.pollInterval = 60;
                        }
                        else
                        {
                            AntispamUpdateSvc.waitToContinue = true;
                        }
                    }
                    else
                    {
                        flag = true;
                    }
                }
                else
                {
                    AntispamUpdateSvc.Usage();
                    Environment.Exit(0);
                }
IL_D3:
                i++;
                continue;
IL_BD:
                Console.WriteLine("{0}", text);
                AntispamUpdateSvc.Usage();
                Environment.Exit(0);
                goto IL_D3;
            }
            if (AntispamUpdateSvc.runningAsService)
            {
                ServiceBase.Run(new AntispamUpdateSvc());
                return;
            }
            if (flag)
            {
                AntispamUpdateSvc.RunConsole();
                return;
            }
            Console.WriteLine("Use the '-console' argument to run from the command line");
            AntispamUpdateSvc.Usage();
            Environment.Exit(0);
        }