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); }
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 { } }