Example #1
0
 internal static Class71 smethod_0(string string_6)
 {
     string_6 = Path.GetFileNameWithoutExtension(string_6) + ".settings";
     string_6 = Path.Combine(Class71.string_3, string_6);
     if (!File.Exists(string_6) || new FileInfo(string_6).Length == 0L)
     {
         new Class71
         {
             LoadedFromFileName = string_6
         }.method_0();
     }
     FileStream fileStream = null;
     Class71 result;
     try
     {
         fileStream = new FileStream(string_6, FileMode.Open);
         Rijndael rijndael = Rijndael.Create();
         ICryptoTransform transform = rijndael.CreateDecryptor(Encoding.ASCII.GetBytes("aniow8qqaniow8qqaniow8qqaniow8qq"), Encoding.ASCII.GetBytes("o34f57heaniow8qq"));
         using (CryptoStream cryptoStream = new CryptoStream(fileStream, transform, CryptoStreamMode.Read))
         {
             using (Stream stream = new GZipStream(cryptoStream, CompressionMode.Decompress))
             {
                 using (StreamReader streamReader = new StreamReader(stream, new UTF8Encoding()))
                 {
                     string value = streamReader.ReadToEnd();
                     Class71 @class = JsonConvert.DeserializeObject<Class71>(value);
                     @class.LoadedFromFileName = string_6;
                     @class.fileStream_0 = fileStream;
                     result = @class;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error loading Profile: " + ex.Message + "\r\nA new profile will be created and the old one will be overwritten when you click ok. So backup your profile now if you need.", "HellBuddy Bot", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         Class71 class2 = new Class71();
         class2.LoadedFromFileName = string_6;
         class2.method_0();
         result = class2;
     }
     finally
     {
         fileStream.Close();
     }
     return result;
 }