public static long smethod_41(Enum0 enum0_0, DateTime dateTime_4, DateTime dateTime_5) { TimeSpan span; span = span = (TimeSpan)(dateTime_5 - dateTime_4); switch (enum0_0) { case ((Enum0)0): return((long)(dateTime_5.Year - dateTime_4.Year)); case ((Enum0)1): return((long)((dateTime_5.Month - dateTime_4.Month) + (12 * (dateTime_5.Year - dateTime_4.Year)))); case ((Enum0)2): return(smethod_42(span.TotalDays) / 7L); case ((Enum0)3): return(smethod_42(span.TotalDays)); case ((Enum0)4): return(smethod_42(span.TotalHours)); case ((Enum0)5): return(smethod_42(span.TotalMinutes)); } return(smethod_42(span.TotalSeconds)); }
public bReplayBuffer(List <ReplayFrame> list_1, Enum0 enum0_1, bScoreData bScoreData1, int int_1) { replayFrames = list_1; enum0_0 = enum0_1; BScoreData0 = bScoreData1; int_0 = int_1; }
// Token: 0x06000E16 RID: 3606 // RVA: 0x0000EA40 File Offset: 0x0000CC40 public Class13(List<Class14> list_1, Enum0 enum0_1, Struct13 struct13_1, int int_1) { this.list_0 = list_1; this.enum0_0 = enum0_1; this.struct13_0 = struct13_1; this.int_0 = int_1; }
// Token: 0x060011D2 RID: 4562 RVA: 0x00003DE0 File Offset: 0x00001FE0 public void PlaylistChange(object Playlist, Enum0 change) { if (this.delegate15_0 != null) { this.delegate15_0(Playlist, change); return; } }
// Token: 0x0600064F RID: 1615 RVA: 0x000061AB File Offset: 0x000043AB private static CipherMode smethod_1(Enum0 enum0_1) { if (enum0_1 == (Enum0)1) { return(CipherMode.CBC); } throw new InvalidOperationException("Cipher mode is not supported"); }
// Token: 0x060011D3 RID: 4563 RVA: 0x00003E04 File Offset: 0x00002004 public void CurrentPlaylistChange(Enum0 change) { if (this.delegate16_0 != null) { this.delegate16_0(change); return; } }
// Token: 0x06000647 RID: 1607 RVA: 0x0000613F File Offset: 0x0000433F public void method_1(Enum0 enum0_1) { if (this.enum0_0 == enum0_1) { return; } this.enum0_0 = enum0_1; this.bool_1 = true; }
internal static Class53 smethod_1(Enum0 requiredEdition) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); Attribute0 customAttribute = (Attribute0)executingAssembly.GetCustomAttributes(typeof(Attribute0), true)[0]; Class53 licenseInfo = new Class53(customAttribute.ProductName); Class123.smethod_2(licenseInfo, executingAssembly, customAttribute, requiredEdition); return(licenseInfo); }
static Class57() { int num2 = 0x55276e7c; int num3 = -437084894; class59_0 = new Class59(0x68b); int num4 = 2; StackTrace trace = new StackTrace(2, false); num4 = 0; StackFrame frame = trace.GetFrame(0); int num5 = 0; if (frame == null) { trace = new StackTrace(); num5 = 1; frame = trace.GetFrame(1); } int num = ~-~--~-~~-~((0x45dc2cf2 + num2) - num3) ^ ~--~-~~-~-~((0x5c7a7374 - num2) + num3); MethodBase method = frame?.GetMethod(); if (frame != null) { num ^= -~-~~--~~((0x5d93f35f ^ num2) ^ num3); } Type declaringType = method?.DeclaringType; if (declaringType == typeof(RuntimeMethodHandle)) { num ^= ((num2 + -1865731635) - num3) + num4; enum0_0 = ((Enum0)4) | enum0_0; } else if (declaringType == null) { if (smethod_4(trace, num5)) { num ^= -~~--~-~~((0x6f34adbb - num2) ^ num3) - num4; enum0_0 = ((Enum0)0x10) | enum0_0; } else { num ^= -~~-~--~~-~((num2 + -1865769490) - num3); enum0_0 = ((Enum0)1) | enum0_0; } } else { enum0_0 |= (Enum0)0x10; num ^= ~--~~-~-~((0x6f34adb7 - num2) ^ num3) - num4; } int_2 = num + int_2; }
internal static void smethod_0(Enum0 edition) { Class0 class0 = Class2.smethod_1(edition); if (class0.LicensedEdition < edition) { string str; if (class0.IsTrial) { str = "Trial period expired!"; } else { str = class0.ProductName + " " + (object)class0.LicensedEdition + " is not licensed."; } int num = (int)MessageBox.Show(class0.Message, str, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); throw new InternalException(str); } }
// Token: 0x06000E17 RID: 3607 // RVA: 0x0004DBA8 File Offset: 0x0004BDA8 public Class13(Class32 class32_0) { if (Class213.int_0 >= 18) { this.int_0 = class32_0.ReadInt32(); } this.list_0 = new List<Class14>(); int num = (int)class32_0.ReadUInt16(); for (int i = 0; i < num; i++) { this.list_0.Add(new Class14(class32_0)); } this.enum0_0 = (Enum0)class32_0.ReadByte(); try { this.struct13_0 = new Struct13(class32_0); } catch (Exception) { } }
public bReplayBuffer(SerializationReader reader) { if (Bancho.Protocol >= 18) { int_0 = reader.ReadInt32(); } replayFrames = new List <ReplayFrame>(); int num = reader.ReadUInt16(); for (var i = 0; i < num; i++) { replayFrames.Add(new ReplayFrame(reader)); } enum0_0 = (Enum0)reader.ReadByte(); try { BScoreData0 = new bScoreData(reader); } catch (Exception) { } }
private static void Add(Enum0 enum0_0, string string_0) { string format = string.Empty; if (enum0_0 == Enum0.CarNum) { format = _SqlReadSingleCarInfo + " where a.carnum='{0}'"; } else if (enum0_0 == Enum0.SimNum) { format = _SqlReadSingleCarInfo + " where a.simnum='{0}'"; } else if (enum0_0 == Enum0.CarId) { format = _SqlReadSingleCarInfo + " where a.carid={0}"; } format = string.Format(format, string_0); DataTable table = new SqlDataAccess().getDataBySql(format); if ((table != null) && (table.Rows.Count > 0)) { AddCarInfoToList(table); } }
private static Class0 smethod_2( Class0 licenseInfo, Assembly assembly, ns0.Attribute0 productAttribute, Enum0 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); } Enum0 enum0 = Enum0.const_0; switch (xmlNode1.Attributes["edition"].Value) { case "basic": enum0 = Enum0.const_1; break; case "standard": enum0 = Enum0.const_2; break; case "professional": enum0 = Enum0.const_3; break; } if (requiredEdition > enum0) { 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 = enum0; XmlNodeList elementsByTagName2 = license.GetElementsByTagName("licensee"); licenseInfo.Licensee = elementsByTagName2[0].InnerText; return(licenseInfo); } if (str == "trial") { licenseInfo.IsTrial = true; DateTime firstUsedDate; DateTime lastUsedDate; if (Class2.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); } Class2.smethod_5(productAttribute, firstUsedDate, utcNow); if (DateTime.Compare(t1, utcNow) >= 0) { licenseInfo.TrialDaysLeft = Math.Max(0, t1.Subtract(utcNow).Days); licenseInfo.LicensedEdition = enum0; return(licenseInfo); } licenseInfo.Message = "Trial period of 30 days expired."; return(licenseInfo); } licenseInfo.TrialDaysLeft = 30; Class2.smethod_5(productAttribute, DateTime.UtcNow, DateTime.UtcNow); licenseInfo.LicensedEdition = enum0; return(licenseInfo); } licenseInfo.Message = "Wrong license type."; return(licenseInfo); } licenseInfo.Message = "Invalid license."; return(licenseInfo); }
// Token: 0x06001468 RID: 5224 RVA: 0x00025340 File Offset: 0x00023540 public void CurrentPlaylistChange(Enum0 change) { Class69 class69_ = new Class69(change); this.class24_0.method_52(this.class24_0, class69_); }
// Token: 0x06001467 RID: 5223 RVA: 0x00025318 File Offset: 0x00023518 public void PlaylistChange(object Playlist, Enum0 change) { Class68 class68_ = new Class68(Playlist, change); this.class24_0.method_51(this.class24_0, class68_); }
// Token: 0x06001406 RID: 5126 RVA: 0x00004ED2 File Offset: 0x000030D2 public Class69(Enum0 enum0_1) { this.enum0_0 = enum0_1; }
// Token: 0x060031D0 RID: 12752 // RVA: 0x00146114 File Offset: 0x00144314 public static void smethod_0(Class13 class13_0) { Class858.bool_3 = false; Class858.enum0_1 = class13_0.enum0_0; switch (class13_0.enum0_0) { case Enum0.const_1: Class858.bool_0 = false; Class62.int_12 = class13_0.int_0; Class858.smethod_6(true); break; case Enum0.const_2: Class62.smethod_3(); break; case Enum0.const_3: Class802.bool_17 = true; break; case Enum0.const_4: Class802.bool_17 = true; break; case Enum0.const_5: if (!Class62.bool_11 && Class62.class62_0 != null) { Class62.class62_0.vmethod_16(); } break; case Enum0.const_6: if (Class62.bool_11 && Class62.class62_0 != null) { Class62.class62_0.vmethod_16(); } break; case Enum0.const_8: { Class861 class = Class809.smethod_28(class13_0.int_0, true);
private void method_0(Enum0 enum0_1) { this.enum0_0 = enum0_1; base.Invalidate(); }
// Token: 0x06001401 RID: 5121 RVA: 0x00004EBC File Offset: 0x000030BC public Class68(object object_1, Enum0 enum0_1) { this.object_0 = object_1; this.enum0_0 = enum0_1; }
internal static extern IntPtr GetCurrentObject(IntPtr hdc, Enum0 uObjectType);
public Enum0(KaitaiStream p__io, KaitaiStruct p__parent = null, Enum0 p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root ?? this; _read(); }
internal int Deflate(FlushType flushType_0) { if (this.zlibCodec_0.OutputBuffer != null && (this.zlibCodec_0.InputBuffer != null || this.zlibCodec_0.AvailableBytesIn == 0)) { if (this.int_19 != Class0.int_5 || flushType_0 == FlushType.Finish) { if (this.zlibCodec_0.AvailableBytesOut == 0) { this.zlibCodec_0.Message = Class0.string_0[7]; throw new ZlibException("OutputBuffer is full (AvailableBytesOut == 0)"); } int num = this.int_22; this.int_22 = (int)flushType_0; if (this.int_19 == Class0.int_3) { int num2 = Class0.int_6 + (this.int_24 - 8 << 4) << 8; int num3 = (this.compressionLevel_0 - CompressionLevel.BestSpeed & 255) >> 1; if (num3 > 3) { num3 = 3; } num2 |= num3 << 6; if (this.int_36 != 0) { num2 |= Class0.int_2; } num2 += 31 - num2 % 31; this.int_19 = Class0.int_4; this.byte_0[this.int_21++] = (byte)(num2 >> 8); this.byte_0[this.int_21++] = (byte)num2; if (this.int_36 != 0) { this.byte_0[this.int_21++] = (byte)((this.zlibCodec_0.uint_0 & 4278190080u) >> 24); this.byte_0[this.int_21++] = (byte)((this.zlibCodec_0.uint_0 & 16711680u) >> 16); this.byte_0[this.int_21++] = (byte)((this.zlibCodec_0.uint_0 & 65280u) >> 8); this.byte_0[this.int_21++] = (byte)(this.zlibCodec_0.uint_0 & 255u); } this.zlibCodec_0.uint_0 = Adler.Adler32(0u, null, 0, 0); } if (this.int_21 != 0) { this.zlibCodec_0.method_1(); if (this.zlibCodec_0.AvailableBytesOut == 0) { this.int_22 = -1; return(0); } } else if (this.zlibCodec_0.AvailableBytesIn == 0 && flushType_0 <= (FlushType)num && flushType_0 != FlushType.Finish) { return(0); } if (this.int_19 == Class0.int_5 && this.zlibCodec_0.AvailableBytesIn != 0) { this.zlibCodec_0.Message = Class0.string_0[7]; throw new ZlibException("status == FINISH_STATE && _codec.AvailableBytesIn != 0"); } if (this.zlibCodec_0.AvailableBytesIn != 0 || this.int_38 != 0 || (flushType_0 != FlushType.None && this.int_19 != Class0.int_5)) { Enum0 @enum = this.delegate0_0(flushType_0); if (@enum == Enum0.const_2 || @enum == Enum0.const_3) { this.int_19 = Class0.int_5; } if (@enum != Enum0.const_0) { if (@enum != Enum0.const_2) { if (@enum != Enum0.const_1) { goto IL_31F; } if (flushType_0 == FlushType.Partial) { this.method_11(); } else { this.method_20(0, 0, false); if (flushType_0 == FlushType.Full) { for (int i = 0; i < this.int_28; i++) { this.short_1[i] = 0; } } } this.zlibCodec_0.method_1(); if (this.zlibCodec_0.AvailableBytesOut == 0) { this.int_22 = -1; return(0); } goto IL_31F; } } if (this.zlibCodec_0.AvailableBytesOut == 0) { this.int_22 = -1; } return(0); } IL_31F: if (flushType_0 != FlushType.Finish) { return(0); } if (!this.WantRfc1950HeaderBytes || this.bool_0) { return(1); } this.byte_0[this.int_21++] = (byte)((this.zlibCodec_0.uint_0 & 4278190080u) >> 24); this.byte_0[this.int_21++] = (byte)((this.zlibCodec_0.uint_0 & 16711680u) >> 16); this.byte_0[this.int_21++] = (byte)((this.zlibCodec_0.uint_0 & 65280u) >> 8); this.byte_0[this.int_21++] = (byte)(this.zlibCodec_0.uint_0 & 255u); this.zlibCodec_0.method_1(); this.bool_0 = true; if (this.int_21 == 0) { return(1); } return(0); } } this.zlibCodec_0.Message = Class0.string_0[4]; throw new ZlibException(string.Format("Something is fishy. [{0}]", this.zlibCodec_0.Message)); }
public IntPtr method_1(Enum0 objectType) { return(Class61.GetCurrentObject(this.intptr_0, objectType)); }