// Token: 0x0600184C RID: 6220 RVA: 0x000419FC File Offset: 0x0003FBFC protected Class175(string autoUpdateID, string autoUpdateFilePath) { this.string_0 = autoUpdateID; this.string_1 = autoUpdateFilePath; this.AutoUpdaterStatus = Enum15.const_0; bool flag = false; try { if (File.Exists(autoUpdateFilePath)) { this.method_1(); } else { flag = true; } } catch (Exception ex) { ex.smethod_0(); flag = true; } if (flag) { this.LastCheckedForUpdate = DateTime.MinValue; this.UpdateStepOn = Enum111.const_0; } }
// Token: 0x06001175 RID: 4469 // RVA: 0x00010A29 File Offset: 0x0000EC29 public int method_1(Enum15 enum15_0) { if (this.class137_0 == null) { throw new GException0("No Deflate State!"); } return this.class137_0.method_12(enum15_0); }
internal static Class522 smethod_1(Enum15 requiredEdition) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); Attribute0 customAttribute = (Attribute0)executingAssembly.GetCustomAttributes(typeof(Attribute0), true)[0]; Class522 licenseInfo = new Class522(customAttribute.ProductName); Class809.smethod_2(licenseInfo, executingAssembly, customAttribute, requiredEdition); return(licenseInfo); }
private static RegFileInfo smethod_6(string string_0, Enum15 enum15_0) { RegFileInfo info = null; List <RegFileInfo> list = new List <RegFileInfo>(); List <string> list2 = smethod_1(FilterTaxCode); string verFlag = null; foreach (string str2 in list2) { RegFileInfo item = smethod_3(str2, taxCard_0); if ((item != null) && item.CheckedOk) { if (enum15_0 == ((Enum15)0)) { verFlag = item.VerFlag; } else if (enum15_0 == ((Enum15)1)) { verFlag = item.SoftFlag; } if (verFlag == string_0) { list.Add(item); } } } DateTime minValue = DateTime.MinValue; foreach (RegFileInfo info3 in list) { if (info3.FileModifyDate > minValue) { info = info3; minValue = info3.FileModifyDate; } } return(info); }
private static Class522 smethod_2( Class522 licenseInfo, Assembly assembly, Attribute0 productAttribute, Enum15 requiredEdition) { string xmlString = "<RSAKeyValue><Modulus>5tmp6YoXLdKEUTC0PvXQmgM9V+jtb2LBV/6nCO8l/4StX9muFDQRSrtJAEH8sXcHu5Fgr7Y00oddMMSwfjXgiAG0b4WMhfF3s2/Cpw9MqFJXVnoeMr8dKHCr2Dp6cue6yCb3rIwjbRCYavYCHFmywBhrfztx6m125PD6TuDYDN0=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"; RSACryptoServiceProvider cryptoServiceProvider = new RSACryptoServiceProvider(new CspParameters() { Flags = CspProviderFlags.UseMachineKeyStore }); cryptoServiceProvider.FromXmlString(xmlString); XmlDocument license = License.GetLicense(); SignedXml signedXml = new SignedXml(license); try { XmlNode xmlNode = license.GetElementsByTagName("Signature", "http://www.w3.org/2000/09/xmldsig#")[0]; signedXml.LoadXml((XmlElement)xmlNode); } catch (Exception ex) { licenseInfo.Message = "Error: no signature found."; licenseInfo.Exception = ex; return(licenseInfo); } if (signedXml.CheckSignature((AsymmetricAlgorithm)cryptoServiceProvider)) { XmlNodeList elementsByTagName1 = license.GetElementsByTagName("product"); XmlNode xmlNode1 = (XmlNode)null; foreach (XmlNode xmlNode2 in elementsByTagName1) { if (xmlNode2.Attributes["name"].Value == licenseInfo.ProductName) { xmlNode1 = xmlNode2; break; } } if (xmlNode1 == null) { licenseInfo.Message = "Wrong license."; return(licenseInfo); } Version version1 = assembly.GetName().Version; string[] strArray = xmlNode1.Attributes["version"].Value.Split('.'); Version version2 = new Version(strArray[0] == "*" ? (int)byte.MaxValue : int.Parse(strArray[0], (IFormatProvider)CultureInfo.InvariantCulture), strArray[1] == "*" ? (int)byte.MaxValue : int.Parse(strArray[1], (IFormatProvider)CultureInfo.InvariantCulture), strArray[2] == "*" ? (int)byte.MaxValue : int.Parse(strArray[2], (IFormatProvider)CultureInfo.InvariantCulture)); if (version1.CompareTo(version2) > 0) { licenseInfo.Message = "Wrong license version."; return(licenseInfo); } Enum15 enum15 = Enum15.const_0; switch (xmlNode1.Attributes["edition"].Value) { case "basic": enum15 = Enum15.const_1; break; case "standard": enum15 = Enum15.const_2; break; case "professional": enum15 = Enum15.const_3; break; } if (requiredEdition > enum15) { licenseInfo.Message = "Insufficient license edition."; return(licenseInfo); } if (DateTime.Parse(xmlNode1.Attributes["expirationDate"].Value, (IFormatProvider)CultureInfo.InvariantCulture) < productAttribute.ReleaseDate) { licenseInfo.Message = "The license is not valid for this release of " + licenseInfo.ProductName + ", renew your license."; return(licenseInfo); } string str = xmlNode1.Attributes["type"].Value; if (str == "runtime") { licenseInfo.LicensedEdition = enum15; XmlNodeList elementsByTagName2 = license.GetElementsByTagName("licensee"); licenseInfo.Licensee = elementsByTagName2[0].InnerText; return(licenseInfo); } if (str == "trial") { licenseInfo.IsTrial = true; DateTime firstUsedDate; DateTime lastUsedDate; if (Class809.smethod_4(productAttribute, out firstUsedDate, out lastUsedDate)) { DateTime t1 = firstUsedDate.AddDays(31.0); DateTime utcNow = DateTime.UtcNow; if (lastUsedDate.Ticks > utcNow.Ticks) { licenseInfo.Message = "Licence check error."; return(licenseInfo); } Class809.smethod_5(productAttribute, firstUsedDate, utcNow); if (DateTime.Compare(t1, utcNow) >= 0) { licenseInfo.TrialDaysLeft = Math.Max(0, t1.Subtract(utcNow).Days); licenseInfo.LicensedEdition = enum15; return(licenseInfo); } licenseInfo.Message = "Trial period of 30 days expired."; return(licenseInfo); } licenseInfo.TrialDaysLeft = 30; Class809.smethod_5(productAttribute, DateTime.UtcNow, DateTime.UtcNow); licenseInfo.LicensedEdition = enum15; return(licenseInfo); } licenseInfo.Message = "Wrong license type."; return(licenseInfo); } licenseInfo.Message = "Invalid license."; return(licenseInfo); }
internal static void smethod_0(Enum15 edition) { }
// Token: 0x06001148 RID: 4424 // RVA: 0x0005DB4C File Offset: 0x0005BD4C internal int method_1(Enum15 enum15_0) { if (this.gclass1_0.byte_0 == null) { throw new GException0("InputBuffer is null. "); } int num = (enum15_0 == Enum15.const_4) ? -5 : 0; int num2 = -5; while (true) { switch (this.int_2) { case 0: if (this.gclass1_0.int_0 == 0) { return num2; } num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; if (((this.int_1 = (int)this.gclass1_0.byte_0[this.gclass1_0.int_2++]) & 15) != 8) { this.int_2 = 13; this.gclass1_0.string_0 = string.Format("unknown compression method (0x{0:X2})", this.int_1); this.int_0 = 5; continue; } if ((this.int_1 >> 4) + 8 > this.int_3) { this.int_2 = 13; this.gclass1_0.string_0 = string.Format("invalid window size ({0})", (this.int_1 >> 4) + 8); this.int_0 = 5; continue; } this.int_2 = 1; goto IL_2F3; case 1: goto IL_2F3; case 2: goto IL_4FA; case 3: goto IL_57A; case 4: goto IL_605; case 5: goto IL_68F; case 6: goto IL_724; case 7: num2 = this.class139_0.method_1(num2); if (num2 == -3) { this.int_2 = 13; this.int_0 = 0; continue; } if (num2 == 0) { num2 = num; } if (num2 != 1) { return num2; } num2 = num; this.class139_0.Reset(this.long_1); if (!this.method_2()) { this.int_2 = 12; continue; } this.int_2 = 8; goto IL_204; case 8: goto IL_204; case 9: goto IL_172; case 10: goto IL_E1; case 11: goto IL_2C; case 12: return 1; case 13: goto IL_75A; } goto Block_18; IL_2C: if (this.gclass1_0.int_0 == 0) { return num2; } num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 += (long)((ulong)this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255uL); if ((int)this.long_1[0] != (int)this.long_0) { this.int_2 = 13; this.gclass1_0.string_0 = "incorrect data check"; this.int_0 = 5; continue; } goto IL_750; IL_E1: if (this.gclass1_0.int_0 != 0) { num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 += ((long)((long)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255) << 8) & 65280L); this.int_2 = 11; goto IL_2C; } return num2; IL_172: if (this.gclass1_0.int_0 != 0) { num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 += ((long)((long)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255) << 16) & 16711680L); this.int_2 = 10; goto IL_E1; } return num2; IL_204: if (this.gclass1_0.int_0 != 0) { num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 = (long)((int)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255) << 24 & -16777216); this.int_2 = 9; goto IL_172; } return num2; IL_2F3: if (this.gclass1_0.int_0 == 0) { return num2; } num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; int num3 = (int)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255); if (((this.int_1 << 8) + num3) % 31 != 0) { this.int_2 = 13; this.gclass1_0.string_0 = "incorrect header check"; this.int_0 = 5; } else { if ((num3 & 32) != 0) { goto IL_4F3; } this.int_2 = 7; } } return num2; Block_18: throw new GException0("Stream error."); IL_4F3: this.int_2 = 2; IL_4FA: if (this.gclass1_0.int_0 == 0) { return num2; } num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 = (long)((int)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255) << 24 & -16777216); this.int_2 = 3; IL_57A: if (this.gclass1_0.int_0 == 0) { return num2; } num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 += ((long)((long)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255) << 16) & 16711680L); this.int_2 = 4; IL_605: if (this.gclass1_0.int_0 == 0) { return num2; } num2 = num; this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 += ((long)((long)(this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255) << 8) & 65280L); this.int_2 = 5; IL_68F: if (this.gclass1_0.int_0 == 0) { return num2; } this.gclass1_0.int_0--; this.gclass1_0.long_1 += 1L; this.long_0 += (long)((ulong)this.gclass1_0.byte_0[this.gclass1_0.int_2++] & 255uL); this.gclass1_0.long_0 = this.long_0; this.int_2 = 6; return 2; IL_724: this.int_2 = 13; this.gclass1_0.string_0 = "need dictionary"; this.int_0 = 0; return -2; IL_750: this.int_2 = 12; return 1; IL_75A: throw new GException0(string.Format("Bad state ({0})", this.gclass1_0.string_0)); }
// Token: 0x06001106 RID: 4358 // RVA: 0x00059CA4 File Offset: 0x00057EA4 internal int method_12(Enum15 enum15_0) { if (this.gclass1_0.byte_1 != null && (this.gclass1_0.byte_0 != null || this.gclass1_0.int_0 == 0)) { if (this.int_29 != 666 || enum15_0 == Enum15.const_4) { if (this.gclass1_0.int_1 == 0) { this.gclass1_0.string_0 = Class137.string_0[7]; throw new GException0("OutputBuffer is full (AvailableBytesOut == 0)"); } int num = this.int_14; this.int_14 = (int)enum15_0; if (this.int_29 == 42) { int num2 = 8 + (this.int_31 - 8 << 4) << 8; int num3 = (this.enum11_0 - Enum11.const_1 & 255) >> 1; if (num3 > 3) { num3 = 3; } num2 |= num3 << 6; if (this.int_30 != 0) { num2 |= 32; } num2 += 31 - num2 % 31; this.int_29 = 113; this.method_23(num2); if (this.int_30 != 0) { this.method_23((int)Class143.smethod_1(this.gclass1_0.long_0, 16)); this.method_23((int)(this.gclass1_0.long_0 & 65535L)); } this.gclass1_0.long_0 = Class136.smethod_0(0L, null, 0, 0); } if (this.int_25 != 0) { this.gclass1_0.method_4(); if (this.gclass1_0.int_1 == 0) { this.int_14 = -1; return 0; } } else if (this.gclass1_0.int_0 == 0 && enum15_0 <= (Enum15)num && enum15_0 != Enum15.const_4) { return 0; } if (this.int_29 == 666 && this.gclass1_0.int_0 != 0) { this.gclass1_0.string_0 = Class137.string_0[7]; throw new GException0("status == FINISH_STATE && _codec.AvailableBytesIn != 0"); } if (this.gclass1_0.int_0 != 0 || this.int_17 != 0 || (enum15_0 != Enum15.const_0 && this.int_29 != 666)) { Enum10 enum = this.delegate8_0(enum15_0);