private void cmdLaunchEmu_Click(object sender, EventArgs e) { if (this.lstEmus.SelectedItem == null) { return; } GClass95 instance = (GClass95)Activator.CreateInstance((Type)this.lstEmus.SelectedItem.Tag, new object[2] { (object)GClass28.dictionary_0.ElementAt <KeyValuePair <TitleId, GClass32> >(0).Value, (object)false }); if (instance.Boolean_0) { new Process() { StartInfo = new ProcessStartInfo() { FileName = instance.GetExecutable(), WorkingDirectory = instance.Root_BIN_Path } }.Start(); } else { int num = (int)RadMessageBox.Show("The emulator is not installed yet. You must use the \"Play this game\" button at least once"); } }
public Class17(string Curren_Game_Path, GClass30 gclass30_1) { if (!Directory.Exists(Curren_Game_Path)) { Directory.CreateDirectory(Curren_Game_Path); } if (gclass30_1.System != SystemType.SystemWiiU) { throw new ArgumentException("Only wup titles are compatible"); } this.Current_Game_Path = Curren_Game_Path; Directory.CreateDirectory(this.Current_Game_Path); this.gclass30_0 = gclass30_1; this.gclass95_0 = this.gclass30_0.method_14(false); this.gclass95_0.Boolean_1 = true; try { this.list_0 = JsonConvert.DeserializeObject <List <string> >(File.ReadAllText(this.String_0)); } catch { this.list_0 = new List <string>(); } this.gclass13_0 = gclass30_1.method_15(); this.class9_0 = new Class9(this.gclass30_0); foreach (GClass12 file in this.gclass13_0.Files) { this.method_0(file); } }
internal static void smethod_3(GClass95 gclass95_0) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type Class67.Class68 class68 = new Class67.Class68(); // ISSUE: reference to a compiler-generated field class68.gclass95_0 = gclass95_0; try { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type Class67.Class69 class69 = new Class67.Class69(); // ISSUE: reference to a compiler-generated field class69.class68_0 = class68; // ISSUE: reference to a compiler-generated field class69.frmWait_0 = new FrmWait("USB Helper is fetching some additional files...", true); WebClient webClient = new WebClient(); // ISSUE: reference to a compiler-generated method webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(class69.method_0); // ISSUE: reference to a compiler-generated method webClient.DownloadDataCompleted += new DownloadDataCompletedEventHandler(class69.method_1); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field webClient.DownloadDataAsync(new Uri(class69.class68_0.gclass95_0.String_0)); // ISSUE: reference to a compiler-generated field int num = (int)class69.frmWait_0.ShowDialog(); } catch { } }
public void method_22() { GClass95 gclass95 = this.method_14(false); if (gclass95 == null) { return; } gclass95.method_5(); }
private static string smethod_4(GClass32 gclass32_0, GClass95 gclass95_0) { System.IO.Path.Combine(GClass88.DirectoryCache, "steam"); string string_1 = GClass128.smethod_8(gclass32_0); System.IO.Directory.CreateDirectory(GClass128.String_0); new GClass78().method_5(string.Format("{0}/res/tools/Shortcut.exe", (object)Class67.CDNWiiUUSBHelperURL), string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0); System.IO.File.WriteAllText(string_1 + ".arg", string.Format("{0}|{1}|{2}", (object)gclass95_0.GetExecutable(), (object)gclass95_0.GetArguments(), (object)System.IO.Path.GetDirectoryName(gclass95_0.GetExecutable()))); return(string_1); }
private static void smethod_2(string string_2) { foreach (string directory in Directory.GetDirectories(string_2)) { GClass95.smethod_2(directory); if (Directory.GetFiles(directory).Length == 0 && Directory.GetDirectories(directory).Length == 0) { Directory.Delete(directory, false); } } }
private static void smethod_5(GClass32 gclass32_0, GClass95 gclass95_0) { string str1 = System.IO.Path.Combine(GClass88.DirectoryCache, "icons"); string str2 = System.IO.Path.Combine(str1, gclass32_0.TitleId.IdRaw + ".ico"); System.IO.Directory.CreateDirectory(str1); using (MemoryStream memoryStream = new MemoryStream(new GClass78().DownloadFile(gclass32_0.IconUrl))) { using (FileStream fileStream = System.IO.File.Create(str2)) GClass124.smethod_0((Bitmap)Image.FromStream((Stream)memoryStream), (Stream)fileStream, 128, false); } string string_2 = GClass128.smethod_4(gclass32_0, gclass95_0); GClass128.smethod_6((GClass30)gclass32_0, GClass30.smethod_2(gclass32_0.Name), Environment.GetFolderPath(Environment.SpecialFolder.Desktop), string_2, str2, gclass32_0.Name, ""); }
private void cmdImport_Click(object sender, EventArgs e) { if (this.lstSaves.SelectedItem == null || RadMessageBox.Show("You are about to import a save. If you already have any local save data, it will be OVERWRITTEN. If you are using Cloud Saving, your cloud save will also be OVERWRITTEN. Continue?", "Continue?", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } GClass95 gclass95 = this.gclass32_0.method_14(false); GClass6.smethod_5(gclass95.FileSaveLocation); GClass27.smethod_7(string.Format("{0}/communitysaves/cdn/{1}", (object)Class67.CloudWiiUUSBHelperURL, (object)(this.lstSaves.SelectedItem.Tag as frmCommunitySaves.Class131).Md5), gclass95.FileSaveLocation); if (Settings.Default.EnableCloudSaving) { gclass95.method_2(gclass95.vmethod_0(), Settings.Default.CloudUserName, Settings.Default.CloudPassWord); } int num = (int)RadMessageBox.Show("Save imported!"); }
public static void smethod_0(GClass32 gclass32_0) { if (!gclass32_0.Boolean_1) { return; } try { GClass95 gclass95_0 = gclass32_0.method_14(false); if (!gclass95_0.Boolean_0) { if (!gclass95_0.EmuConfiguration_0.AutoUpdate) { int num = (int)RadMessageBox.Show(string.Format("No emulator detected. Please install it in {0} or enable Automatic updates in 'Emu. Settings'.", (object)gclass95_0.Root_BIN_Path)); return; } gclass95_0.CheckWebForEmulatorUpdate(); } gclass95_0.FullScreen = true; frmShortcutType frmShortcutType = new frmShortcutType((GClass30)gclass32_0); if (frmShortcutType.ShowDialog() != DialogResult.OK) { return; } if (frmShortcutType.ShortcutType == GEnum9.const_1) { GClass128.smethod_5(gclass32_0, gclass95_0); } else if (frmShortcutType.ShortcutType == GEnum9.const_0) { if (gclass95_0 is Cemu) { (gclass95_0 as Cemu).RenderUpsideDown = frmShortcutType.SteamLinkFix; } GClass128.smethod_7(gclass32_0, gclass95_0); } int num1 = (int)RadMessageBox.Show("Done!"); } catch (Exception ex) { int num = (int)RadMessageBox.Show(ex.ToString()); } }
public static void smethod_3(string string_2, string string_3, bool bool_3 = true) { string str = string_3; foreach (string file in Directory.GetFiles(string_2, "*.*", SearchOption.AllDirectories)) { if (!(file == str) && (!bool_3 || !file.Contains("meta"))) { try { GClass6.smethod_6(file); } catch { } } } GClass95.smethod_2(string_2); }
private void method_17(GClass32 gclass32_1, float float_1 = 1f) { try { SoundEffectInstance soundEffectInstance0 = this.soundEffectInstance_0; if (soundEffectInstance0 != null) { soundEffectInstance0.Stop(); } SoundEffect soundEffect0 = this.soundEffect_0; if (soundEffect0 != null) { soundEffect0.Dispose(); } this.soundEffectInstance_0 = (SoundEffectInstance)null; this.soundEffect_0 = (SoundEffect)null; if (gclass32_1 == null) { return; } GClass95 gclass95 = gclass32_1.method_14(false); if (!File.Exists(gclass95.String_2)) { return; } if (!File.Exists(gclass95.String_3)) { this.method_10(this.GClass32_0); } using (FileStream fileStream = File.OpenRead(gclass95.String_3)) this.soundEffect_0 = SoundEffect.FromStream((Stream)fileStream); if (this.soundEffect_0 == null) { return; } this.soundEffectInstance_0 = this.soundEffect_0.CreateInstance(); this.soundEffect_0.Play(float_1, 0.0f, 0.0f); } catch { } }
private void method_10(GClass32 gclass32_1) { GClass95 gclass95 = gclass32_1.method_14(false); using (BinaryWriter binaryWriter = new BinaryWriter((Stream)File.Create(gclass95.String_3))) { byte[] buffer = new byte[2]; using (FileStream fileStream = File.Open(gclass95.String_2, FileMode.Open)) { binaryWriter.Write(this.byte_0); binaryWriter.Write((int)(fileStream.Length + 44L - 8L)); binaryWriter.Write(this.byte_1); binaryWriter.Write((int)fileStream.Length - 8); while (fileStream.Read(buffer, 0, 2) != 0) { binaryWriter.Write(buffer[1]); binaryWriter.Write(buffer[0]); } } } }
public virtual DataSize vmethod_2() { return(GClass95.smethod_1(this.CurrentGamePath)); }
public void method_13(GClass95 gclass95_0) { gclass95_0.Play(); }
private void FrmImport_Load(object sender, EventArgs e) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type FrmImport.Class156 class156 = new FrmImport.Class156(); // ISSUE: reference to a compiler-generated field class156.frmImport_0 = this; this.lstTitles.SortDescriptors.Add(new SortDescriptor("Value", ListSortDirection.Ascending)); // ISSUE: reference to a compiler-generated field class156.string_0 = new string[0]; // ISSUE: reference to a compiler-generated field class156.string_1 = new string[0]; int num1; // ISSUE: reference to a compiler-generated method FrmWait frmWait = new FrmWait("USB Helper is looking for importable titles...", new Action(class156.method_0), (Action <Exception>)(exception_0 => num1 = (int)RadMessageBox.Show("An error has occured.\n" + (object)exception_0))); Struct4 struct4; // ISSUE: reference to a compiler-generated field foreach (string str1 in class156.string_0) { string str2 = "Ready to import"; GClass100 gclass100 = GClass100.smethod_0(str1, GEnum3.const_1); TitleId titleId = new TitleId(gclass100.TitleId.ToString("x16")); if (!GClass28.dictionary_0.ContainsKey(titleId.FullGame)) { string str3 = "Cannot be imported, not in the database"; ListViewDataItem listViewDataItem = new ListViewDataItem(); this.lstTitles.Items.Add(listViewDataItem); listViewDataItem.Enabled = false; listViewDataItem[0] = (object)string.Format("UNKNOWN ({0})", (object)titleId.IdRaw); listViewDataItem[1] = (object)str3; } else { GClass30 gclass30 = (GClass30)null; switch (titleId.IdType) { case GEnum1.const_0: gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame]; if (gclass30.System == GEnum3.const_0) { gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame].Updates.Last <GClass33>(); break; } if (gclass30.System == GEnum3.const_1) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type FrmImport.Class157 class157 = new FrmImport.Class157(); // ISSUE: reference to a compiler-generated field class157.ushort_0 = gclass100.TitleVersion; try { // ISSUE: reference to a compiler-generated method gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame].Updates.Find(new Predicate <GClass33>(class157.method_0)); break; } catch { gclass30 = (GClass30)null; break; } } else { break; } case GEnum1.const_1: gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame]; break; case GEnum1.const_2: gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame].Dlc; break; case GEnum1.const_3: gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame]; break; case GEnum1.const_4: gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame]; break; } if (gclass30 != null) { ListViewDataItem listViewDataItem1 = new ListViewDataItem(); struct4 = new Struct4(); struct4.gclass100_0 = gclass100; struct4.gclass30_0 = gclass30; struct4.string_0 = Path.GetDirectoryName(str1); listViewDataItem1.Tag = (object)struct4; ListViewDataItem listViewDataItem2 = listViewDataItem1; if (gclass30.GEnum2_0 != GEnum2.const_0) { str2 = "Cannot be imported, already in the library"; listViewDataItem2.Enabled = false; } this.lstTitles.Items.Add(listViewDataItem2); listViewDataItem2[0] = (object)gclass30.ToString(); listViewDataItem2[1] = (object)str2; } } } // ISSUE: reference to a compiler-generated field foreach (string str in class156.string_1) { try { if (!(new DirectoryInfo(Path.GetDirectoryName(str)).Name != "meta")) { TitleId key = new TitleId(XDocument.Load(str).Descendants((XName)"title_id").ElementAt <XElement>(0).Value); if (key.IdType == GEnum1.const_1) { if (GClass28.dictionary_0.ContainsKey(key)) { GClass32 gclass32 = GClass28.dictionary_0[key]; GClass95 gclass95 = gclass32.method_14(false); if (gclass95 != null) { if (!gclass32.Boolean_1) { ListViewDataItem listViewDataItem1 = new ListViewDataItem(); this.lstTitles.Items.Add(listViewDataItem1); listViewDataItem1[0] = (object)(gclass32.Name + " (EMU)"); listViewDataItem1[1] = (object)"Importable"; ListViewDataItem listViewDataItem2 = listViewDataItem1; struct4 = new Struct4(); struct4.gclass30_0 = (GClass30)gclass32; struct4.gclass95_0 = gclass95; struct4.string_0 = new DirectoryInfo(Path.GetDirectoryName(str)).Parent.FullName; // ISSUE: variable of a boxed type __Boxed <Struct4> local = (ValueType)struct4; listViewDataItem2.Tag = (object)local; } } } } } } catch { } } if (this.lstTitles.Items.Count != 0) { return; } int num2 = (int)RadMessageBox.Show("No games were found. Please specify another path."); this.DialogResult = DialogResult.Abort; this.Close(); }
public frmDisclaimerCEMU(GClass95 gclass95_0) { this.InitializeComponent(); this.Text = gclass95_0.Name; this.label1.Text = string.Format("This feature is powered by {0}.\n{1}.\nYou need to have a powerful pc to be able to play games.\nPlease note that the emulator is still in development so you might encounter issues.", (object)gclass95_0.Name, (object)gclass95_0.Url); }
public GClass17(GClass95 gclass95_1) { this.gclass95_0 = gclass95_1; }
private void method_0() { this.gclass95_0 = this.gclass32_0.method_14(false); if (this.gclass95_0 == null) { int num = (int)RadMessageBox.Show("This title does not support emulation, so there is nothing to show here!"); this.Close(); } else { this.lblEmuName.Text = this.gclass95_0.Name; this.lblEmuPath.Text = this.gclass95_0.String_4; this.lblEmuStatus.Text = frmEmuInfo.smethod_0(this.gclass95_0.Boolean_0); this.lblGameStatus.Text = frmEmuInfo.smethod_0(this.gclass95_0.Boolean_2); this.lblUpdateStatus.Text = frmEmuInfo.smethod_0(this.gclass95_0.UpdateIsInstalled()); this.lblDLCStatus.Text = frmEmuInfo.smethod_0(this.gclass95_0.DlcIsInstalled()); this.bool_0 = true; if (this.gclass32_0.Boolean_2) { this.chkExceptionDLC.Checked = GClass3.smethod_3((GClass30)this.gclass32_0.Dlc); } else { this.chkExceptionDLC.Enabled = false; } if (this.gclass32_0.Boolean_3) { this.chkExceptionUpdate.Checked = GClass3.smethod_3((GClass30)this.gclass32_0.Updates[0]); } else { this.chkExceptionUpdate.Enabled = false; } this.bool_0 = false; this.lblUpdateVersion.Text = string.Format("v{0}", (object)this.gclass95_0.GetUpdateVersion()); bool flag = this.gclass32_0.method_14(false) is Cemu; this.cmdVerifyGame.Visible = flag && this.gclass95_0.Boolean_2; this.cmdVerifyUpdate.Visible = flag && this.gclass95_0.UpdateIsInstalled(); this.cmdVerifyDlc.Visible = flag && this.gclass95_0.DlcIsInstalled(); this.cmdDeleteGame.Enabled = this.gclass95_0.Boolean_2; this.cmdDeleteUpdate.Enabled = this.gclass95_0.UpdateIsInstalled(); this.cmdDeleteDlc.Enabled = this.gclass95_0.DlcIsInstalled(); this.pictGame.Image = this.gclass32_0.gclass86_2.Image; foreach (object control1 in (ArrangedElementCollection)this.radGroupBox1.Controls) { if (control1 is RadGroupBox) { foreach (object control2 in (ArrangedElementCollection)((Control)control1).Controls) { if (control2 is RadLabel) { RadLabel radLabel = (RadLabel)control2; string text = radLabel.Text; if (!(text == "Installed")) { if (text == "Not installed") { radLabel.ForeColor = Color.Red; } } else { radLabel.ForeColor = Color.Green; } } } } } } }
public void method_12(bool bool_3 = true) { GClass95.smethod_3(this.CurrentGamePath, this.GetRom(), bool_3); }
private static void smethod_7(GClass32 gclass32_0, GClass95 gclass95_0) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type GClass128.Class114 class114 = new GClass128.Class114(); // ISSUE: reference to a compiler-generated field class114.gclass32_0 = gclass32_0; if (GClass6.smethod_16("Steam")) { int num1 = (int)RadMessageBox.Show("Games cannot be added while Steam is running. Please close it and try again"); } else { string steamFolder = SteamManager.GetSteamFolder(); if (!System.IO.Directory.Exists(steamFolder)) { int num2 = (int)RadMessageBox.Show("Steam is not installed. Cannot proceed."); } else { string[] users = SteamManager.GetUsers(steamFolder); if (users.Length == 0) { int num3 = (int)RadMessageBox.Show("USB Helper was unable to find any registered Steam user. Make sure you have logged in at least once."); } else { string str1 = System.IO.Path.Combine(GClass128.String_0, "backup"); System.IO.Directory.CreateDirectory(GClass128.String_0); System.IO.Directory.CreateDirectory(str1); // ISSUE: reference to a compiler-generated field string str2 = System.IO.Path.Combine(GClass128.String_0, "icon" + class114.gclass32_0.TitleId.IdRaw + ".tmp"); // ISSUE: reference to a compiler-generated field string filename = System.IO.Path.Combine(GClass128.String_0, "icon" + class114.gclass32_0.TitleId.IdRaw + ".png"); // ISSUE: reference to a compiler-generated field new GClass78().method_5(class114.gclass32_0.IconUrl, str2, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0); Image image = Image.FromFile(str2); image.Save(filename, ImageFormat.Png); image.Dispose(); GClass6.smethod_6(str2); // ISSUE: reference to a compiler-generated field string str3 = GClass128.smethod_4(class114.gclass32_0, gclass95_0); // ISSUE: reference to a compiler-generated field VDFEntry vdfEntry = new VDFEntry() { AppName = class114.gclass32_0.Name, Exe = str3, Icon = filename, Tags = new string[1] { "Wii U USB Helper" } }; foreach (string userPath in users) { List <VDFEntry> source = new List <VDFEntry>(); try { source = new List <VDFEntry>((IEnumerable <VDFEntry>)SteamManager.ReadShortcuts(userPath)); } catch { } // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method if (!source.Any <VDFEntry>(class114.func_0 ?? (class114.func_0 = new Func <VDFEntry, bool>(class114.method_0)))) { source.Add(vdfEntry); string str4 = userPath + "\\config\\shortcuts.vdf"; System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(str4)); if (System.IO.File.Exists(str4)) { System.IO.File.Copy(str4, System.IO.Path.Combine(str1, DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds.ToString()), true); } SteamManager.WriteShortcuts(source.ToArray(), str4); } } // ISSUE: reference to a compiler-generated field GClass128.smethod_2(class114.gclass32_0); } } } }