private void method_10(GClass91 gclass91_0, BinaryStream binaryStream_0, byte[] byte_0, int int_0) { if (this.method_1() == IntPtr.Zero) { this.method_2(GClass927.GetForegroundWindow()); } if (int_0 == 23 && Encoding.UTF8.GetString(byte_0).Contains("policy")) { byte[] bytes = Encoding.ASCII.GetBytes("<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" /></cross-domain-policy>\0"); gclass91_0.method_3().GetStream().Write(bytes, 0, bytes.Length); try { gclass91_0.method_8(); } catch { } PErkava.concurrentDictionary_2[this.method_1()] = false; if (!this.method_9()) { Debug.WriteLine("Patching failed"); MessageBox.Show("Could not patch the client. This could mean that PErkava doesn't yet support this client version."); return; } PErkava.concurrentDictionary_2[this.method_1()] = true; return; } else { if (this.bool_3) { this.bool_3 = false; int_0--; long position = binaryStream_0.Position; binaryStream_0.Position = position + 1L; } GClass84 <GClass857> gclass = this.gclass84_0; if (gclass == null) { return; } gclass.method_10(binaryStream_0, byte_0, int_0); return; } }
private void method_7(object sender, RoutedEventArgs e) { GClass932 proxy = this.Proxy; if (proxy == null) { return; } GClass84 <GClass857> gclass = proxy.method_0(); if (gclass == null) { return; } GClass91 socket = gclass.Socket; if (socket == null) { return; } socket.method_8(); }
private void method_8(bool bool_2, ProxySettings proxySettings_0) { if (this.Socket != null && this.Socket.method_0()) { this.method_14(); this.Disconnect(ErrorReason.ConnectionOverridden, null, false); } this.Socket = null; try { this.Socket = new GClass91(); this.method_13(); this.method_9(); this.Socket.Connect(this.Host, this.method_0(), bool_2, proxySettings_0); } catch (Exception) { GClass91 socket = this.Socket; if (socket != null) { socket.method_8(); } } }
public void Disconnect(ErrorReason reason, Exception ex = null, bool fromEvent = false) { if (this.bool_1) { return; } this.bool_1 = true; this.method_14(); GClass91 socket = this.Socket; if (socket != null) { socket.method_8(); } if (!fromEvent) { GClass91.GClass92.GDelegate6 disconnected = this.Disconnected; if (disconnected == null) { return; } disconnected(this.Socket, reason, ex); } }