// Token: 0x06000063 RID: 99 RVA: 0x00003044 File Offset: 0x00003044
 private void HandleCriticalError(Exception exception)
 {
     if (exception != null)
     {
         this.HandleUnhandledException(exception);
         App.AppExit();
     }
 }
 // Token: 0x06000064 RID: 100 RVA: 0x00003058 File Offset: 0x00003058
 private void HandleUnhandledException(Exception exception)
 {
     if (!this.hasUnhandledException)
     {
         this.hasUnhandledException = true;
         util.CreateLog(string.Format("[HRESULT: 0x{0:X8} - {1}] {2} [Line : {3}]", new object[]
         {
             exception.HResult,
             exception.GetType().Name,
             exception.Message,
             exception.LineNumber()
         }));
         base.Dispatcher.Invoke(delegate()
         {
             MessageBox.Show("The app must close due to an error. The error log file is created.", "Launcher error");
         });
         this.Cleanup();
         App.AppExit();
     }
 }
 // Token: 0x06000062 RID: 98 RVA: 0x00002F04 File Offset: 0x00002F04
 protected override void OnStartup(StartupEventArgs e)
 {
     if (this.HasCriticalException)
     {
         this.HandleCriticalError(this.criticalException);
         return;
     }
     base.OnStartup(e);
     try
     {
         bool      flag             = true;
         Process[] processesByName  = Process.GetProcessesByName("r5Apex");
         IntPtr    value            = WinAPI.FindWindow("CryENGINE", "Warface");
         Process[] processesByName2 = Process.GetProcessesByName("Game");
         Process[] processesByName3 = Process.GetProcessesByName("GameCenter");
         if (processesByName2.Length != 0 || value != IntPtr.Zero || processesByName.Length != 0)
         {
             flag = false;
         }
         if (processesByName3.Length != 0)
         {
             Protect.KillProcesses(new string[]
             {
                 "GameCenter"
             });
         }
         if (flag)
         {
             if (!util.IsConnectedToInternet())
             {
                 base.Dispatcher.Invoke(delegate()
                 {
                     CustomMessageBox.Show(CLanguage.GetTranslateText("errorconnect"), CLanguage.GetTranslateText("err_header_msg"), MessageBoxButton.OK, false);
                 });
                 flag = false;
             }
             if (!util.IsRunAsAdmin())
             {
                 Process.Start(new ProcessStartInfo(Process.GetCurrentProcess().MainModule.FileName)
                 {
                     Verb = "runas"
                 });
                 flag = false;
             }
         }
         if (flag)
         {
             this.appMutex = new INFMutex(new Func <bool>(this.InitializeProgram));
             flag          = this.appMutex.InitializeProgramOrSendMessage();
         }
         if (!flag)
         {
             this.Cleanup();
             App.AppExit();
         }
     }
     catch (Exception)
     {
         this.Cleanup();
         App.AppExit();
     }
 }