private void cmdPrepareSd_Click(object sender, EventArgs e) { FrmSelectDrive frmSelectDrive = new FrmSelectDrive(new DataSize(5000000UL)); if (frmSelectDrive.ShowDialog() != DialogResult.OK) { return; } GClass94.smethod_9(frmSelectDrive.driveInfo_0); GClass94.smethod_10(frmSelectDrive.driveInfo_0); }
public static void smethod_8(System.IO.DriveInfo driveInfo_0) { Alphaleonis.Win32.Filesystem.Path.Combine(driveInfo_0.Name, "apps", "nintendont", "boot.dol"); string path = Alphaleonis.Win32.Filesystem.Path.Combine(driveInfo_0.Name, "nincfg.bin"); GClass94.smethod_7(driveInfo_0); if (Alphaleonis.Win32.Filesystem.File.Exists(path) || RadMessageBox.Show("USB Helper was unable to detect the configuration file on your SD card. It is required to be able to play GC games. Would you like USB Helper to install it for you?", "Nintendont", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } GClass94.smethod_10(driveInfo_0); }
private int method_16(string string_5) { try { if (this.List_0.Contains(GClass94.smethod_5(string_5))) { return(GClass94.smethod_6(string_5)); } return(-1); } catch { return(-1); } }
private static void smethod_7(System.IO.DriveInfo driveInfo_0) { string path = Alphaleonis.Win32.Filesystem.Path.Combine(driveInfo_0.Name, "apps", "nintendont", "boot.dol"); WebClient webClient = new WebClient(); webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); try { bool flag; if (!Alphaleonis.Win32.Filesystem.File.Exists(path)) { flag = true; } else { byte[] byte_0 = (byte[])null; byte[] numArray = Alphaleonis.Win32.Filesystem.File.ReadAllBytes(path); byte[] bytes = Encoding.ASCII.GetBytes("blob " + numArray.Length.ToString() + "\0"); byte[] buffer = new byte[numArray.Length + bytes.Length]; Buffer.BlockCopy((Array)bytes, 0, (Array)buffer, 0, bytes.Length); Buffer.BlockCopy((Array)numArray, 0, (Array)buffer, bytes.Length, numArray.Length); using (SHA1 shA1 = SHA1.Create()) byte_0 = shA1.ComputeHash(buffer); byte[] byte_1 = ((IEnumerable <GClass21>)JsonConvert.DeserializeObject <GClass21[]>(webClient.DownloadString("https://api.github.com/repos/FIX94/Nintendont/contents//loader"))).First <GClass21>((Func <GClass21, bool>)(gclass21_0 => gclass21_0.name == "loader.dol")).sha.smethod_6(); flag = !GClass27.smethod_1(byte_0, byte_1); } if (!flag || RadMessageBox.Show("USB Helper was unable to detect Nintendont, or a new version is available. It is required to be able to play GC games. Would you like USB Helper to install it for you?", "Nintendont", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } GClass94.smethod_9(driveInfo_0); } catch { } }
public static void smethod_4(IEnumerable <GClass30> ienumerable_0, DriveInfo driveInfo_0, bool bool_0, bool bool_1, Form form_1 = null) { string str1 = "--COPY REPORT--" + Environment.NewLine; int num = 0; IEnumerable <GClass30> source = ienumerable_0; Func <GClass30, bool> func = (Func <GClass30, bool>)(gclass30_0 => gclass30_0.Platform == Platform.Gamecube); Func <GClass30, bool> predicate; if (source.Any <GClass30>(predicate)) { GClass94.smethod_8(driveInfo_0); } foreach (GClass30 gclass30 in ienumerable_0) { string str2 = gclass30.method_9(bool_0, driveInfo_0); if (str2 == "OK") { ++num; if (gclass30 is GClass32) { (gclass30 as GClass32).Boolean_5 = true; } } else { str1 += string.Format("-{0} : {1} {2}", (object)gclass30, (object)str2, (object)Environment.NewLine); } } string string_1 = str1 + string.Format("-{0} title(s) were copied successfully{1}", (object)num, (object)Environment.NewLine); if (!bool_1 || form_1 == null) { return; } Class97.smethod_5("Copy report", string_1, 10, true, (Image)null); }