private static void smethod_5( Attribute0 productAttribute, DateTime firstUsedDate, DateTime lastUsedDate) { DateTime now = DateTime.Now; RegistryKey subKey = Registry.CurrentUser.CreateSubKey("Software").CreateSubKey("WW").CreateSubKey("{F07847F9-0CED-4e2f-8771-9BEA3D1D10CC}"); string str = Class750.smethod_0(Class750.Encrypt(Encoding.Unicode.GetBytes(string.Format("{0},{1},{2}", (object)Assembly.GetExecutingAssembly().GetName().Version.ToString(), (object)firstUsedDate.ToString(CultureInfo.InvariantCulture.DateTimeFormat.SortableDateTimePattern, (IFormatProvider)CultureInfo.InvariantCulture), (object)lastUsedDate.ToString(CultureInfo.InvariantCulture.DateTimeFormat.SortableDateTimePattern, (IFormatProvider)CultureInfo.InvariantCulture))))); subKey.SetValue(productAttribute.RegistryKey, (object)str); }
private static bool smethod_4( Attribute0 productAttribute, out DateTime firstUsedDate, out DateTime lastUsedDate) { firstUsedDate = DateTime.MinValue; lastUsedDate = DateTime.MinValue; RegistryKey registryKey1 = Registry.CurrentUser.OpenSubKey("Software", true); if (registryKey1 == null) { return(false); } RegistryKey registryKey2 = registryKey1.OpenSubKey("WW", true); if (registryKey2 == null) { return(false); } RegistryKey registryKey3 = registryKey2.OpenSubKey("{F07847F9-0CED-4e2f-8771-9BEA3D1D10CC}"); if (registryKey3 == null) { return(false); } string s1 = (string)registryKey3.GetValue(productAttribute.RegistryKey); if (s1 != null) { if (!(s1 == string.Empty)) { string str; try { str = Encoding.Unicode.GetString(Class750.Decrypt(Class750.smethod_1(s1))); } catch (Exception ex) { return(false); } string[] strArray = str.Split(','); if (strArray == null || strArray.Length != 3) { return(false); } string version1 = strArray[0]; if (version1 == null || version1 == string.Empty) { return(false); } Version version2 = new Version(version1); string s2 = strArray[1]; if (s2 == null || s2 == string.Empty) { return(false); } firstUsedDate = DateTime.Parse(s2, (IFormatProvider)CultureInfo.InvariantCulture); string s3 = strArray[2]; if (s3 == null || s3 == string.Empty) { return(false); } lastUsedDate = DateTime.Parse(s3, (IFormatProvider)CultureInfo.InvariantCulture); Version version3 = Assembly.GetExecutingAssembly().GetName().Version; return(new Version(version3.Major, version3.Minor, version3.Build).CompareTo(new Version(version2.Major, version2.Minor, version2.Build)) <= 0); } } return(false); }