[/CODE]Code:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net.Sockets; using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.IO; using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace ConsoleApplication6 { class Program { [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct Struct3 { public int int_0; public string string_0; public string string_1; public string string_2; public int int_1; public int int_2; public int int_3; public int int_4; public int int_5; public int int_6; public int int_7; public int int_8; public short short_0; public short short_1; public IntPtr intptr_0; public IntPtr intptr_1; public IntPtr intptr_2; public IntPtr intptr_3; } [StructLayout(LayoutKind.Sequential)] internal struct Struct4 { public IntPtr intptr_0; public IntPtr intptr_1; public int int_0; public int int_1; } [StructLayout(LayoutKind.Sequential)] public struct Struct5 { public int int_0; public IntPtr intptr_0; public int int_1; } [DllImport("ToolsA.dll", CallingConvention=CallingConvention.Cdecl)] public static extern IntPtr YAPAEPADH(byte[] byte_0, int int_28); [DllImport("kernel32.dll", SetLastError = true)] public static extern IntPtr OpenProcess(uint uint_0, int int_28, int int_29); [DllImport("ToolsA.dll", EntryPoint = "?_g3@@YA_NPAEH0HPAPAX1@Z")] public static extern bool YA_NPAEH0HPAPAX1(byte[] byte_0, int int_28, byte[] byte_1, int int_29, ref uint uint_0, ref uint uint_1); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool CreateProcess(string string_0, string string_1, ref Struct5 struct5_0, ref Struct5 struct5_1, bool bool_0, uint uint_0, IntPtr intptr_0, string string_2, [In] ref Struct3 struct3_0, out Struct4 struct4_0); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool QueryFullProcessImageName(IntPtr intptr_0, int int_28, StringBuilder stringBuilder_0, out int int_29); [DllImport("kernel32.dll", SetLastError = true)] public static extern int CloseHandle(IntPtr intptr_0); static bool method_12(string string_0) { try { Convert.ToInt32(string_0); return true; } catch { } try { Convert.ToInt32(string_0, 0x10); return true; } catch { } return false; } private sealed class Class22 { public bool bool_0; public Process process_0; } static List<Class22> list_0 = new List<Class22>(); static void method_5(Process process_0, bool bool_0) { Class22 item = new Class22 { process_0 = process_0, bool_0 = true }; list_0.Add(item); } static void method_7() { try { DirectoryInfo info = new DirectoryInfo(@"C:\ArcheAge\Documents\USER\shaders"); foreach (FileInfo info2 in info.GetFiles()) { info2.Delete(); } foreach (DirectoryInfo info3 in info.GetDirectories()) { info3.Delete(true); } } catch { } for (int i = 0; i < 3; i++) { try { DirectoryInfo info4 = new DirectoryInfo(@"C:\ArcheAge" + i + @"\Documents\USER\shaders"); foreach (FileInfo info5 in info4.GetFiles()) { info5.Delete(); } foreach (DirectoryInfo info6 in info4.GetDirectories()) { info6.Delete(true); } } catch { } } } internal sealed class Class32 { public string string_0 = ""; public string string_1 = ""; public string string_2 = ""; public ushort ushort_0; } internal sealed class Class21 { } [CompilerGenerated] private sealed class Class26 { public bool bool_0; public Class21 class21_0; public Class32 class32_0; public void method_0() { //this.class21_0.method_10(this.coreInternal_0, this.class32_0, this.bool_0); } } static void smethod_11(string string_3) { try { string s = string.Concat(new object[] { "[", DateTime.Now.Hour, ":", DateTime.Now.Minute, ":", DateTime.Now.Second, ".", DateTime.Now.Millisecond, "]: ", string_3 }); //lock (object_0) { byte[] bytes = Encoding.UTF8.GetBytes(s); byte[] destination = new byte[bytes.Length + 5]; Marshal.Copy(YAPAEPADH(bytes, bytes.Length), destination, 0, destination.Length); //using (FileStream stream = new FileStream(AppMain.string_2, FileMode.Append, FileAccess.Write, FileShare.ReadWrite)) //{ // using (BinaryWriter writer = new BinaryWriter(stream, Encoding.UTF8, false)) // { // writer.Write(destination); // } //} } } catch (Exception exception) { Console.WriteLine(exception.ToString()); } } static void method_4(int int_0, int int_1, Class32 class32_0, bool bool_0, byte byte_0) { Action action = null; Class26 class2 = new Class26 { class32_0 = class32_0, bool_0 = bool_0, }; IntPtr zero = IntPtr.Zero; string str = ""; try { int capacity = 0x400; StringBuilder builder = new StringBuilder(capacity); zero = OpenProcess(0x143a, 0, int_0); QueryFullProcessImageName(zero, 0, builder, out capacity); str = builder.ToString().Substring(0, builder.ToString().ToLower().IndexOf("bin32", StringComparison.Ordinal)); } catch (Exception exception) { //Class911.smethod_11(exception.ToString()); } finally { CloseHandle(zero); } } static void Main(string[] args) { string username = "[email protected]"; string password = ""; // Connect as client to port 1300 string server = "auth.trionworlds.com"; TcpClient client = new TcpClient(server, 443); StringBuilder builder = new StringBuilder(); Uri uri = new Uri("https://auth.trionworlds.com/multiauth/v1_2"); byte[] buffer = new byte[0x800]; // Uri.EscapeDataString("1001,1,111,120,122,131,130,511,512,513,514,520,515,516,517,518,519,522"); string str = ""; string str2 = ""; string string_1 = ""; string string_0 = ""; // Create a secure stream using (SslStream sslStream = new SslStream(client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null)) { int num; sslStream.AuthenticateAsClient(server); builder.AppendFormat("{0} {1} HTTP/1.1\r\nHost: {2}\r\n", "POST", uri.PathAndQuery, uri.Host); builder.AppendFormat("{0}: {1}\r\n", "Accept", "*/*"); builder.AppendFormat("{0}: {1}\r\n", "Accept-Encoding", "gzip"); builder.AppendFormat("{0}: {1}\r\n", "User-Agent", "Trion Glyph Client"); builder.AppendFormat("Content-Length: {0}\r\n", Encoding.UTF8.GetByteCount("username=" + username + "&password=" + password + "&channel=1001%2C1%2C111%2C120%2C122%2C131%2C130%2C511%2C512%2C513%2C514%2C520%2C515%2C516%2C517%2C518%2C519%2C522&includeStoreToken&publicMachine=0&macAddr=0088884e5a86")); builder.AppendFormat("Content-Type: {0}\r\n", "application/x-www-form-urlencoded"); builder.Append("\r\n"); builder.Append("username=" + username + "&password=" + password + "&channel=1001%2C1%2C111%2C120%2C122%2C131%2C130%2C511%2C512%2C513%2C514%2C520%2C515%2C516%2C517%2C518%2C519%2C522&includeStoreToken&publicMachine=0&macAddr=0088884e5a86"); byte[] bytes = Encoding.UTF8.GetBytes(builder.ToString()); sslStream.Write(bytes, 0, bytes.Length); sslStream.Flush(); int num2 = -1; goto Label_026D; Label_01DB: if (str2.IndexOf("\r\n\r\n") >= 0) { if (str2.IndexOf("Content-Length") >= 0) { int startIndex = str2.IndexOf("Content-Length") + 0x10; int index = str2.IndexOf("\r\n", (int)(str2.IndexOf("Content-Length") + 0x10)); num2 = int.Parse(str2.Substring(startIndex, index - startIndex)); } if (num2 != -1) { int num5 = str2.IndexOf("\r\n\r\n"); int length = str2.Length; if (num2 == ((length - num5) - 4)) { num = 0; } } } Label_0262: if (num != 0) { goto Label_026D; } goto Label_02D5; Label_0268: num = 0; goto Label_0262; Label_026D: num = sslStream.Read(buffer, 0, buffer.Length); string str3 = Encoding.UTF8.GetString(buffer, 0, num); str2 = str2 + str3; if (str3.IndexOf("0\r\n\r\n") < 0) { goto Label_01DB; } goto Label_0268; Label_02D5: { str = str2; //Console.WriteLine(str); string[] strArray = str.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < strArray.Length; i++) { strArray[i] = strArray[i].Replace("\r", ""); } string str5 = ""; foreach (string str6 in strArray) { if (!method_12(str6)) { str5 = str5 + str6; } } string[] strArray2 = str5.Split(new string[] { "Signature:" }, StringSplitOptions.RemoveEmptyEntries); for (int j = 0; j < strArray2.Length; j++) { strArray2[j] = "Signature: " + strArray2[j]; } foreach (string str7 in strArray2) { if (str7.IndexOf("<channelId>120</channelId>") >= 0) { int num9 = str5.IndexOf("Signature:"); int num10 = str5.IndexOf("<?xml version=\"1.0\""); int num11 = str5.IndexOf("</authTicket>"); if (((num9 != -1) && (num10 != -1)) && (num10 != -1)) { string_0 = str5.Substring(num9, num10 - num9); string_1 = str5.Substring(num10, (num11 - num10) + 13); } } } } } uint num3 = 0; uint num4 = 0; byte[] buffer4 = Encoding.UTF8.GetBytes(string_1); byte[] buffer5 = Encoding.UTF8.GetBytes(string_0); byte[] buffer6 = new byte[(buffer4.Length + 1) + buffer5.Length]; Array.Copy(buffer5, 0, buffer6, 0, buffer5.Length); buffer6[buffer5.Length] = 10; Array.Copy(buffer4, 0, buffer6, buffer5.Length + 1, buffer4.Length); YA_NPAEH0HPAPAX1(buffer6, buffer6.Length, buffer5, buffer5.Length, ref num3, ref num4); Struct4 struct10 = new Struct4(); Struct3 struct11 = new Struct3(); Struct5 struct12 = new Struct5(); Struct5 struct13 = new Struct5(); struct12.int_0 = Marshal.SizeOf(struct12); struct13.int_0 = Marshal.SizeOf(struct13); string str13 = "en_us"; string str12 = " -t +auth_ip 127.0.0.1 -auth_port 1237 -handle " + num3.ToString("X8") + ":" + num4.ToString("X8") + " -lang " + str13; method_7(); Console.WriteLine(str12); CreateProcess(@"C:\ArcheAge\Working\bin32\archeage.exe", str12, ref struct12, ref struct13, false, 4, IntPtr.Zero, null, ref struct11, out struct10); method_5(Process.GetProcessById(struct10.int_0), true); method_4(struct10.int_0, struct10.int_1, null, true, 0); Process game = new Process(); var info = new ProcessStartInfo("C:\\ArcheAge\\Working\\bin32\\archeage.exe"); info.Arguments = string.Format("{0}", str12); game.StartInfo = info; game.Start(); // Process.Start(@"C:\ArcheAge\Working\bin32\archeage.exe", str12); // Disconnect and close the client client.Close(); } public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { // Accept all certificates return true; } } }