Jump to content
Tuts 4 You

1 Screenshot

Hi all,

This is a protected with the RETAIL edition... 

Mutation / Virtualization w/ the built in VMProtect license system.

There are 2 enter serial dialogs, once you solve the 1st, drives you to 2nd, when a valid serial entered exporting a file... 

If a valid serial entered on 1st form, is saved to license.diz file.

        internal MainForm()
        {
            InitializeComponent();

            if(File.Exists(General.licDIZ))
                txtSerial.Text = File.ReadAllText(General.licDIZ);
        }

        [Obfuscation(Feature = "ultra", Exclude = false)]
        [Obfuscation(Feature = "strings", Exclude = false)]
        [Obfuscation(Feature = "renaming", Exclude = false)]
        private void button1_Click(object sender, EventArgs e)
        {
            bool export2clipboard = Control.ModifierKeys == Keys.Control;

            if (export2clipboard)
            {
                ShowRealREG();
                return;
            }

            VMProtect.SerialState status = VMProtect.SDK.SetSerialNumber(txtSerial.Text);

            if (status != VMProtect.SerialState.Success)
            {
                lbl.ForeColor = Color.Red;
                lbl.Text = "oh no! ;(";
            }
            else
            {
                lbl.ForeColor = Color.DarkGreen;
                lbl.Text = "congrats, please use the button with CTRL down";
                File.WriteAllText(Path.Combine(Application.StartupPath, "license.diz"), txtSerial.Text);
            }

            //var status2 = VMProtect.SDK.GetSerialNumberState();
        }

        [Obfuscation(Feature = "ultralockbykey", Exclude = false)]
        [Obfuscation(Feature = "strings", Exclude = false)]
        private void ShowRealREG()
        {
            addform2tabpage(new Form1());
        }

        [Obfuscation(Feature = "renaming", Exclude = false)]
        private void addform2tabpage(Form frm)
        {
            this.Controls.OfType<Control>().ToList().ForEach(c => c.Visible = false);
            this.ClientSize = new System.Drawing.Size(373, 160);
            this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
                          (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2);
            this.Text = "DuaLipa";
            frm.TopLevel = false;
            frm.Visible = true;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.Dock = DockStyle.Fill;
            this.Controls.Add(frm);
        }

        [Obfuscation(Feature = "ultra", Exclude = false)]
        [Obfuscation(Feature = "renaming", Exclude = false)]
        private void MainForm_Activated(object sender, EventArgs e)
        {
            General.Check();
        }

[*] .NET: Improved renaming of virtual methods
[*] .NET: Fixed a bug that occurred inside finally blocks of virtualized methods


User Feedback

Recommended Comments

There are no comments to display.

×
×
  • Create New...