// Decompiled with JetBrains decompiler
// Type: Sixxpack.stub
// Assembly: actmp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 1E1B0074-A467-44D3-A084-BB0DBEAB866F
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.MSIL.Crypt.hmyy-b7895f6f1014a2ac585a4709be6336bf8f76e85b5b83e2f4bda4b08ac00c99e7.exe

using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;

namespace Sixxpack
{
  internal class stub
  {
    internal static int orig = 32768;

    [STAThread]
    private static void Main(string[] args)
    {
      try
      {
        AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(stub.myResolveEventHandler);
      }
      catch (Exception ex)
      {
      }
      object[] parameters = new object[1]{ (object) args };
      MemoryStream inStream = new MemoryStream();
      Stream stream = (Stream) new FileStream(Application.ExecutablePath.Substring(Application.ExecutablePath.LastIndexOf('\\') + 1), FileMode.Open, FileAccess.Read);
      stream.Position = (long) stub.orig;
      byte[] buffer = new byte[stream.Length - (long) stub.orig];
      stream.Read(buffer, 0, Convert.ToInt32(buffer.Length));
      inStream.Write(buffer, 0, buffer.Length);
      inStream.Seek(0L, SeekOrigin.Begin);
      Assembly assembly = Assembly.Load(new Compressor().Decompress((Stream) inStream));
      try
      {
        assembly.EntryPoint.Invoke((object) null, parameters);
      }
      catch
      {
        assembly.EntryPoint.Invoke((object) null, (object[]) null);
      }
    }

    private static Assembly myResolveEventHandler(object sender, ResolveEventArgs args)
    {
      string str = args.Name.ToString().Trim().Split(',')[0].ToString().Trim();
      string path = str.IndexOf(".") < 0 ? "_" + str + ".dll" : str.Replace(".", "_") + ".dll";
      MemoryStream inStream = new MemoryStream();
      Stream stream = (Stream) new FileStream(path, FileMode.Open, FileAccess.Read);
      byte[] buffer = new byte[stream.Length];
      stream.Read(buffer, 0, Convert.ToInt32(buffer.Length));
      inStream.Write(buffer, 0, buffer.Length);
      inStream.Seek(0L, SeekOrigin.Begin);
      return Assembly.Load(new Compressor().Decompress((Stream) inStream));
    }
  }
}
