Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // BlackOpsIntervention_Loader.Form1
- private unsafe void auth()
- {
- if (this.txtUsername.TextLength == 0 || this.txtPassword.TextLength == 0)
- {
- MessageBox.Show("You need to enter a valid username and password!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- }
- else
- {
- sbyte* ptr = Form1.toString(this.txtUsername.Text);
- sbyte* ptr2 = Form1.toString(this.txtPassword.Text);
- <Module>.WritePrivateProfileStringA((sbyte*)(&<Module>.??_C@_09FLFAIIOG@MW3_Chaos?$AA@), (sbyte*)(&<Module>.??_C@_08GBJFCIEI@Username?$AA@), (sbyte*)ptr, (sbyte*)(&<Module>.??_C@_0BA@FFEIGMEO@?4?2MW3_Chaos?4ini?$AA@));
- <Module>.WritePrivateProfileStringA((sbyte*)(&<Module>.??_C@_09FLFAIIOG@MW3_Chaos?$AA@), (sbyte*)(&<Module>.??_C@_08FJIAHGMM@Password?$AA@), (sbyte*)ptr2, (sbyte*)(&<Module>.??_C@_0BA@FFEIGMEO@?4?2MW3_Chaos?4ini?$AA@));
- this.lblStatus.Text = "Preparing for authentication...";
- sbyte* ptr3 = <Module>.@new(512000u);
- $ArrayType$$$BY0CAA@D $ArrayType$$$BY0CAA@D;
- <Module>.memset((void*)(&$ArrayType$$$BY0CAA@D), 0, 512u);
- $ArrayType$$$BY0CAA@D $ArrayType$$$BY0CAA@D2;
- <Module>.memset((void*)(&$ArrayType$$$BY0CAA@D2), 0, 512u);
- <Module>.memset((void*)ptr3, 0, 512000u);
- <Module>.wsprintfA((sbyte*)(&$ArrayType$$$BY0CAA@D), (sbyte*)(&<Module>.??_C@_0FL@NCGCCAHO@GET?5?1MW3_ChaosSubCheck?1subcheck?4@), ptr, ptr2, (sbyte*)(&<Module>.??_C@_0BG@HPLOCOFL@www?4xgamingstudio?4com?$AA@), (sbyte*)(&<Module>.??_C@_0O@LMKDPLPM@MW3_Chaos?11?40?$AA@));
- hostent* ptr4 = <Module>.gethostbyname((sbyte*)(&<Module>.??_C@_0BG@HPLOCOFL@www?4xgamingstudio?4com?$AA@));
- if (ptr4 == null || *(*(int*)(ptr4 + 12 / sizeof(hostent))) == 0)
- {
- MessageBox.Show("DNS Lookup of authentication server error. Your connection\nmay be problematic or your DNS server is currently offline.\nPlease try again later.\n", "Lookup error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- <Module>.delete((void*)ptr3);
- }
- else
- {
- uint num = <Module>.socket(2, 1, 6);
- sockaddr_in sockaddr_in = 0;
- initblk(ref sockaddr_in + 2, 0, 14);
- sockaddr_in = 2;
- cpblk(ref sockaddr_in + 4, *(*(int*)(ptr4 + 12 / sizeof(hostent))), 4);
- *(ref sockaddr_in + 2) = <Module>.htons(80);
- this.lblStatus.Text = "Connecting to server...";
- if (<Module>.connect(num, (sockaddr*)(&sockaddr_in), 16) == -1)
- {
- this.lblStatus.Text = "Unable to connect to authentication server.";
- <Module>.delete((void*)ptr3);
- }
- else
- {
- this.lblStatus.Text = "Sending credential information...";
- if (<Module>.send(num, (sbyte*)(&$ArrayType$$$BY0CAA@D), <Module>.strlen((sbyte*)(&$ArrayType$$$BY0CAA@D)), 0) == -1)
- {
- this.lblStatus.Text = "Unable to send request to authentication server.";
- <Module>.delete((void*)ptr3);
- }
- else
- {
- int num2 = <Module>.recv(num, (sbyte*)(&$ArrayType$$$BY0CAA@D2), 512, 0);
- int num3 = 0;
- while (num3 < 291551 && num2 != -1)
- {
- <Module>.memcpy((void*)(ptr3 + (IntPtr)num3 / sizeof(sbyte)), (void*)(&$ArrayType$$$BY0CAA@D2), (uint)num2);
- if (<Module>.strstr(ptr3, (sbyte*)(&<Module>.??_C@_04CCHLMOGN@fail?$AA@)) != null)
- {
- this.lblStatus.Text = "Invalid username or subscription expired.";
- <Module>.delete((void*)ptr3);
- Process.Start("http://www.xgamingstudio.com/forum/payments.php");
- return;
- }
- num3 += num2;
- num2 = <Module>.recv(num, (sbyte*)(&$ArrayType$$$BY0CAA@D2), 512, 0);
- if (num2 < 512 && num3 + num2 >= 291551 && num2 != -1)
- {
- <Module>.memcpy((void*)(ptr3 + (IntPtr)num3 / sizeof(sbyte)), (void*)(&$ArrayType$$$BY0CAA@D2), (uint)num2);
- num3 += num2;
- break;
- }
- }
- <Module>.closesocket(num);
- sbyte* ptr5 = <Module>.strstr(ptr3, (sbyte*)(&<Module>.??_C@_04FMMHFHOO@?$AN?6?$AN?6?$AA@));
- if (ptr5 == null)
- {
- this.lblStatus.Text = "Server response unknown. Try again.";
- }
- else
- {
- ptr5 += 4 / sizeof(sbyte);
- $ArrayType$$$BY04D $ArrayType$$$BY04D;
- <Module>.memset((void*)(&$ArrayType$$$BY04D), 0, 5u);
- <Module>.memcpy((void*)(&$ArrayType$$$BY04D), (void*)ptr5, 4u);
- ptr5 += 4 / sizeof(sbyte);
- CCRC32 cCRC;
- <Module>.CCRC32.{ctor}(ref cCRC);
- try
- {
- if (<Module>.CCRC32.FullCRC(ref cCRC, (byte*)ptr5, 291551) != -1712404301)
- {
- goto IL_3B8;
- }
- this.lblStatus.Text = "Authentication successful!";
- if (<Module>.strncmp((sbyte*)(&<Module>.??_C@_04FJPMOIGK@2?400?$AA@), (sbyte*)(&$ArrayType$$$BY04D), 4u) >= 0)
- {
- goto IL_3A5;
- }
- this.lblStatus.Text = "You have: v" + "2.00" + " Server has: v" + new string((sbyte*)(&$ArrayType$$$BY04D));
- Enum @enum = MessageBox.Show("Your version of MW3 Chaos is outdated. The current\nversion is " + new string((sbyte*)(&$ArrayType$$$BY04D)) + ". Would you like to download the latest version?", "Update Available", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
- if (@enum.Equals(DialogResult.Yes))
- {
- Process.Start("http://www.xgamingstudio.com/MW3_ChaosDownload/download_client.php");
- }
- <Module>.delete((void*)ptr3);
- Application.Exit();
- }
- catch
- {
- <Module>.___CxxCallUnwindDtor(ldftn(CCRC32.{dtor}), (void*)(&cCRC));
- throw;
- }
- <Module>.CCRC32.{dtor}(ref cCRC);
- return;
- IL_3A5:
- try
- {
- goto IL_3F6;
- }
- catch
- {
- <Module>.___CxxCallUnwindDtor(ldftn(CCRC32.{dtor}), (void*)(&cCRC));
- throw;
- }
- goto IL_3B8;
- IL_3F6:
- try
- {
- if (!<Module>.?A0xa8a89f8b.authenticated)
- {
- <Module>.GetTempFileName((sbyte*)(&<Module>.??_C@_01LFCBOECM@?4?$AA@), (sbyte*)(&<Module>.??_C@_03EGBCILHG@?$HOZX?$AA@), 0u, (sbyte*)(&<Module>.?A0xa8a89f8b.decryptModPath));
- byte* ptr6 = (byte*)ptr5;
- _iobuf* ptr7 = <Module>.fopen((sbyte*)(&<Module>.??_C@_0O@JCMDGNCA@MW3_Chaos?4dat?$AA@), (sbyte*)(&<Module>.??_C@_02JDPG@rb?$AA@));
- _iobuf* ptr8 = <Module>.fopen((sbyte*)(&<Module>.?A0xa8a89f8b.decryptModPath), (sbyte*)(&<Module>.??_C@_02GMLFBBN@wb?$AA@));
- int num4 = 0;
- $ArrayType$$$BY0CAA@E $ArrayType$$$BY0CAA@E;
- int num5 = <Module>.fread((void*)(&$ArrayType$$$BY0CAA@E), 1u, 512u, ptr7);
- while (<Module>.feof(ptr7) == null)
- {
- for (int i = 0; i < num5; i++)
- {
- if (num4 >= 2)
- {
- *(ref $ArrayType$$$BY0CAA@E + i) = (*(ref $ArrayType$$$BY0CAA@E + i) ^ ptr6[(IntPtr)num4 / 1] + *(ptr6 + (IntPtr)(num4 - 1) / 1) + ptr6[(IntPtr)(num4 - 2) / 1]);
- num4++;
- }
- else
- {
- *(ref $ArrayType$$$BY0CAA@E + i) = (*(ref $ArrayType$$$BY0CAA@E + i) ^ ptr6[(IntPtr)num4 / 1]);
- num4++;
- }
- if (num4 == 291551)
- {
- num4 = 0;
- }
- }
- <Module>.fwrite((void*)(&$ArrayType$$$BY0CAA@E), 1u, (uint)num5, ptr8);
- num5 = <Module>.fread((void*)(&$ArrayType$$$BY0CAA@E), 1u, 512u, ptr7);
- if (<Module>.feof(ptr7) != null)
- {
- break;
- }
- }
- <Module>.fclose(ptr7);
- <Module>.fclose(ptr8);
- File.SetAttributes(new string((sbyte*)(&<Module>.?A0xa8a89f8b.decryptModPath)), FileAttributes.Hidden | FileAttributes.System);
- }
- this.button1.Enabled = false;
- this.tmrInject.Enabled = true;
- <Module>.?A0xa8a89f8b.authenticated = true;
- <Module>.delete((void*)ptr3);
- }
- catch
- {
- <Module>.___CxxCallUnwindDtor(ldftn(CCRC32.{dtor}), (void*)(&cCRC));
- throw;
- }
- <Module>.CCRC32.{dtor}(ref cCRC);
- return;
- IL_3B8:
- try
- {
- this.lblStatus.Text = "Invalid username or subscription expired.";
- <Module>.delete((void*)ptr3);
- Process.Start("http://www.xgamingstudio.com/forum/payments.php");
- }
- catch
- {
- <Module>.___CxxCallUnwindDtor(ldftn(CCRC32.{dtor}), (void*)(&cCRC));
- throw;
- }
- <Module>.CCRC32.{dtor}(ref cCRC);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment