﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace VirtualizeMe
{
    class Program
    {
        [DllImport("user32.dll")]
        public static extern int MessageBoxA(int hWnd, string text, string caption, int options);

        #region test code
        static void test()
        {
            int test = 1337;
            int x = 1337;

            if (1337 != test || test == x+1)
            {
                MessageBoxA(0, "This was unreadable code... funny you changed something in the core", ">:O", 0);
                return;
            }
            else if (0 == test && 1337 == test && 1337 != x) //unreadable code, needs to be cracked
            {
                if (1337 != test || test == x + 1)
                {
                    MessageBoxA(0, "This was unreadable code... funny you changed something in the core", ">:O", 0);
                    return;
                }
                if (0 == test)
                {
                    //another funny trick
                    if ((x != test) == false)
                    {
                        if (1337 != test || test == x + 1)
                        {
                            MessageBoxA(0, "This was unreadable code... funny you changed something in the core", ">:O", 0);
                            return;
                        }
                        MessageBoxA(0, "nooooooooooo you cracked me", ">:O... pirates >;D", 0);
                    }
                    else
                    {
                        if (1337 != test || test == x + 1)
                        {
                            MessageBoxA(0, "This was unreadable code... funny you changed something in the core", ">:O", 0);
                            return;
                        }
                        MessageBoxA(0, "you didn't do anything... go back to ur hex editor", ">:(", 0);
                    }
                }
                else
                {
                    if (1337 != test || test == x + 1)
                    {
                        MessageBoxA(0, "This was unreadable code... funny you changed something in the core", ">:O", 0);
                        return;
                    }
                    MessageBoxA(0, "you didn't do anything... go back to ur hex editor", ">:(", 0);
                }
            }
            else
            {
                if (1337 != test || test == x + 1)
                {
                    MessageBoxA(0, "This was unreadable code... funny you changed something in the core", ">:O", 0);
                    return;
                }
                MessageBoxA(0, "you didn't do anything... go back to ur hex editor", ">:(", 0);
            }
        }
        #endregion

        static void Main(string[] args)
        {
            //CALLMEH(0);
            /*byte[] test = new byte[1000];
            
            for (int i = 0; i < test.Length; i++)
            {

            }*/
            
            //test.CallMe();
            while (true)
            {
                if (MessageBoxA(0, "Press something", "VirtualNet", 4) == 6)
                {
                    MessageBoxA(0, "You pressed yes hooray :D", "VirtualNet", 0);
                }
                else
                {
                    MessageBoxA(0, "no ? :(", "VirtualNet", 0);
                }
            }


            TestClass test = new TestClass(1337);
            //test.CallMe(539);
        }
    }

    class TestClass
    {
        int test = 0;
        int test2 = 0;
        int test3 = 0;
        public TestClass(int testy)
        {
            this.test = 467;
            this.test2 = 123;
            this.test3 = testy;
        }

        public void CallMe(int testy)
        {
            test = testy;
            char.IsDigit('c');
        }
    }
}