public void method_18(string string_7) { string text = Delegate124.smethod_0(Class3.smethod_0 <string>(1039446687u, 331866531155298722uL), this.string_3); string text2 = Delegate124.smethod_0(text, "\\Keys"); Delegate124.smethod_0(text, "\\Files"); string text3 = Delegate124.smethod_0(string_7, ".tmp"); Delegate24.smethod_0(); Delegate189.smethod_0(true); RSACryptoServiceProvider object_ = Delegate33.smethod_0(); string text4 = (string)Delegate169.smethod_0(text2, "Private", "No Private Key was found!"); if (Delegate98.smethod_0(text4, "")) { Delegate164.smethod_0(object_, text4); byte[] byte_ = new byte[344]; FileStream object_2 = Delegate35.smethod_0(string_7, FileMode.Open, FileAccess.Read); Delegate187.smethod_0(object_2, -344L, SeekOrigin.End); Delegate190.smethod_0(object_2, byte_, 0, 344); string text5 = Delegate191.smethod_0(Delegate166.smethod_0(), byte_); byte[] byte_2 = Delegate146.smethod_0(text5); byte[] array = Delegate168.smethod_1(object_, byte_2, false); Delegate153.smethod_1(array); Delegate162.smethod_0(object_2); FileStream object_3 = Delegate35.smethod_0(string_7, FileMode.Open, FileAccess.ReadWrite); Delegate193.smethod_0(object_3, Delegate192.smethod_0(object_3) - 344L); Delegate162.smethod_0(object_3); using (FileStream fileStream = Delegate32.smethod_0(text3, FileMode.Create)) { using (AesManaged aesManaged = Delegate36.smethod_0()) { using (CryptoStream cryptoStream = Delegate26.smethod_0(fileStream, Delegate149.smethod_1(aesManaged, array, array), CryptoStreamMode.Write)) { using (FileStream fileStream2 = Delegate32.smethod_0(string_7, FileMode.Open)) { Delegate183.smethod_0(aesManaged, 256); Delegate183.smethod_1(aesManaged, 128); int num; while ((num = Delegate185.smethod_0(fileStream2)) != -1) { Delegate184.smethod_0(cryptoStream, (byte)num); } } } } } Delegate100.smethod_1(string_7); Delegate130.smethod_1(text3, string_7); } }
public void method_17(string string_7) { string text = Delegate124.smethod_0(Class5.smethod_0 <string>(99835095u, 15038730591190274483uL), this.string_3); string text2 = Delegate124.smethod_0(text, "\\Keys"); string text3 = Delegate124.smethod_0(text, "\\Files"); string text4 = Delegate124.smethod_0(string_7, ".tmp"); AesCryptoServiceProvider object_ = Delegate24.smethod_0(); RSACryptoServiceProvider object_2 = Delegate33.smethod_0(); string text5 = (string)Delegate169.smethod_0(text2, "Public", "No Public Key was found!"); if (Delegate98.smethod_0(text5, "")) { Delegate164.smethod_0(object_2, text5); byte[] byte_ = Delegate168.smethod_0(object_2, Delegate148.smethod_0(object_), false); string object_3 = Delegate153.smethod_1(byte_); using (FileStream fileStream = Delegate32.smethod_0(text4, FileMode.Create)) { using (AesCryptoServiceProvider aesCryptoServiceProvider = Delegate24.smethod_0()) { using (CryptoStream cryptoStream = Delegate26.smethod_0(fileStream, Delegate149.smethod_0(aesCryptoServiceProvider, Delegate148.smethod_0(object_), Delegate148.smethod_0(object_)), CryptoStreamMode.Write)) { using (FileStream fileStream2 = Delegate32.smethod_0(string_7, FileMode.Open)) { Delegate183.smethod_0(aesCryptoServiceProvider, 256); Delegate183.smethod_1(aesCryptoServiceProvider, 128); int num; while ((num = Delegate185.smethod_0(fileStream2)) != -1) { Delegate184.smethod_0(cryptoStream, (byte)num); } } } } } StreamWriter object_4 = Delegate34.smethod_0(text4, true); Delegate187.smethod_0(Delegate186.smethod_0(object_4), 0L, SeekOrigin.End); Delegate150.smethod_0(object_4, object_3); Delegate188.smethod_0(object_4); Delegate127.smethod_0(text3, string_7, Delegate96.smethod_0(object_3), RegistryValueKind.DWord); Delegate100.smethod_1(string_7); Delegate130.smethod_1(text4, string_7); } }
// Token: 0x060015CB RID: 5579 // RVA: 0x0006FE40 File Offset: 0x0006E040 public static void Check(Delegate26 delegate26_1, ReleaseStream releaseStream_1, ThreadPriority threadPriority_0) { lock (Class214.object_0) { if (Class214.thread_0 == null) { Class214.releaseStream_0 = releaseStream_1; Class214.delegate26_0 = delegate26_1; Class214.smethod_2(Enum32.const_1); if (Class214.threadStart_0 == null) { Class214.threadStart_0 = new ThreadStart(Class214.smethod_10); } Class214.thread_0 = new Thread(Class214.threadStart_0); Class214.thread_0.IsBackground = true; Class214.thread_0.Priority = threadPriority_0; Class214.thread_0.Start(); } } }
public string method_7() { SHA1CryptoServiceProvider object_ = Delegate23.smethod_0(); AesCryptoServiceProvider object_2 = Delegate24.smethod_0(); Delegate147.smethod_0(object_2, Delegate146.smethod_0(this.string_1)); ICryptoTransform icryptoTransform_ = Delegate149.smethod_0(object_2, Delegate148.smethod_0(object_2), Delegate148.smethod_0(object_2)); using (MemoryStream memoryStream = Delegate25.smethod_0()) { using (CryptoStream cryptoStream = Delegate26.smethod_0(memoryStream, icryptoTransform_, CryptoStreamMode.Write)) { using (StreamWriter streamWriter = Delegate27.smethod_0(cryptoStream)) { Delegate150.smethod_0(streamWriter, this.string_0); } this.string_3 = Delegate135.smethod_0(Delegate153.smethod_0(Delegate152.smethod_0(object_, Delegate151.smethod_0(memoryStream))), "-", ""); } } this.string_3 = Delegate154.smethod_0(this.string_3, 0, 10); return(this.string_3); }
private static void smethod_10() { try { Enum32 enum32_ = Class214.smethod_3(); Class214.smethod_2(enum32_); } catch { Class214.smethod_2(Enum32.const_0); } Class214.delegate26_0 = null; Class214.thread_0 = null; }
// Token: 0x06002E5C RID: 11868 // RVA: 0x0012D034 File Offset: 0x0012B234 private void backgroundWorker_0_DoWork_1(object sender, DoWorkEventArgs e) { this.method_10(); try { ReleaseStream releaseStream_ = ReleaseStream.Stable; bool flag = File.Exists("Microsoft.Xna.Framework.dll") && File.Exists("x3daudio1_1.dll"); bool flag2 = File.Exists("osu!.cfg") || (!flag && Directory.GetFiles(Environment.CurrentDirectory).Length == 1); if (!flag) { string text; while (true) { IL_1AF: if (!flag2) { this.string_0 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "osu!"); this.label.Click += new EventHandler(this.label_Click); int i = 10; while (i > 0) { this.method_11(string.Format(Class41.GetString(OsuString.Maintenance_InstallationPath) + '\n' + Class41.GetString(OsuString.Maintenance_InstallationPath2), this.string_0, i), true); Thread.Sleep(1000); i--; while (this.string_0 == null) { Thread.Sleep(100); } } this.label.Click -= new EventHandler(this.label_Click); } while (this.string_0 != Environment.CurrentDirectory) { text = Path.Combine(this.string_0, "osu!.exe"); try { if (!Directory.Exists(this.string_0)) { Directory.CreateDirectory(this.string_0); } try { File.Delete(text); } catch (IOException) { } byte[] array = File.ReadAllBytes(Class905.smethod_0()); using (FileStream fileStream = File.Create(text)) { fileStream.Write(array, 0, array.Length); } goto IL_1BA; } catch (UnauthorizedAccessException) { if (Class905.smethod_14()) { goto IL_1BA; } if (!Class905.smethod_13("-allowuserwrites " + this.string_0, true)) { goto IL_1AF; } } } goto IL_1C7; } IL_1BA: Process.Start(text); Class905.smethod_12(); } try { IL_1C7: if (flag) { releaseStream_ = Class341.class605_25.Value; } } catch { Class905.smethod_11(true); } this.method_11(string.Empty, false); while (true) { this.method_9(0f, OsuString.Maintenance_Hi); if (flag) { Class341.smethod_4(); } if (Maintenance.delegate26_0 == null) { Maintenance.delegate26_0 = new Delegate26(Maintenance.smethod_5); } Class214.Check(Maintenance.delegate26_0, releaseStream_, ThreadPriority.Normal); while (true) { switch (Class214.enum32_0) { case Enum32.const_0: goto IL_2E6; case Enum32.const_1: this.method_11(Class214.smethod_1(false), this.bool_1); this.method_9(0f, OsuString.Maintenance_Hi); Thread.Sleep(20); continue; case Enum32.const_2: this.method_11(Class214.smethod_1(false), false); this.method_9(Class214.smethod_0(), OsuString.Maintenance_Hi); Thread.Sleep(20); continue; case Enum32.const_3: goto IL_291; case Enum32.const_4: case Enum32.const_5: goto IL_303; } goto Block_13; } IL_291: Class214.Reset(true); this.method_9(0f, OsuString.Maintenance_Hi); this.method_11(Class41.GetString(OsuString.Maintenance_ErrorOccurred), true); Thread.Sleep(5000); } Block_13: goto IL_314; IL_2E6: this.method_11(Class41.GetString(OsuString.CommonUpdater_Updated), true); Thread.Sleep(1000); goto IL_314; IL_303: this.method_11(Class41.GetString(OsuString.CommonUpdater_Updated), false); IL_314: if (!Class905.smethod_16() && !flag) { Class791.Create(Maintenance.smethod_3(), Path.Combine(Environment.CurrentDirectory, "osu!.exe"), "osu!"); Class791.Create(Maintenance.smethod_4(), Path.Combine(Environment.CurrentDirectory, "osu!.exe"), "osu!"); } this.class48_0.Dispose(); base.DialogResult = DialogResult.OK; } catch (Exception ex) { MessageBox.Show("Error occured (please report this!):\\n\\n" + ex.ToString()); } }