MalwareSourceCode/MSIL/Trojan/Win32/P/Trojan.Win32.Patched.mf-06a1c79ea1bf078d9f5816243d6887697530720ed581c2975d99154e2a24648f/VMSOSPServiceInstaller.cs
2022-08-18 06:28:56 -05:00

78 lines
2.8 KiB
C#

// Decompiled with JetBrains decompiler
// Type: VMS.OSService.VMSOSPServiceInstaller
// Assembly: VMS.OSP.Service, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7B29B897-26BF-407B-B0D0-14253383A174
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan.Win32.Patched.mf-06a1c79ea1bf078d9f5816243d6887697530720ed581c2975d99154e2a24648f.exe
using Microsoft.Win32;
using System;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
namespace VMS.OSService
{
[RunInstaller(true)]
public class VMSOSPServiceInstaller : Installer
{
private ServiceProcessInstaller serviceProcessInstaller1;
private ServiceInstaller serviceInstaller1;
private Container components;
public VMSOSPServiceInstaller()
{
this.InitializeComponent();
this.serviceInstaller1.ServiceName = "Varian OSP Service";
this.serviceInstaller1.DisplayName = "Varian OSP Service";
this.serviceInstaller1.StartType = ServiceStartMode.Automatic;
this.AfterInstall += new InstallEventHandler(this.VMSServiceInstaller_AfterInstall);
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.serviceProcessInstaller1 = new ServiceProcessInstaller();
this.serviceInstaller1 = new ServiceInstaller();
this.serviceProcessInstaller1.Account = ServiceAccount.LocalSystem;
this.serviceProcessInstaller1.Password = (string) null;
this.serviceProcessInstaller1.Username = (string) null;
this.serviceInstaller1.DisplayName = "Varian OSP Service";
this.serviceInstaller1.ServiceName = "Varian OSP Service";
this.serviceInstaller1.StartType = ServiceStartMode.Automatic;
this.Installers.AddRange(new Installer[2]
{
(Installer) this.serviceProcessInstaller1,
(Installer) this.serviceInstaller1
});
}
private void VMSServiceInstaller_AfterInstall(object sender, InstallEventArgs e)
{
try
{
string name = "SYSTEM\\CurrentControlSet\\Services\\Varian OSP Service";
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(name, true))
registryKey?.SetValue("Description", (object) "Controls software inventory and OSP maintenance.");
}
catch (Exception ex)
{
}
try
{
string name = "SYSTEM\\CurrentControlSet\\Control\\";
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(name, true))
registryKey?.SetValue("ServicesPipeTimeout", (object) 200000, RegistryValueKind.DWord);
}
catch (Exception ex)
{
}
}
}
}