// 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 \u001A\u0006;
using \u007F\u0004;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace \u001A\u0006
{
  internal class \u0019\u0006
  {
    private static \u0019\u0006 \u0001;
    private long \u0002;

    [DllImport("kernel32", EntryPoint = "SetProcessWorkingSetSize")]
    private static extern int \u0006\u0002(
      [XmlElement(DataType = "base64Binary")] IntPtr process,
      int minimumWorkingSetSize,
      int maximumWorkingSetSize);

    private void \u0006\u0002()
    {
      Process currentProcess;
      try
      {
        try
        {
          currentProcess = Process.GetCurrentProcess();
          try
          {
            \u0019\u0006.\u0006\u0002(currentProcess.Handle, -1, -1);
          }
          finally
          {
            currentProcess?.Dispose();
          }
        }
        catch
        {
        }
      }
      catch (Exception ex)
      {
        Process process = currentProcess;
        \u0089\u0004.\u0019\u0005(ex, (object) process, (object) this);
        throw;
      }
    }

    private void \u0006\u0002(object sender, EventArgs e)
    {
      DateTime dateTime;
      long ticks;
      try
      {
        try
        {
          DateTime now = DateTime.Now;
          if (true)
            goto label_4;
label_1:
          ticks = dateTime.Ticks;
          if (ticks - this.\u0002 <= 10000000L)
            return;
          this.\u0002 = ticks;
          this.\u0006\u0002();
          return;
label_4:
          dateTime = now;
          goto label_1;
        }
        catch
        {
        }
      }
      catch (Exception ex)
      {
        // ISSUE: variable of a boxed type
        __Boxed<long> local1 = (ValueType) ticks;
        // ISSUE: variable of a boxed type
        __Boxed<DateTime> local2 = (ValueType) dateTime;
        object obj = sender;
        EventArgs eventArgs = e;
        \u0089\u0004.\u001C\u0005(ex, (object) local1, (object) local2, (object) this, obj, (object) eventArgs);
        throw;
      }
    }

    private \u0019\u0006()
    {
      DateTime now = DateTime.Now;
      this.\u0002 = now.Ticks;
      // ISSUE: explicit constructor call
      base.\u002Ector();
      try
      {
        Application.Idle += new EventHandler(this.\u0006\u0002);
        this.\u0006\u0002();
      }
      catch (Exception ex)
      {
        // ISSUE: variable of a boxed type
        __Boxed<DateTime> local = (ValueType) now;
        \u0089\u0004.\u0019\u0005(ex, (object) local, (object) this);
        throw;
      }
    }

    public static void \u0005\u0002()
    {
      try
      {
        try
        {
          if (Environment.OSVersion.Platform != PlatformID.Win32NT)
            return;
          \u0019\u0006.\u0001 = new \u0019\u0006();
        }
        catch
        {
        }
      }
      catch (Exception ex)
      {
        \u0089\u0004.\u0017\u0005(ex);
        throw;
      }
    }
  }
}
