Ребят помогите разобраться в коде C#

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by 0xd098d0b3d0, 7 Mar 2013.

  1. 0xd098d0b3d0

    0xd098d0b3d0 New Member

    Joined:
    26 Oct 2012
    Messages:
    54
    Likes Received:
    1
    Reputations:
    0
    Вобщем
    вот код
    Я так понимаю первое это форма авторизации в приложении. Тогда что делают три следующии функции?
    Code:
    private void button1_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrWhiteSpace(this.textBox2.Text))
        {
            MessageBox.Show("Введите AN!");
        }
        else if (!o0o.oooooo0(o0o.o00ooo0(), this.textBox2.Text.Trim()))
        {
            MessageBox.Show("Неверный код!");
        }
        else
        {
            this.CLflag = false;
            base.Close();
        }
    }
    Code:
    public static bool oooooo0(string text, string text2)
    {
        if (ooOOoo(text) == text2)
        {
            Init.Value3 = text2;
            Tools.SetBikOption("hid", text);
            Tools.SetBikOption("an", text2);
            return true;
        }
        return false;
    }
    
     
    
     
    
    Code:
    internal class o0o : Tools
    {
        // Methods
        [MethodImpl(MethodImplOptions.NoInlining)]
        public static string o00ooo0()
        {
            string input = "";
            ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2", "SELECT * FROM Win32_Processor");
            foreach (ManagementObject obj2 in searcher.Get())
            {
                input = obj2["ProcessorId"].ToString();
            }
            string str10 = Tools.CalculateMD5Hash(input);
            string str2 = str10.Substring(0, 8);
            string str3 = str10.Substring(8, 8);
            string str4 = str10.Substring(0x10, 8);
            string str5 = str10.Substring(0x18, 8);
            str10 = str4 + str5 + str2 + str3;
            str2 = str10.Substring(0, 4);
            str3 = str10.Substring(4, 4);
            str4 = str10.Substring(8, 4);
            str5 = str10.Substring(12, 4);
            string str6 = str10.Substring(0x10, 4);
            string str7 = str10.Substring(20, 4);
            string str8 = str10.Substring(0x18, 4);
            string str9 = str10.Substring(0x1c, 4);
            return (str5 + str8 + str2 + str4 + str6 + str3 + str7);
        }
    
        [MethodImpl(MethodImplOptions.NoInlining)]
        public static string ooOOoo(string text)
        {
            string input = "";
            string str7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
            char[] chArray = str7.ToCharArray();
            char[] chArray2 = text.ToCharArray();
            for (int i = 0; i < chArray2.Length; i++)
            {
                int num3 = (Convert.ToInt32(chArray2[i]) + str7.IndexOf(chArray2[i])) + 20;
                if ((num3 <= 0x23) && (num3 >= 20))
                {
                    num3 += 15;
                }
                if ((num3 <= 50) && (num3 >= 0x24))
                {
                    num3 += 70;
                }
                if ((num3 <= 100) && (num3 >= 0x33))
                {
                    num3 -= 5;
                }
                if ((num3 <= 150) && (num3 >= 0x65))
                {
                    num3 -= 0x21;
                }
                input = input + ((string) num3) + Convert.ToString(chArray[Convert.ToInt32(Convert.ToString(num3).Substring(0, 1))]);
            }
            string str6 = Tools.CalculateMD5Hash(input);
            string str2 = str6.Substring(0, 8);
            string str3 = str6.Substring(8, 8);
            string str4 = str6.Substring(0x10, 8);
            string str5 = str6.Substring(0x18, 8);
            return (str4 + str5 + str2 + str3);
        }
    
        [MethodImpl(MethodImplOptions.NoInlining)]
        public static bool oooooo0(string text, string text2)
        {
            if (ooOOoo(text) == text2)
            {
                Init.Value3 = text2;
                Tools.SetBikOption("hid", text);
                Tools.SetBikOption("an", text2);
                return true;
            }
            return false;
        }
    }
    
     
    Collapse Methods
     
    
    Code:
    [MethodImpl(MethodImplOptions.NoInlining)]
    public static string o00ooo0()
    {
        string input = "";
        ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2", "SELECT * FROM Win32_Processor");
        foreach (ManagementObject obj2 in searcher.Get())
        {
            input = obj2["ProcessorId"].ToString();
        }
        string str10 = Tools.CalculateMD5Hash(input);
        string str2 = str10.Substring(0, 8);
        string str3 = str10.Substring(8, 8);
        string str4 = str10.Substring(0x10, 8);
        string str5 = str10.Substring(0x18, 8);
        str10 = str4 + str5 + str2 + str3;
        str2 = str10.Substring(0, 4);
        str3 = str10.Substring(4, 4);
        str4 = str10.Substring(8, 4);
        str5 = str10.Substring(12, 4);
        string str6 = str10.Substring(0x10, 4);
        string str7 = str10.Substring(20, 4);
        string str8 = str10.Substring(0x18, 4);
        string str9 = str10.Substring(0x1c, 4);
        return (str5 + str8 + str2 + str4 + str6 + str3 + str7);
    }
    
     
    
     
     
    #1 0xd098d0b3d0, 7 Mar 2013
    Last edited: 7 Mar 2013
  2. 0xd098d0b3d0

    0xd098d0b3d0 New Member

    Joined:
    26 Oct 2012
    Messages:
    54
    Likes Received:
    1
    Reputations:
    0
    Разобрался всем спасибо.