// Token: 0x06000442 RID: 1090 RVA: 0x000286E0 File Offset: 0x000268E0 public bool vip72login(string username, string password, int mainPort) { Thread.Sleep(1000); Process[] processByName = this.GetProcessByName("vip72socks"); Process[] array = processByName; for (int i = 0; i < array.Length; i++) { Process process = array[i]; Process arg_4A_0 = process; Func <string, bool> arg_4A_1; if ((arg_4A_1 = Vip72.< > c.< > 9__32_0) == null) { arg_4A_1 = (Vip72.< > c.< > 9__32_0 = new Func <string, bool>(Vip72.< > c.< > 9. < vip72login > b__32_0)); } IntPtr parentHandle = Vip72.FindWindowInProcess(arg_4A_0, arg_4A_1); IntPtr hwnd = Vip72.ControlGetHandle(parentHandle, "Static", 7955); bool flag = Vip72.ControlGetText(hwnd).EndsWith(":" + mainPort.ToString()); if (flag) { Vip72.Vip72Process = process; break; } } bool flag2 = Vip72.Vip72Process != null && !Vip72.Vip72Process.HasExited && Vip72.Vip72Process.Responding; if (flag2) { Process arg_EE_0 = Vip72.Vip72Process; Func <string, bool> arg_EE_1; if ((arg_EE_1 = Vip72.< > c.< > 9__32_1) == null) { arg_EE_1 = (Vip72.< > c.< > 9__32_1 = new Func <string, bool>(Vip72.< > c.< > 9. < vip72login > b__32_1)); } IntPtr parentHandle2 = Vip72.FindWindowInProcess(arg_EE_0, arg_EE_1); IntPtr hwnd2 = Vip72.ControlGetHandle(parentHandle2, "Static", 7955); bool flag3 = !Vip72.ControlGetText(hwnd2).EndsWith(":" + mainPort.ToString()); if (flag3) { bool flag4 = !Vip72.Vip72Process.HasExited; if (flag4) { Vip72.Vip72Process.Kill(); } Vip72.Vip72Process = null; } } else { bool flag5 = Vip72.Vip72Process != null && !Vip72.Vip72Process.Responding; if (flag5) { bool flag6 = !Vip72.Vip72Process.HasExited; if (flag6) { Vip72.Vip72Process.Kill(); } Vip72.Vip72Process = null; } } bool flag7 = Vip72.Vip72Process == null || Vip72.Vip72Process.HasExited; if (flag7) { Vip72.Vip72Process = Process.Start(new ProcessStartInfo { FileName = "vip72socks.exe", WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory + "vip72", Arguments = "-mp:" + mainPort.ToString() }); IntPtr value = Vip72.OpenProcess(2035711, false, Vip72.Vip72Process.Id); byte[] lpBuffer = new byte[] { 235 }; int num = 0; int lpBaseAddress = 4234074; Vip72.WriteProcessMemory((int)value, lpBaseAddress, lpBuffer, 1, ref num); } Thread.Sleep(500); Process arg_285_0 = Vip72.Vip72Process; Func <string, bool> arg_285_1; if ((arg_285_1 = Vip72.< > c.< > 9__32_2) == null) { arg_285_1 = (Vip72.< > c.< > 9__32_2 = new Func <string, bool>(Vip72.< > c.< > 9. < vip72login > b__32_2)); } IntPtr parentHandle3 = Vip72.FindWindowInProcess(arg_285_0, arg_285_1); IntPtr intPtr = Vip72.ControlGetHandle(parentHandle3, "Button", 119); IntPtr hwnd3 = Vip72.ControlGetHandle(parentHandle3, "Static", 7955); bool flag8 = intPtr != IntPtr.Zero; bool result; if (flag8) { Vip72.ControlSetText(hwnd3, "Port mac dinh:" + mainPort.ToString()); bool flag9 = !Vip72.ControlGetState(intPtr, 134217728); if (flag9) { IntPtr hwnd4 = Vip72.ControlGetHandle(parentHandle3, "Edit", 303); Vip72.ControlSetText(hwnd4, username); IntPtr hwnd5 = Vip72.ControlGetHandle(parentHandle3, "Edit", 301); Vip72.ControlSetText(hwnd5, password); Vip72.ControlClick(intPtr); IntPtr hwnd6 = Vip72.ControlGetHandle(parentHandle3, "Edit", 131); DateTime now = DateTime.Now; while (Vip72.ControlGetText(hwnd6) != "System ready") { bool flag10 = Vip72.ControlGetText(hwnd6) == "ERROR!Login and Password is incorrect"; if (flag10) { result = false; return(result); } bool flag11 = !Vip72.ControlGetState(intPtr, 134217728); if (flag11) { result = false; return(result); } Thread.Sleep(100); bool flag12 = (DateTime.Now - now).Seconds > 20; if (flag12) { result = false; return(result); } } Thread.Sleep(3000); } result = true; } else { result = this.vip72login(username, password, mainPort); } return(result); }
public bool vip72login(string username, string password, int mainPort) { bool flag; Thread.Sleep(1000); Process[] processByName = this.GetProcessByName("vip72socks"); int num = 0; while (num < (int)processByName.Length) { Process process = processByName[num]; if (!Vip72.ControlGetText(Vip72.ControlGetHandle(Vip72.FindWindowInProcess(process, (string s) => s.StartsWith("VIP72 Socks Client")), "Static", 7955)).EndsWith(string.Concat(":", mainPort.ToString()))) { num++; } else { Vip72.Vip72Process = process; break; } } if ((Vip72.Vip72Process == null || Vip72.Vip72Process.HasExited ? false : Vip72.Vip72Process.Responding)) { if (!Vip72.ControlGetText(Vip72.ControlGetHandle(Vip72.FindWindowInProcess(Vip72.Vip72Process, (string s) => s.StartsWith("VIP72 Socks Client")), "Static", 7955)).EndsWith(string.Concat(":", mainPort.ToString()))) { if (!Vip72.Vip72Process.HasExited) { Vip72.Vip72Process.Kill(); } Vip72.Vip72Process = null; } } else if ((Vip72.Vip72Process == null ? false : !Vip72.Vip72Process.Responding)) { if (!Vip72.Vip72Process.HasExited) { Vip72.Vip72Process.Kill(); } Vip72.Vip72Process = null; } if ((Vip72.Vip72Process == null ? true : Vip72.Vip72Process.HasExited)) { ProcessStartInfo processStartInfo = new ProcessStartInfo() { FileName = "vip72socks.exe", WorkingDirectory = string.Concat(AppDomain.CurrentDomain.BaseDirectory, "vip72"), Arguments = string.Concat("-mp:", mainPort.ToString()) }; Vip72.Vip72Process = Process.Start(processStartInfo); IntPtr intPtr = Vip72.OpenProcess(2035711, false, Vip72.Vip72Process.Id); byte[] numArray = new byte[] { 235 }; int num1 = 0; int num2 = 4234074; Vip72.WriteProcessMemory((int)intPtr, num2, numArray, 1, ref num1); } Thread.Sleep(500); IntPtr intPtr1 = Vip72.FindWindowInProcess(Vip72.Vip72Process, (string s) => s.StartsWith("VIP72 Socks Client")); IntPtr intPtr2 = Vip72.ControlGetHandle(intPtr1, "Button", 119); IntPtr intPtr3 = Vip72.ControlGetHandle(intPtr1, "Static", 7955); if (intPtr2 == IntPtr.Zero) { flag = this.vip72login(username, password, mainPort); } else { Vip72.ControlSetText(intPtr3, string.Concat("Port mac dinh:", mainPort.ToString())); if (!Vip72.ControlGetState(intPtr2, 134217728)) { IntPtr intPtr4 = Vip72.ControlGetHandle(intPtr1, "Edit", 303); Vip72.ControlSetText(intPtr4, username); IntPtr intPtr5 = Vip72.ControlGetHandle(intPtr1, "Edit", 301); Vip72.ControlSetText(intPtr5, password); Vip72.ControlClick(intPtr2); IntPtr intPtr6 = Vip72.ControlGetHandle(intPtr1, "Edit", 131); DateTime now = DateTime.Now; while (Vip72.ControlGetText(intPtr6) != "System ready") { if (Vip72.ControlGetText(intPtr6) == "ERROR!Login and Password is incorrect") { flag = false; return(flag); } else if (Vip72.ControlGetState(intPtr2, 134217728)) { Thread.Sleep(100); if ((DateTime.Now - now).Seconds > 20) { flag = false; return(flag); } } else { flag = false; return(flag); } } Thread.Sleep(3000); } flag = true; } return(flag); }