// Token: 0x06000064 RID: 100 RVA: 0x00003A8C File Offset: 0x00001C8C public static bool AIOLogin(string AIO) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Process.GetCurrentProcess().Kill(); } if (string.IsNullOrWhiteSpace(AIO)) { MessageBox.Show("Missing user login information!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); return(false); } string[] array = new string[0]; bool result; using (WebClient webClient = new WebClient()) { try { Security.Start(); webClient.Proxy = null; Encoding @default = Encoding.Default; WebClient webClient2 = webClient; string apiUrl = Constants.ApiUrl; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection["token"] = Encryption.EncryptService(Constants.Token); nameValueCollection["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()); nameValueCollection["aid"] = Encryption.APIService(OnProgramStart.AID); nameValueCollection["session_id"] = Constants.IV; nameValueCollection["api_id"] = Constants.APIENCRYPTSALT; nameValueCollection["api_key"] = Constants.APIENCRYPTKEY; nameValueCollection["username"] = Encryption.APIService(AIO); nameValueCollection["password"] = Encryption.APIService(AIO); nameValueCollection["hwid"] = Encryption.APIService(Constants.HWID()); nameValueCollection["session_key"] = Constants.Key; nameValueCollection["secret"] = Encryption.APIService(OnProgramStart.Secret); nameValueCollection["type"] = Encryption.APIService("login"); array = Encryption.DecryptService(@default.GetString(webClient2.UploadValues(apiUrl, nameValueCollection))).Split("|".ToCharArray()); if (array[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Process.GetCurrentProcess().Kill(); } if (Security.MaliciousCheck(array[1])) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Process.GetCurrentProcess().Kill(); } string text = array[2]; if (text != null) { if (text == "success") { Security.End(); User.ID = array[3]; User.Username = array[4]; User.Password = array[5]; User.Email = array[6]; User.HWID = array[7]; User.UserVariable = array[8]; User.Rank = array[9]; User.IP = array[10]; User.Expiry = array[11]; User.LastLogin = array[12]; User.RegisterDate = array[13]; string text2 = array[14]; foreach (string text3 in text2.Split(new char[] { '~' })) { string[] array3 = text3.Split(new char[] { '^' }); try { App.Variables.Add(array3[0], array3[1]); } catch { } } return(true); } if (text == "invalid_details") { Security.End(); return(false); } if (text == "time_expired") { MessageBox.Show("Your subscription has expired!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Security.End(); return(false); } if (text == "hwid_updated") { MessageBox.Show("New machine has been binded, re-open the application!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); Security.End(); return(false); } if (text == "invalid_hwid") { MessageBox.Show("This user is binded to another computer, please contact support!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); return(false); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); Process.GetCurrentProcess().Kill(); } result = false; } return(result); }
// Token: 0x0600006D RID: 109 RVA: 0x00004CA8 File Offset: 0x00002EA8 public static void Start() { string pathRoot = Path.GetPathRoot(Environment.SystemDirectory); if (Constants.Started) { MessageBox.Show("A session has already been started, please end the previous one!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Process.GetCurrentProcess().Kill(); return; } using (StreamReader streamReader = new StreamReader(pathRoot + "Windows\\System32\\drivers\\etc\\hosts")) { string text = streamReader.ReadToEnd(); if (text.Contains("api.auth.gg")) { Constants.Breached = true; MessageBox.Show("DNS redirecting has been detected!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Process.GetCurrentProcess().Kill(); } } InfoManager infoManager = new InfoManager(); infoManager.StartListener(); Constants.Token = Guid.NewGuid().ToString(); ServicePointManager.ServerCertificateValidationCallback = (RemoteCertificateValidationCallback)Delegate.Combine(ServicePointManager.ServerCertificateValidationCallback, new RemoteCertificateValidationCallback(Security.PinPublicKey)); Constants.APIENCRYPTKEY = Convert.ToBase64String(Encoding.Default.GetBytes(Security.Session(32))); Constants.APIENCRYPTSALT = Convert.ToBase64String(Encoding.Default.GetBytes(Security.Session(16))); Constants.IV = Convert.ToBase64String(Encoding.Default.GetBytes(Constants.RandomString(16))); Constants.Key = Convert.ToBase64String(Encoding.Default.GetBytes(Constants.RandomString(32))); Constants.Started = true; }
// Token: 0x06000067 RID: 103 RVA: 0x0000458C File Offset: 0x0000278C public static bool Register(string username, string password, string license) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); Process.GetCurrentProcess().Kill(); } if (string.IsNullOrWhiteSpace(username) || string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(license)) { MessageBox.Show("Invalid registering information!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); return(false); } string[] array = new string[0]; bool result; using (WebClient webClient = new WebClient()) { try { Security.Start(); webClient.Proxy = null; Encoding @default = Encoding.Default; WebClient webClient2 = webClient; string apiUrl = Constants.ApiUrl; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection["token"] = Encryption.EncryptService(Constants.Token); nameValueCollection["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()); nameValueCollection["aid"] = Encryption.APIService(OnProgramStart.AID); nameValueCollection["session_id"] = Constants.IV; nameValueCollection["api_id"] = Constants.APIENCRYPTSALT; nameValueCollection["api_key"] = Constants.APIENCRYPTKEY; nameValueCollection["session_key"] = Constants.Key; nameValueCollection["secret"] = Encryption.APIService(OnProgramStart.Secret); nameValueCollection["type"] = Encryption.APIService("register"); nameValueCollection["username"] = Encryption.APIService(username); nameValueCollection["password"] = Encryption.APIService(password); nameValueCollection["email"] = Encryption.APIService(username); nameValueCollection["license"] = Encryption.APIService(license); nameValueCollection["hwid"] = Encryption.APIService(Constants.HWID()); array = Encryption.DecryptService(@default.GetString(webClient2.UploadValues(apiUrl, nameValueCollection))).Split("|".ToCharArray()); if (array[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); Process.GetCurrentProcess().Kill(); } if (Security.MaliciousCheck(array[1])) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Process.GetCurrentProcess().Kill(); } string text = array[2]; if (text != null) { if (text == "success") { Security.End(); return(true); } if (text == "invalid_license") { MessageBox.Show("License does not exist!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); return(false); } if (text == "email_used") { MessageBox.Show("You entered an invalid/used username!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); return(false); } if (text == "invalid_username") { MessageBox.Show("You entered an invalid/used username!", ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Security.End(); return(false); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ApplicationSettings.Name, MessageBoxButtons.OK, MessageBoxIcon.Hand); Process.GetCurrentProcess().Kill(); } result = false; } return(result); }