Exemple #1
0
    private void timer_0_Tick(object sender, EventArgs e)
    {
        IntPtr    foregroundWindow = GClass927.GetForegroundWindow();
        GClass932 proxy            = null;

        PErkava.concurrentDictionary_0.TryGetValue(foregroundWindow, out proxy);
        this.Proxy = proxy;
    }
Exemple #2
0
 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;
     }
 }
Exemple #3
0
    public bool method_9()
    {
        IntPtr foregroundWindow = GClass927.GetForegroundWindow();

        this.method_2(foregroundWindow);
        this.Status = "Getting ready.";
        PErkava.concurrentDictionary_0[foregroundWindow] = this;
        try
        {
            this.Status = "Patching result: " + "success";
            return(true);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message + ex.StackTrace + ex.ToString());
        }
        return(false);
    }