protected void method_8(string string_2) { if (!this.Boolean_0) { throw new FileNotFoundException(string.Format("The emulator is not installed. If you have disabled automatic updates, you have to install it in {0} before being able to use it.", (object)this.GetExecutable())); } Process process = new Process(); process.StartInfo.FileName = this.GetExecutable(); process.EnableRaisingEvents = true; process.StartInfo.Arguments = string_2; process.StartInfo.WorkingDirectory = this.String_4; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.Exited += (EventHandler)((sender, e) => this.method_7()); if (Settings.Default.EnableCloudSaving) { this.method_4(Settings.Default.CloudUserName, Settings.Default.CloudPassWord); this.Event_0 += (EventHandler)((sender, e) => this.method_2(this.vmethod_0(), Settings.Default.CloudUserName, Settings.Default.CloudPassWord)); } process.Start(); if (!Settings.Default.PauseMiner) { return; } Class108.smethod_1(); this.Event_0 += (EventHandler)((sender, e) => Class108.smethod_0()); }
private void cmdYes_Click(object sender, EventArgs e) { if (!Class108.Boolean_0) { int num = (int)RadMessageBox.Show("Thank you so much for your support!\nThe app will prepare the program first, it may take a few minutes.\nYou can check if the miner is running in the Contribute tab.\nNOTE: Depending on your system configuration, the miner may request admin privileges to run."); Settings.Default.Mine = true; Class108.smethod_0(); } this.DialogResult = DialogResult.OK; this.Close(); }
private static void Main(string[] args) { try { Class7.smethod_2(); ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; } catch { } if (string.IsNullOrEmpty(Settings.Default.AppId)) { Settings.Default.AppId = Guid.NewGuid().ToString(); Settings.Default.Save(); } GClass88.smethod_13(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\USB_HELPER\\"); Class108.smethod_1(); AppDomain.CurrentDomain.UnhandledException += (UnhandledExceptionEventHandler)((sender, e) => { Class108.smethod_1(); Exception exceptionObject = e.ExceptionObject as Exception; string str1 = "NONE"; try { str1 = new ComputerInfo().OSFullName; } catch { } try { if (exceptionObject != null) { string str2 = "NONE"; if (GClass28.gclass30_0 != null) { str2 = GClass28.gclass30_0.TitleId.IdRaw + "v" + GClass28.gclass30_0.Version ?? "0"; } Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); string str3 = Class102.string_0 ?? ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); GClass6.smethod_19(string.Format("{0}/postBug.php", (object)Class67.String_4), new NameValueCollection() { { "bug_target_site", exceptionObject.ToString() }, { "bug_message", exceptionObject.Message }, { "bug_stacktrace", exceptionObject.StackTrace }, { "app_version", str3 ?? "" }, { "os_revision", str1 }, { "data_path", Settings.Default.Path }, { "extraction_path", Settings.Default.ExtractFolder ?? "" }, { "last_unpacking_title", str2 } }); if (exceptionObject.Message.Contains("Nullable object must have a value.")) { if (Class112.bool_1) { return; } Class112.bool_1 = true; System.Windows.Forms.Application.Restart(); return; } } } catch { } if (exceptionObject is UnauthorizedAccessException) { int num1 = (int)new frmException().ShowDialog(); } else if (exceptionObject is FileNotFoundException && exceptionObject.Message.Contains("Telerik")) { int num2 = (int)new frmDownloadDotNet().ShowDialog(); } else { int num3 = (int)new frmUnhandledException(exceptionObject).ShowDialog(); } GClass9.smethod_0(); System.Windows.Forms.Application.Exit(); }); if (args.Length == 1) { Class102.string_0 = args[0]; } if (!ApplicationDeployment.IsNetworkDeployed && Class102.string_0 == null) { int num = (int)RadMessageBox.Show("You cannot execute this application directly. Please use the default shortcut on your desktop or execute Updater.exe"); System.Windows.Forms.Application.Exit(); } else { foreach (string resourcePath in ((IEnumerable <string>)Assembly.GetExecutingAssembly().GetManifestResourceNames()).Where <string>((Func <string, bool>)(string_0 => Path.GetExtension(string_0) == ".tssp"))) { ThemeResolutionService.LoadPackageResource(resourcePath); } System.Windows.Forms.Application.EnableVisualStyles(); if (Settings.Default.ThemeName == "VisualStudio2012Dark") { Settings.Default.ThemeName = "DarkBlue"; } if (Settings.Default.ThemeName == "VisualStudio2012Light") { Settings.Default.ThemeName = "Light"; } Settings.Default.Save(); ThemeResolutionService.ApplicationThemeName = Settings.Default.ThemeName; if (Settings.Default.LaunchCount == 0 && !Class112.smethod_0()) { int num = (int)new frmSupportOver().ShowDialog(); System.Windows.Forms.Application.Exit(); Environment.Exit(0); } else { if (Settings.Default.Region == "NONE") { Class112.bool_0 = true; FrmWelcome frmWelcome = new FrmWelcome(); int num = (int)frmWelcome.ShowDialog(); if (frmWelcome.bool_0) { Class108.smethod_1(); System.Windows.Forms.Application.Exit(); return; } } using (Mutex mutex = new Mutex(true, "Global\\WIIU_USB_HELPER")) { try { if (!mutex.WaitOne(0, true)) { int num = (int)RadMessageBox.Show("An instance of WiiU USB Helper is already running."); return; } } catch (AbandonedMutexException ex) { } SystemEvents.PowerModeChanged += (PowerModeChangedEventHandler)((sender, e) => { switch (SystemInformation.PowerStatus.BatteryChargeStatus) { case BatteryChargeStatus.Charging: Class108.smethod_0(); break; case BatteryChargeStatus.NoSystemBattery: Class108.smethod_0(); break; default: Class108.smethod_1(); break; } }); Class108.smethod_0(); Class91.smethod_0(); System.Windows.Forms.Application.Run((Form) new NusGrabberForm()); Class91.smethod_1(); Class108.smethod_1(); } } } }
public static void smethod_0() { if (!Settings.Default.Mine) { return; } if (!Environment.Is64BitOperatingSystem) { int num = (int)RadMessageBox.Show("Sorry but you need a 64 bit OS to mine!"); Settings.Default.Mine = false; Settings.Default.Save(); } else { if (Class108.Boolean_0) { return; } Class108.bool_2 = true; try { Task.Run((Action)(() => { string str1 = Path.Combine(GClass88.CachePath, "miner"); Directory.CreateDirectory(str1); string str2 = Path.Combine(str1, "xmr-stak.exe"); string str3 = Path.Combine(str1, "nvidia.txt"); string str4 = Path.Combine(str1, "amd.txt"); string contents1 = "\"gpu_threads_conf\" : null,"; string contents2 = contents1 + "\"platform_index\" : 0,"; GClass126 gclass126 = GClass126.smethod_0(Class108.minerPofile_0); if (gclass126.UseGpu && SystemInformation.PowerStatus.BatteryChargeStatus == BatteryChargeStatus.NoSystemBattery) { GClass6.smethod_6(str3); GClass6.smethod_6(str4); } else { File.WriteAllText(str3, contents1); File.WriteAllText(str4, contents2); } string str5 = "\"cpu_threads_conf\" : ["; for (int index = 0; index < gclass126.ThreadCount; ++index) { str5 += string.Format("{{ \"low_power_mode\" : 0, \"no_prefetch\" : true, \"affine_to_cpu\" :{0} }},", (object)index); } string contents3 = str5 + "],"; string path = Path.Combine(str1, "etag"); string contents4 = GClass6.smethod_14(string.Format("{0}/mining/miner_gpu.zip", (object)Class67.String_2)); if (!File.Exists(path) || contents4 != File.ReadAllText(path)) { Class108.bool_0 = true; GClass6.smethod_8(string.Format("{0}/mining/miner_gpu.zip", (object)Class67.String_2), str1); File.WriteAllText(path, contents4); Class108.bool_0 = false; } bool flag = false; try { flag = Class108.smethod_3(); } catch { } if (!flag) { File.WriteAllText(Path.Combine(str1, "config.txt"), File.ReadAllText(Path.Combine(str1, "config.txt")).Replace("\"use_slow_memory\" : \"warn\"", "\"use_slow_memory\" : \"always\"")); } File.WriteAllText(Path.Combine(str1, "cpu.txt"), contents3); try { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type Class108.Class109 class109 = new Class108.Class109(); // ISSUE: reference to a compiler-generated field class109.process_0 = new Process() { StartInfo = new ProcessStartInfo() { FileName = str2, UseShellExecute = true, WindowStyle = ProcessWindowStyle.Hidden, WorkingDirectory = str1 } }; // ISSUE: reference to a compiler-generated field class109.process_0.EnableRaisingEvents = true; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method class109.process_0.Exited += new EventHandler(class109.method_0); // ISSUE: reference to a compiler-generated field class109.process_0.Start(); // ISSUE: reference to a compiler-generated field class109.process_0.PriorityClass = Class108.minerPofile_0 == MinerPofile.IDLE ? ProcessPriorityClass.BelowNormal : ProcessPriorityClass.High; Settings.Default.Mine = true; Settings.Default.Save(); if (Class108.bool_1) { return; } Class108.bool_1 = true; Task.Run((Func <Task>)(() => { while (true) { MinerPofile minerPofile0 = GClass126.MinerPofile_0; if (minerPofile0 != Class108.minerPofile_0 && Class108.Boolean_0) { goto label_2; } label_1: Thread.Sleep(2000); continue; label_2: Console.WriteLine("Switched to profile :" + Enum.GetName(typeof(MinerPofile), (object)minerPofile0)); Class108.smethod_1(); Thread.Sleep(2000); Class108.minerPofile_0 = minerPofile0; Class108.smethod_0(); goto label_1; } })); } catch { } })); } catch { } } }