mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-21 02:46:10 +00:00
257 lines
8.3 KiB
C#
257 lines
8.3 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Boggle.Cube
|
|||
|
// 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 System;
|
|||
|
using System.Collections;
|
|||
|
using System.Drawing;
|
|||
|
using System.Runtime.CompilerServices;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace Boggle
|
|||
|
{
|
|||
|
public class Cube
|
|||
|
{
|
|||
|
[AccessedThroughProperty("clsPicCubeDown")]
|
|||
|
private PictureBox _clsPicCubeDown;
|
|||
|
private CircleLabel clsCubeLabel;
|
|||
|
private bool clsIsBack;
|
|||
|
|
|||
|
private virtual PictureBox clsPicCubeDown
|
|||
|
{
|
|||
|
get => this._clsPicCubeDown;
|
|||
|
[MethodImpl(MethodImplOptions.Synchronized)] set
|
|||
|
{
|
|||
|
if (this._clsPicCubeDown != null)
|
|||
|
this._clsPicCubeDown.Paint -= new PaintEventHandler(this.clspicCubeDown_Paint);
|
|||
|
this._clsPicCubeDown = value;
|
|||
|
if (this._clsPicCubeDown == null)
|
|||
|
return;
|
|||
|
this._clsPicCubeDown.Paint += new PaintEventHandler(this.clspicCubeDown_Paint);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public Cube()
|
|||
|
{
|
|||
|
this.clsCubeLabel = new CircleLabel();
|
|||
|
this.clsPicCubeDown = new PictureBox();
|
|||
|
}
|
|||
|
|
|||
|
public Color CubeTextColor
|
|||
|
{
|
|||
|
get => this.clsCubeLabel.CubeTextColor;
|
|||
|
set => this.clsCubeLabel.CubeTextColor = value;
|
|||
|
}
|
|||
|
|
|||
|
public bool IsBack
|
|||
|
{
|
|||
|
get => this.clsIsBack;
|
|||
|
set => this.clsIsBack = value;
|
|||
|
}
|
|||
|
|
|||
|
public PictureBox CubeDownPic
|
|||
|
{
|
|||
|
get => this.clsPicCubeDown;
|
|||
|
set => this.clsPicCubeDown = value;
|
|||
|
}
|
|||
|
|
|||
|
public Color CubeHighLight
|
|||
|
{
|
|||
|
get => this.clsCubeLabel.CubeHighLight;
|
|||
|
set => this.clsCubeLabel.CubeHighLight = value;
|
|||
|
}
|
|||
|
|
|||
|
public long CubeTopTop
|
|||
|
{
|
|||
|
get => (long) this.clsCubeLabel.Top;
|
|||
|
set => this.clsCubeLabel.Top = checked ((int) value);
|
|||
|
}
|
|||
|
|
|||
|
public long CubeTopLeft
|
|||
|
{
|
|||
|
get => (long) this.clsCubeLabel.Left;
|
|||
|
set => this.clsCubeLabel.Left = checked ((int) value);
|
|||
|
}
|
|||
|
|
|||
|
public long CubeTopHeight
|
|||
|
{
|
|||
|
get => (long) this.clsCubeLabel.Height;
|
|||
|
set => this.clsCubeLabel.Height = checked ((int) value);
|
|||
|
}
|
|||
|
|
|||
|
public long CubeTopWidth
|
|||
|
{
|
|||
|
get => (long) this.clsCubeLabel.Width;
|
|||
|
set => this.clsCubeLabel.Width = checked ((int) value);
|
|||
|
}
|
|||
|
|
|||
|
public object CubeTopRadius
|
|||
|
{
|
|||
|
get => (object) this.clsCubeLabel.CubeTopRadius;
|
|||
|
set => this.clsCubeLabel.CubeTopRadius = LongType.FromObject(value);
|
|||
|
}
|
|||
|
|
|||
|
public string CubeLetter
|
|||
|
{
|
|||
|
get => this.clsCubeLabel.CubeText;
|
|||
|
set => this.clsCubeLabel.CubeText = value;
|
|||
|
}
|
|||
|
|
|||
|
public CircleLabel CubeLabel
|
|||
|
{
|
|||
|
get => this.clsCubeLabel;
|
|||
|
set => this.clsCubeLabel = value;
|
|||
|
}
|
|||
|
|
|||
|
public void SetRndCubeLetter()
|
|||
|
{
|
|||
|
string str = "AABCDEEFGHIIJKLMNOOPQRSTUUVWXYZ";
|
|||
|
VBMath.Randomize();
|
|||
|
int Start1 = checked ((int) Math.Round((double) Conversion.Int((float) unchecked ((double) Strings.Len(str) * (double) VBMath.Rnd() + 1.0))));
|
|||
|
string sLeft = Strings.Mid(str, Start1, 1);
|
|||
|
long num1 = (long) checked (Start1 * 100);
|
|||
|
long num2 = 1;
|
|||
|
while (num2 <= num1)
|
|||
|
{
|
|||
|
VBMath.Randomize();
|
|||
|
int Start2 = checked ((int) Math.Round((double) Conversion.Int((float) unchecked ((double) Strings.Len(str) * (double) VBMath.Rnd() + 1.0))));
|
|||
|
sLeft = Strings.Mid(str, Start2, 1);
|
|||
|
checked { ++num2; }
|
|||
|
}
|
|||
|
if (StringType.StrCmp(sLeft, "Q", false) == 0)
|
|||
|
{
|
|||
|
sLeft = "Qu";
|
|||
|
try
|
|||
|
{
|
|||
|
foreach (Cube cube in (CollectionBase) modGlobal.Cubes)
|
|||
|
{
|
|||
|
modGlobal.myCube = cube;
|
|||
|
if (StringType.StrCmp(modGlobal.myCube.CubeLetter, "Qu", false) == 0)
|
|||
|
sLeft = "R";
|
|||
|
}
|
|||
|
}
|
|||
|
finally
|
|||
|
{
|
|||
|
IEnumerator enumerator;
|
|||
|
if (enumerator is IDisposable)
|
|||
|
((IDisposable) enumerator).Dispose();
|
|||
|
}
|
|||
|
}
|
|||
|
this.CubeLetter = sLeft;
|
|||
|
}
|
|||
|
|
|||
|
private void clspicCubeDown_Paint(object sender, PaintEventArgs e)
|
|||
|
{
|
|||
|
long x = checked ((long) Math.Round(unchecked (DoubleType.FromString(Strings.Mid(StringType.FromObject(this.CubeLabel.Tag), 1, 1)) * 70.0 * -1.0)));
|
|||
|
long y = checked ((long) Math.Round(unchecked (DoubleType.FromString(Strings.Mid(StringType.FromObject(this.CubeLabel.Tag), 2, 1)) * 70.0 * -1.0)));
|
|||
|
Image image = Image.FromFile(modGlobal.AppPath + "\\CubesDown.jpg");
|
|||
|
Point[] destPoints = new Point[3]
|
|||
|
{
|
|||
|
new Point(checked ((int) x), checked ((int) y)),
|
|||
|
new Point(checked ((int) (283L + x)), checked ((int) y)),
|
|||
|
new Point(checked ((int) x), checked ((int) (283L + y)))
|
|||
|
};
|
|||
|
e.Graphics.DrawImage(image, destPoints);
|
|||
|
}
|
|||
|
|
|||
|
public void ShowClick()
|
|||
|
{
|
|||
|
this.clsPicCubeDown.Width = checked ((int) Math.Round(unchecked (74.0 - DoubleType.FromString(Strings.Mid(StringType.FromObject(this.clsCubeLabel.Tag), 1, 1)))));
|
|||
|
this.clsPicCubeDown.Height = checked ((int) Math.Round(unchecked (75.0 - DoubleType.FromString(Strings.Mid(StringType.FromObject(this.clsCubeLabel.Tag), 2, 1)))));
|
|||
|
this.clsPicCubeDown.Left = checked (this.clsCubeLabel.Left - 10);
|
|||
|
this.clsPicCubeDown.Top = checked ((int) Math.Round(unchecked ((double) this.clsCubeLabel.Top - 9.6)));
|
|||
|
this.CubeTopRadius = (object) 50;
|
|||
|
this.clsPicCubeDown.Show();
|
|||
|
this.SetCubeTopPos();
|
|||
|
}
|
|||
|
|
|||
|
private void SetCubeTopPos()
|
|||
|
{
|
|||
|
object tag = this.clsCubeLabel.Tag;
|
|||
|
if (ObjectType.ObjTst(tag, (object) "00", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 7; }
|
|||
|
checked { this.clsCubeLabel.Left += 6; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "10", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 7; }
|
|||
|
checked { this.clsCubeLabel.Left += 3; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "20", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 7; }
|
|||
|
checked { --this.clsCubeLabel.Left; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "30", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 7; }
|
|||
|
checked { this.clsCubeLabel.Left -= 6; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "01", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 4; }
|
|||
|
checked { this.clsCubeLabel.Left += 7; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "11", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 4; }
|
|||
|
checked { this.clsCubeLabel.Left += 3; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "21", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 4; }
|
|||
|
checked { --this.clsCubeLabel.Left; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "31", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top += 3; }
|
|||
|
checked { this.clsCubeLabel.Left -= 5; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "02", false) == 0)
|
|||
|
checked { this.clsCubeLabel.Left += 8; }
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "12", false) == 0)
|
|||
|
{
|
|||
|
checked { --this.clsCubeLabel.Top; }
|
|||
|
checked { this.clsCubeLabel.Left += 3; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "22", false) == 0)
|
|||
|
{
|
|||
|
checked { --this.clsCubeLabel.Top; }
|
|||
|
checked { --this.clsCubeLabel.Left; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "32", false) == 0)
|
|||
|
{
|
|||
|
checked { --this.clsCubeLabel.Top; }
|
|||
|
checked { this.clsCubeLabel.Left -= 5; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "03", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top -= 5; }
|
|||
|
checked { this.clsCubeLabel.Left += 8; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "13", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top -= 5; }
|
|||
|
checked { this.clsCubeLabel.Left += 3; }
|
|||
|
}
|
|||
|
else if (ObjectType.ObjTst(tag, (object) "23", false) == 0)
|
|||
|
{
|
|||
|
checked { this.clsCubeLabel.Top -= 5; }
|
|||
|
checked { --this.clsCubeLabel.Left; }
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
if (ObjectType.ObjTst(tag, (object) "33", false) != 0)
|
|||
|
return;
|
|||
|
checked { this.clsCubeLabel.Top -= 5; }
|
|||
|
checked { this.clsCubeLabel.Left -= 5; }
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|