Guest User

Untitled

a guest
Aug 5th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.47 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel;
  3. using System.Diagnostics;
  4. using System.Drawing;
  5. using System.IO;
  6. using System.Net;
  7. using System.Runtime.CompilerServices;
  8. using System.Runtime.InteropServices;
  9. using System.Security.Cryptography;
  10. using System.Text;
  11. using System.Threading;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14.  
  15. // Token: 0x02000079 RID: 121
  16. public sealed class Login : Form
  17. {
  18. // Token: 0x0600031F RID: 799 RVA: 0x00011A0C File Offset: 0x0000FC0C
  19. public Login()
  20. {
  21. this.InitializeComponent();
  22. new Thread(new ThreadStart(this.method_2)).Start();
  23. if (File.Exists("pData/login.ini"))
  24. {
  25. StreamReader streamReader = new StreamReader("pData/login.ini");
  26. try
  27. {
  28. this.UserBox.Text = this.method_3(streamReader.ReadLine());
  29. this.PassBox.Text = this.method_3(streamReader.ReadLine());
  30. }
  31. catch
  32. {
  33. if (File.Exists("pData/login.ini"))
  34. {
  35. MessageBox.Show("Error while decrypting login information. Remove the pData folder and restart the loader!");
  36. Environment.Exit(1);
  37. }
  38. else
  39. {
  40. MessageBox.Show("Error: 80");
  41. Environment.Exit(-1);
  42. }
  43. }
  44. streamReader.Close();
  45. this.RememberCheck.method_3(true);
  46. return;
  47. }
  48. this.UserBox.Text = string.Empty;
  49. this.PassBox.Text = string.Empty;
  50. }
  51.  
  52. // Token: 0x06000320 RID: 800 RVA: 0x00011AFC File Offset: 0x0000FCFC
  53. private async Task method_0()
  54. {
  55. await Task.Delay(5000);
  56. }
  57.  
  58. // Token: 0x06000321 RID: 801 RVA: 0x00011B3C File Offset: 0x0000FD3C
  59. private async void method_1()
  60. {
  61. await this.method_0();
  62. }
  63.  
  64. // Token: 0x06000322 RID: 802 RVA: 0x00011B78 File Offset: 0x0000FD78
  65. private void method_2()
  66. {
  67. WebClient webClient = new WebClient();
  68. if (webClient.DownloadString("https://pcheats.pro/loaderinfo/new/update/version.php") != "5.0")
  69. {
  70. MessageBox.Show("Your loader is outdated. We will download the newest one. If it's not working for you, download it manually from the website.");
  71. string startupPath = Application.StartupPath;
  72. webClient.DownloadFile("https://pcheats.pro/loaderinfo/new/update/loader.exe", startupPath + "/Updated.exe");
  73. Process.Start(startupPath + "/Updated.exe");
  74. Environment.Exit(1);
  75. }
  76. }
  77.  
  78. // Token: 0x06000323 RID: 803 RVA: 0x00011BE0 File Offset: 0x0000FDE0
  79. public string method_3(string string_4)
  80. {
  81. string password = "test";
  82. string s = "cffffffffffffffffff";
  83. string s2 = "@1B2c3D4e5F6g7H8";
  84. byte[] bytes = Encoding.ASCII.GetBytes(s2);
  85. byte[] bytes2 = Encoding.ASCII.GetBytes(s);
  86. byte[] array = Convert.FromBase64String(string_4);
  87. byte[] bytes3 = new Rfc2898DeriveBytes(password, bytes2, 2).GetBytes(32);
  88. ICryptoTransform transform = new RijndaelManaged
  89. {
  90. Mode = CipherMode.CBC
  91. }.CreateDecryptor(bytes3, bytes);
  92. MemoryStream memoryStream = new MemoryStream(array);
  93. CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Read);
  94. byte[] array2 = new byte[array.Length - 1];
  95. int count = cryptoStream.Read(array2, 0, array2.Length);
  96. memoryStream.Close();
  97. cryptoStream.Close();
  98. return Encoding.UTF8.GetString(array2, 0, count);
  99. }
  100.  
  101. // Token: 0x06000324 RID: 804 RVA: 0x00011C8C File Offset: 0x0000FE8C
  102. public string method_4(string string_4)
  103. {
  104. string password = "test";
  105. string s = "cffffffffffffffffff";
  106. string s2 = "@1B2c3D4e5F6g7H8";
  107. byte[] bytes = Encoding.ASCII.GetBytes(s2);
  108. byte[] bytes2 = Encoding.ASCII.GetBytes(s);
  109. byte[] bytes3 = Encoding.UTF8.GetBytes(string_4);
  110. byte[] bytes4 = new Rfc2898DeriveBytes(password, bytes2, 2).GetBytes(32);
  111. ICryptoTransform transform = new RijndaelManaged
  112. {
  113. Mode = CipherMode.CBC
  114. }.CreateEncryptor(bytes4, bytes);
  115. MemoryStream memoryStream = new MemoryStream();
  116. CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write);
  117. cryptoStream.Write(bytes3, 0, bytes3.Length);
  118. cryptoStream.FlushFinalBlock();
  119. byte[] inArray = memoryStream.ToArray();
  120. memoryStream.Close();
  121. cryptoStream.Close();
  122. return Convert.ToBase64String(inArray);
  123. }
  124.  
  125. // Token: 0x06000325 RID: 805 RVA: 0x00004A09 File Offset: 0x00002C09
  126. private void UserBox_TextChanged(object sender, EventArgs e)
  127. {
  128. Login.string_0 = this.method_4(this.UserBox.Text);
  129. this.string_2 = this.UserBox.Text;
  130. }
  131.  
  132. // Token: 0x06000326 RID: 806 RVA: 0x00004A32 File Offset: 0x00002C32
  133. private void PassBox_TextChanged(object sender, EventArgs e)
  134. {
  135. Login.string_1 = this.method_4(this.PassBox.Text);
  136. this.string_3 = this.PassBox.Text;
  137. }
  138.  
  139. // Token: 0x06000327 RID: 807 RVA: 0x00011D34 File Offset: 0x0000FF34
  140. private void LoginButton_Click(object sender, EventArgs e)
  141. {
  142. if (this.int_0 > 2)
  143. {
  144. MessageBox.Show("You have been temporary locked out of the loader for too many attempts. Please restart your loader");
  145. this.UserBox.Enabled = false;
  146. this.PassBox.Enabled = false;
  147. this.label1.ForeColor = Color.Gray;
  148. this.label2.ForeColor = Color.Gray;
  149. this.LoginButton.Enabled = false;
  150. this.RememberCheck.Enabled = false;
  151. return;
  152. }
  153. if (!Directory.Exists("pData"))
  154. {
  155. Directory.CreateDirectory("pData");
  156. }
  157. if (this.RememberCheck.method_2())
  158. {
  159. StreamWriter streamWriter = new StreamWriter("pData/login.ini");
  160. streamWriter.WriteLine(this.method_4(this.string_2));
  161. streamWriter.WriteLine(this.method_4(this.string_3));
  162. streamWriter.Close();
  163. }
  164. else
  165. {
  166. File.Delete("login.ini");
  167. }
  168. AuthFix authFix = new AuthFix();
  169. authFix.ShowDialog();
  170. if (authFix.DialogResult == DialogResult.OK)
  171. {
  172. this.UserBox.Enabled = false;
  173. this.PassBox.Enabled = false;
  174. this.label1.ForeColor = Color.Gray;
  175. this.label2.ForeColor = Color.Gray;
  176. this.LoginButton.Enabled = false;
  177. this.RememberCheck.Enabled = false;
  178. this.StatusLabel.Visible = true;
  179. this.StatusLabel.ForeColor = Color.Green;
  180. this.StatusLabel.Text = "Success!";
  181. Thread.Sleep(1000);
  182. new global::MainMenu().Show();
  183. base.Hide();
  184. return;
  185. }
  186. this.label3.Visible = false;
  187. this.StatusLabel.Visible = true;
  188. this.StatusLabel.ForeColor = Color.Red;
  189. this.StatusLabel.Text = "Invalid Username Or Password!";
  190. this.int_0++;
  191. }
  192.  
  193. // Token: 0x06000328 RID: 808 RVA: 0x00004A5B File Offset: 0x00002C5B
  194. private void nsControlButton1_Click(object sender, EventArgs e)
  195. {
  196. Environment.Exit(1);
  197. }
  198.  
  199. // Token: 0x06000329 RID: 809 RVA: 0x00004A63 File Offset: 0x00002C63
  200. protected override void Dispose(bool disposing)
  201. {
  202. if (disposing && this.icontainer_0 != null)
  203. {
  204. this.icontainer_0.Dispose();
  205. }
  206. base.Dispose(disposing);
  207. }
  208.  
  209. // Token: 0x0600032A RID: 810 RVA: 0x00011F00 File Offset: 0x00010100
  210. private void InitializeComponent()
  211. {
  212. this.nsTheme1 = new Control3();
  213. this.StatusLabel = new Label();
  214. this.label3 = new Label();
  215. this.RememberCheck = new Control13();
  216. this.LoginButton = new Control7();
  217. this.label2 = new Label();
  218. this.PassBox = new Control20();
  219. this.label1 = new Label();
  220. this.UserBox = new Control20();
  221. this.nsControlButton1 = new Control0();
  222. this.nsTheme1.SuspendLayout();
  223. base.SuspendLayout();
  224. this.nsTheme1.method_109(0);
  225. this.nsTheme1.method_16(FormBorderStyle.None);
  226. this.nsTheme1.method_24(new Struct0[0]);
  227. this.nsTheme1.Controls.Add(this.nsControlButton1);
  228. this.nsTheme1.Controls.Add(this.StatusLabel);
  229. this.nsTheme1.Controls.Add(this.label3);
  230. this.nsTheme1.Controls.Add(this.RememberCheck);
  231. this.nsTheme1.Controls.Add(this.LoginButton);
  232. this.nsTheme1.Controls.Add(this.label2);
  233. this.nsTheme1.Controls.Add(this.PassBox);
  234. this.nsTheme1.Controls.Add(this.label1);
  235. this.nsTheme1.Controls.Add(this.UserBox);
  236. this.nsTheme1.method_26(string.Empty);
  237. this.nsTheme1.Dock = DockStyle.Fill;
  238. this.nsTheme1.Font = new Font("Verdana", 8f);
  239. this.nsTheme1.method_22(null);
  240. this.nsTheme1.Location = new Point(0, 0);
  241. this.nsTheme1.method_10(true);
  242. this.nsTheme1.Name = "nsTheme1";
  243. this.nsTheme1.method_20(false);
  244. this.nsTheme1.method_12(false);
  245. this.nsTheme1.Size = new Size(288, 260);
  246. this.nsTheme1.method_8(true);
  247. this.nsTheme1.method_18(FormStartPosition.WindowsDefaultLocation);
  248. this.nsTheme1.TabIndex = 0;
  249. this.nsTheme1.Text = "pLoader - Sign In";
  250. this.nsTheme1.method_14(Color.Empty);
  251. this.nsTheme1.method_28(false);
  252. this.StatusLabel.AutoSize = true;
  253. this.StatusLabel.BackColor = Color.FromArgb(50, 50, 50);
  254. this.StatusLabel.Font = new Font("Verdana", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
  255. this.StatusLabel.ForeColor = Color.Green;
  256. this.StatusLabel.Location = new Point(6, 234);
  257. this.StatusLabel.Name = "StatusLabel";
  258. this.StatusLabel.Size = new Size(95, 18);
  259. this.StatusLabel.TabIndex = 7;
  260. this.StatusLabel.Text = "%Status%";
  261. this.StatusLabel.Visible = false;
  262. this.label3.AutoSize = true;
  263. this.label3.BackColor = Color.FromArgb(50, 50, 50);
  264. this.label3.ForeColor = SystemColors.Control;
  265. this.label3.Location = new Point(208, 243);
  266. this.label3.Name = "label3";
  267. this.label3.Size = new Size(77, 13);
  268. this.label3.TabIndex = 6;
  269. this.label3.Text = "pCheats.pro";
  270. this.RememberCheck.BackColor = Color.FromArgb(50, 50, 50);
  271. this.RememberCheck.method_3(false);
  272. this.RememberCheck.Location = new Point(78, 205);
  273. this.RememberCheck.Name = "RememberCheck";
  274. this.RememberCheck.Size = new Size(123, 23);
  275. this.RememberCheck.TabIndex = 5;
  276. this.RememberCheck.Text = "Remember Me";
  277. this.LoginButton.BackColor = Color.FromArgb(50, 50, 50);
  278. this.LoginButton.Font = new Font("Verdana", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  279. this.LoginButton.Location = new Point(84, 167);
  280. this.LoginButton.Name = "LoginButton";
  281. this.LoginButton.Size = new Size(104, 32);
  282. this.LoginButton.TabIndex = 4;
  283. this.LoginButton.Text = " Login";
  284. this.LoginButton.Click += this.LoginButton_Click;
  285. this.label2.AutoSize = true;
  286. this.label2.BackColor = Color.FromArgb(50, 50, 50);
  287. this.label2.ForeColor = SystemColors.Control;
  288. this.label2.Location = new Point(36, 105);
  289. this.label2.Name = "label2";
  290. this.label2.Size = new Size(106, 13);
  291. this.label2.TabIndex = 3;
  292. this.label2.Text = "Forum Password:";
  293. this.PassBox.BackColor = Color.FromArgb(50, 50, 50);
  294. this.PassBox.Cursor = Cursors.IBeam;
  295. this.PassBox.Font = new Font("Verdana", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
  296. this.PassBox.Location = new Point(60, 123);
  297. this.PassBox.method_3(32767);
  298. this.PassBox.method_9(false);
  299. this.PassBox.Name = "PassBox";
  300. this.PassBox.method_5(false);
  301. this.PassBox.Size = new Size(163, 28);
  302. this.PassBox.TabIndex = 2;
  303. this.PassBox.method_1(HorizontalAlignment.Left);
  304. this.PassBox.method_7(true);
  305. this.PassBox.TextChanged += this.PassBox_TextChanged;
  306. this.label1.AutoSize = true;
  307. this.label1.BackColor = Color.FromArgb(50, 50, 50);
  308. this.label1.ForeColor = SystemColors.Control;
  309. this.label1.Location = new Point(36, 56);
  310. this.label1.Name = "label1";
  311. this.label1.Size = new Size(110, 13);
  312. this.label1.TabIndex = 1;
  313. this.label1.Text = "Forum Username:";
  314. this.UserBox.BackColor = Color.FromArgb(50, 50, 50);
  315. this.UserBox.Cursor = Cursors.IBeam;
  316. this.UserBox.Font = new Font("Verdana", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
  317. this.UserBox.Location = new Point(60, 74);
  318. this.UserBox.method_3(32767);
  319. this.UserBox.method_9(false);
  320. this.UserBox.Name = "UserBox";
  321. this.UserBox.method_5(false);
  322. this.UserBox.Size = new Size(163, 28);
  323. this.UserBox.TabIndex = 0;
  324. this.UserBox.method_1(HorizontalAlignment.Left);
  325. this.UserBox.method_7(false);
  326. this.UserBox.TextChanged += this.UserBox_TextChanged;
  327. this.nsControlButton1.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
  328. this.nsControlButton1.BackColor = Color.FromArgb(50, 50, 50);
  329. this.nsControlButton1.method_1((Control0.Enum0)3);
  330. this.nsControlButton1.Location = new Point(267, 0);
  331. this.nsControlButton1.Margin = new Padding(0);
  332. this.nsControlButton1.MaximumSize = new Size(18, 20);
  333. this.nsControlButton1.MinimumSize = new Size(18, 20);
  334. this.nsControlButton1.Name = "nsControlButton1";
  335. this.nsControlButton1.Size = new Size(18, 20);
  336. this.nsControlButton1.TabIndex = 8;
  337. this.nsControlButton1.Text = "nsControlButton1";
  338. this.nsControlButton1.Click += this.nsControlButton1_Click;
  339. base.AutoScaleDimensions = new SizeF(6f, 13f);
  340. base.AutoScaleMode = AutoScaleMode.Font;
  341. base.ClientSize = new Size(288, 260);
  342. base.Controls.Add(this.nsTheme1);
  343. base.FormBorderStyle = FormBorderStyle.None;
  344. base.Name = "Login";
  345. this.Text = "Login";
  346. this.nsTheme1.ResumeLayout(false);
  347. this.nsTheme1.PerformLayout();
  348. base.ResumeLayout(false);
  349. }
  350.  
  351. // Token: 0x040002BF RID: 703
  352. public static string string_0;
  353.  
  354. // Token: 0x040002C0 RID: 704
  355. public static string string_1;
  356.  
  357. // Token: 0x040002C1 RID: 705
  358. public string string_2;
  359.  
  360. // Token: 0x040002C2 RID: 706
  361. public string string_3;
  362.  
  363. // Token: 0x040002C3 RID: 707
  364. public int int_0;
  365.  
  366. // Token: 0x040002C4 RID: 708
  367. private IContainer icontainer_0;
  368.  
  369. // Token: 0x040002C5 RID: 709
  370. private Control3 nsTheme1;
  371.  
  372. // Token: 0x040002C6 RID: 710
  373. private Control13 RememberCheck;
  374.  
  375. // Token: 0x040002C7 RID: 711
  376. private Control7 LoginButton;
  377.  
  378. // Token: 0x040002C8 RID: 712
  379. private Label label2;
  380.  
  381. // Token: 0x040002C9 RID: 713
  382. private Control20 PassBox;
  383.  
  384. // Token: 0x040002CA RID: 714
  385. private Label label1;
  386.  
  387. // Token: 0x040002CB RID: 715
  388. private Control20 UserBox;
  389.  
  390. // Token: 0x040002CC RID: 716
  391. private Label label3;
  392.  
  393. // Token: 0x040002CD RID: 717
  394. private Label StatusLabel;
  395.  
  396. // Token: 0x040002CE RID: 718
  397. private Control0 nsControlButton1;
  398.  
  399. // Token: 0x0200007A RID: 122
  400. [StructLayout(LayoutKind.Auto)]
  401. private struct Struct4 : IAsyncStateMachine
  402. {
  403. // Token: 0x0600032B RID: 811 RVA: 0x000127E4 File Offset: 0x000109E4
  404. void IAsyncStateMachine.MoveNext()
  405. {
  406. int num = this.int_0;
  407. Login login = this.login_0;
  408. try
  409. {
  410. TaskAwaiter awaiter;
  411. if (num != 0)
  412. {
  413. awaiter = login.method_0().GetAwaiter();
  414. if (!awaiter.IsCompleted)
  415. {
  416. this.int_0 = 0;
  417. this.taskAwaiter_0 = awaiter;
  418. this.asyncVoidMethodBuilder_0.AwaitUnsafeOnCompleted<TaskAwaiter, Login.Struct4>(ref awaiter, ref this);
  419. return;
  420. }
  421. }
  422. else
  423. {
  424. awaiter = this.taskAwaiter_0;
  425. this.taskAwaiter_0 = default(TaskAwaiter);
  426. this.int_0 = -1;
  427. }
  428. awaiter.GetResult();
  429. }
  430. catch (Exception exception)
  431. {
  432. this.int_0 = -2;
  433. this.asyncVoidMethodBuilder_0.SetException(exception);
  434. return;
  435. }
  436. this.int_0 = -2;
  437. this.asyncVoidMethodBuilder_0.SetResult();
  438. }
  439.  
  440. // Token: 0x0600032C RID: 812 RVA: 0x00004A82 File Offset: 0x00002C82
  441. [DebuggerHidden]
  442. void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
  443. {
  444. this.asyncVoidMethodBuilder_0.SetStateMachine(stateMachine);
  445. }
  446.  
  447. // Token: 0x040002CF RID: 719
  448. public int int_0;
  449.  
  450. // Token: 0x040002D0 RID: 720
  451. public AsyncVoidMethodBuilder asyncVoidMethodBuilder_0;
  452.  
  453. // Token: 0x040002D1 RID: 721
  454. public Login login_0;
  455.  
  456. // Token: 0x040002D2 RID: 722
  457. private TaskAwaiter taskAwaiter_0;
  458. }
  459.  
  460. // Token: 0x0200007B RID: 123
  461. [StructLayout(LayoutKind.Auto)]
  462. private struct Struct5 : IAsyncStateMachine
  463. {
  464. // Token: 0x0600032D RID: 813 RVA: 0x00012898 File Offset: 0x00010A98
  465. void IAsyncStateMachine.MoveNext()
  466. {
  467. int num = this.int_0;
  468. try
  469. {
  470. TaskAwaiter awaiter;
  471. if (num != 0)
  472. {
  473. awaiter = Task.Delay(5000).GetAwaiter();
  474. if (!awaiter.IsCompleted)
  475. {
  476. this.int_0 = 0;
  477. this.taskAwaiter_0 = awaiter;
  478. this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted<TaskAwaiter, Login.Struct5>(ref awaiter, ref this);
  479. return;
  480. }
  481. }
  482. else
  483. {
  484. awaiter = this.taskAwaiter_0;
  485. this.taskAwaiter_0 = default(TaskAwaiter);
  486. this.int_0 = -1;
  487. }
  488. awaiter.GetResult();
  489. }
  490. catch (Exception exception)
  491. {
  492. this.int_0 = -2;
  493. this.asyncTaskMethodBuilder_0.SetException(exception);
  494. return;
  495. }
  496. this.int_0 = -2;
  497. this.asyncTaskMethodBuilder_0.SetResult();
  498. }
  499.  
  500. // Token: 0x0600032E RID: 814 RVA: 0x00004A90 File Offset: 0x00002C90
  501. [DebuggerHidden]
  502. void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
  503. {
  504. this.asyncTaskMethodBuilder_0.SetStateMachine(stateMachine);
  505. }
  506.  
  507. // Token: 0x040002D3 RID: 723
  508. public int int_0;
  509.  
  510. // Token: 0x040002D4 RID: 724
  511. public AsyncTaskMethodBuilder asyncTaskMethodBuilder_0;
  512.  
  513. // Token: 0x040002D5 RID: 725
  514. private TaskAwaiter taskAwaiter_0;
  515. }
  516. }
Add Comment
Please, Sign In to add comment