// Token: 0x06000733 RID: 1843 RVA: 0x00029F88 File Offset: 0x00028188 private void RegisterSerial() { try { WebClientEx webClientEx = new WebClientEx(); webClientEx.Credentials = Util.GetNetworkCredential(); string serial = this.m_serial; this.m_hash = SerialValidateGG.ComputeHash(serial); string uID = Util.GetUID(false, true); if (string.IsNullOrEmpty(uID)) { MessageBox.Show("There appears to have been an issue activating. Please contact support."); } else { string uriString = string.Format("{0}/ps4auth", Util.GetBaseUrl(), this.m_hash); webClientEx.DownloadStringAsync(new Uri(uriString, UriKind.Absolute)); webClientEx.DownloadStringCompleted += new DownloadStringCompletedEventHandler(this.client_DownloadStringCompleted); } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.StackTrace); MessageBox.Show(Resources.errSerial, Resources.msgError); } }
// Token: 0x06000735 RID: 1845 RVA: 0x0002A1E4 File Offset: 0x000283E4 private void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { if (e.Error != null) { MessageBox.Show(Resources.errSerial, Resources.msgError); base.Invoke(this.CloseForm, new object[] { false }); return; } string result = e.Result; if (result == null) { MessageBox.Show(Resources.errInvalidSerial, Resources.msgError); base.Invoke(this.CloseForm, new object[] { false }); return; } if (result.IndexOf('#') > 0) { string[] array = result.Split(new char[] { '#' }); if (array.Length > 1) { if (array[0] == "4") { MessageBox.Show(Resources.errInvalidSerial, Resources.msgError); base.Invoke(this.CloseForm, new object[] { false }); return; } if (array[0] == "5") { MessageBox.Show(Resources.errTooManyTimes, Resources.msgError); base.Invoke(this.CloseForm, new object[] { false }); return; } } } else { if (result.ToLower() == "toomanytimes" || result.ToLower().Contains("too many")) { MessageBox.Show(Resources.errTooManyTimes, Resources.msgError); base.Invoke(this.CloseForm, new object[] { false }); return; } if (result == null || result.ToLower().Contains("error") || result.ToLower().Contains("not found")) { string text = result.Replace("ERROR", ""); if (!text.Contains("1002")) { if (text.Contains("1014")) { MessageBox.Show(Resources.errOffline, Resources.msgInfo); base.Invoke(this.CloseForm, new object[] { false }); return; } if (text.Contains("1005")) { MessageBox.Show(Resources.errTooManyTimes + text, Resources.msgError); base.Invoke(this.CloseForm, new object[] { false }); return; } if (text.Contains("1007")) { Util.GetUID(true, true); this.RegisterSerial(); } else { if (this.m_serial == null) { MessageBox.Show(Resources.errInvalidSerial + text, Resources.msgError); } else { MessageBox.Show(Resources.errInvalidUSB + text, Resources.msgError); } this.m_retryCount++; if (this.m_retryCount >= 3) { base.Invoke(this.CloseForm, new object[] { false }); return; } if (this.m_serial == null) { this.btnOk.Invoke(this.EnableOk, new object[] { true }); } else { this.btnOk.Invoke(this.EnableOk, new object[] { false }); } this.label1.Invoke(this.UpdateStatus, new object[] { "" }); return; } } } } RegistryKey currentUser = Registry.CurrentUser; RegistryKey registryKey = currentUser.CreateSubKey(Util.GetRegistryBase()); if (this.m_serial == null) { string s = string.Format("{0}-{1}-{2}-{3}", new object[] { this.txtSerial1.Text, this.txtSerial2.Text, this.txtSerial3.Text, this.txtSerial4.Text }); this.m_hash = BitConverter.ToString(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(s))); this.m_hash = this.m_hash.Replace("-", ""); } else { this.m_hash = SerialValidateGG.ComputeHash(this.m_serial); } registryKey.SetValue("Hash", this.m_hash.ToUpper()); registryKey.SetValue("BackupSaves", "true"); string value = string.Format("{0}-{1}-{2}-{3}", new object[] { this.txtSerial1.Text, this.txtSerial2.Text, this.txtSerial3.Text, this.txtSerial4.Text }); registryKey.SetValue("Serial", value); registryKey.Close(); currentUser.Close(); try { if (base.IsHandleCreated) { base.Invoke(this.CloseForm, new object[] { true }); } } catch { } }