public Class328 method_9(string string_2) { Interface12 @interface = this.method_10(string_2); if (@interface == null) { return(null); } if (@interface is Class328) { return((Class328)this.method_15 <Interface12>(@interface)); } Class328 @class = @interface.imethod_20 <Class328>(new Class328()); if (this.bool_4) { ((TreeNode)@interface).Remove(); base.method_1 <Class328>(string_2, @class); } else { this.list_0[this.list_0.IndexOf(@interface)] = @class; } return(this.method_15 <Class328>(@class)); }
private void method_19() { if (String1 != null) { Class3180 = new ZzPakNode2(String1, false); } using (var stream = new Stream26(File.Open(String0, FileMode.Open, FileAccess.Read, FileShare.Read))) { var num = 0; var num2 = (int)stream.Length; if (num2 == 0) { throw new Exception("Pak File is empty!"); } var int_ = stream.ReadInt(); stream.ReverseEndianness = (Bool2 = (!QbSongClass1.ContainsKey(int_) || !QbSongClass1.GetDictString(int_).StartsWith("."))); Bool3 = (stream.ReadInt() < stream.Length); var @enum = (Enum35)stream.ReadIntAt(28); Bool1 = ((@enum & Enum35.Flag3) == Enum35.Flag0); Int0 = stream.ReadIntAt(Bool1 ? 12 : 16, Bool2 && (@enum & Enum35.Flag4) == Enum35.Flag0 && (@enum & Enum35.Flag5) == Enum35.Flag0); while (true) { var enum2 = (Enum35)stream.ReadIntAt(num + 28, false); var bool_ = Bool2 && (enum2 & Enum35.Flag4) == Enum35.Flag0 && (enum2 & Enum35.Flag5) == Enum35.Flag0; var num3 = stream.ReadIntAt(num, bool_); if (QbSongClass1.ContainsKey(num3) && (QbSongClass1.GetDictString(num3).Equals(".last") || QbSongClass1.GetDictString(num3).Equals("last"))) { break; } var num4 = stream.ReadInt(bool_); if (!Bool3) { num4 = num4 - num2 + num; } if (num4 < 0) { num4 = 0; } var int2 = stream.ReadInt(bool_); var num5 = stream.ReadIntAt(num + (Bool1 ? 16 : 12), bool_); var num6 = stream.ReadIntAt(num + 20, bool_); var int3 = stream.ReadInt(bool_); stream.Position += 4L; if ((enum2 & Enum35.Flag3) != Enum35.Flag0) { Bool1 = false; var text = Stream260.ReadString(160); var num7 = text.IndexOf('\0'); if (num7 >= 0) { text = text.Substring(0, num7); } if (QbSongClass1.ContainsKey(num3) && !QbSongClass1.GetDictString(num3).EndsWith(".qb.ngc") && !QbSongClass1.GetDictString(num3).EndsWith(".qb.ps2")) { if (!Bool2) { if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".ps2", ""), true)) { QbSongClass1.AddKeyToDictionary(text); } else if (num5 == KeyGenerator.GetQbKey( text = text.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.AddKeyToDictionary(text); } } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".ngc", ""), true)) { QbSongClass1.AddKeyToDictionary(text); } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.AddKeyToDictionary(text); } } else { var text2 = "abcdefghijklmnopqrstuvwxyz"; for (var i = 0; i < text2.Length; i++) { var c = text2[i]; if (num5 == KeyGenerator.GetQbKey(c + text, true)) { QbSongClass1.AddKeyToDictionary(c + text); } } } if (num6 == KeyGenerator.GetQbKey(text = KeyGenerator.GetFileNameNoExt(text), true)) { QbSongClass1.AddKeyToDictionary(text); } } TreeNode treeNode; if (QbSongClass1.ContainsKey(num3) && QbSongClass1.GetDictString(num3).EndsWith("qb")) { treeNode = new Class309(num3, num4, int2, num5, num6, int3, enum2); } else if (QbSongClass1.ContainsKey(num3) && QbSongClass1.GetDictString(num3).Contains("qs")) { treeNode = new Class328(num3, num4, int2, num5, num6, int3, enum2); } else { treeNode = new ZzCocoaNode12(num3, num4, int2, num5, num6, int3, enum2); } if (QbSongClass1.ContainsKey(num5)) { method_1(QbSongClass1.GetDictString(num5), treeNode); } else { method_5(num5, (INterface12)treeNode); } num += (((enum2 & Enum35.Flag3) != Enum35.Flag0) ? 192 : 32); } } Stream260 = new Stream26(File.Open(String2, FileMode.Open, FileAccess.Read, FileShare.Read)); if (Stream260.Length == 0L) { throw new Exception("Pab File is empty!"); } }
private void method_19() { if (this.string_1 != null) { this.class318_0 = new zzPakNode2(this.string_1, false); } using (Stream26 stream = new Stream26(File.Open(this.string_0, FileMode.Open, FileAccess.Read, FileShare.Read))) { int num = 0; int num2 = (int)stream.Length; if (num2 == 0) { throw new Exception("Pak File is empty!"); } int int_ = stream.ReadInt(); stream._reverseEndianness = (this.bool_2 = (!QbSongClass1.smethod_3(int_) || !QbSongClass1.smethod_5(int_).StartsWith("."))); this.bool_3 = ((long)stream.ReadInt() < stream.Length); Enum35 @enum = (Enum35)stream.ReadIntAt(28); this.bool_1 = ((@enum & Enum35.flag_3) == Enum35.flag_0); this.int_0 = stream.ReadIntAt(this.bool_1 ? 12 : 16, this.bool_2 && (@enum & Enum35.flag_4) == Enum35.flag_0 && (@enum & Enum35.flag_5) == Enum35.flag_0); while (true) { Enum35 enum2 = (Enum35)stream.ReadIntAt(num + 28, false); bool bool_ = this.bool_2 && (enum2 & Enum35.flag_4) == Enum35.flag_0 && (enum2 & Enum35.flag_5) == Enum35.flag_0; int num3 = stream.ReadIntAt(num, bool_); if (QbSongClass1.smethod_3(num3) && (QbSongClass1.smethod_5(num3).Equals(".last") || QbSongClass1.smethod_5(num3).Equals("last"))) { break; } int num4 = stream.ReadInt(bool_); if (!this.bool_3) { num4 = num4 - num2 + num; } if (num4 < 0) { num4 = 0; } int int_2 = stream.ReadInt(bool_); int num5 = stream.ReadIntAt(num + (this.bool_1 ? 16 : 12), bool_); int num6 = stream.ReadIntAt(num + 20, bool_); int int_3 = stream.ReadInt(bool_); stream.Position += 4L; if ((enum2 & Enum35.flag_3) != Enum35.flag_0) { this.bool_1 = false; string text = this.stream26_0.ReadString(160); int num7 = text.IndexOf('\0'); if (num7 >= 0) { text = text.Substring(0, num7); } if (QbSongClass1.smethod_3(num3) && !QbSongClass1.smethod_5(num3).EndsWith(".qb.ngc") && !QbSongClass1.smethod_5(num3).EndsWith(".qb.ps2")) { if (!this.bool_2) { if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".ps2", ""), true)) { QbSongClass1.smethod_9(text); } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.smethod_9(text); } } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".ngc", ""), true)) { QbSongClass1.smethod_9(text); } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.smethod_9(text); } } else { string text2 = "abcdefghijklmnopqrstuvwxyz"; for (int i = 0; i < text2.Length; i++) { char c = text2[i]; if (num5 == KeyGenerator.GetQbKey(c + text, true)) { QbSongClass1.smethod_9(c + text); } } } if (num6 == KeyGenerator.GetQbKey(text = KeyGenerator.GetFileNameNoExt(text), true)) { QbSongClass1.smethod_9(text); } } TreeNode treeNode; if (QbSongClass1.smethod_3(num3) && QbSongClass1.smethod_5(num3).EndsWith("qb")) { treeNode = new Class309(num3, num4, int_2, num5, num6, int_3, enum2); } else if (QbSongClass1.smethod_3(num3) && QbSongClass1.smethod_5(num3).Contains("qs")) { treeNode = new Class328(num3, num4, int_2, num5, num6, int_3, enum2); } else { treeNode = new zzCocoaNode12(num3, num4, int_2, num5, num6, int_3, enum2); } if (QbSongClass1.smethod_3(num5)) { base.method_1 <TreeNode>(QbSongClass1.smethod_5(num5), treeNode); } else { base.method_5(num5, (Interface12)treeNode); } num += (((enum2 & Enum35.flag_3) != Enum35.flag_0) ? 192 : 32); } } this.stream26_0 = new Stream26(File.Open(this.string_2, FileMode.Open, FileAccess.Read, FileShare.Read)); if (this.stream26_0.Length == 0L) { throw new Exception("Pab File is empty!"); } }
private void method_4() { if (this.stream26_0 == null) { this.stream26_0 = new Stream26(File.Open(this.string_0, FileMode.Open, FileAccess.Read, FileShare.Read)); } this.class318_0 = ((this.string_1 != null) ? new zzPakNode2(this.string_1, false) : this); if (this.stream26_0.Length == 0L) { throw new Exception("Pak File is empty!"); } int num = 0; int num2 = this.stream26_0.ReadInt(); this.stream26_0._reverseEndianness = (this.bool_2 = (!QbSongClass1.smethod_3(num2) || !QbSongClass1.smethod_5(num2).StartsWith("."))); Enum35 @enum = (Enum35)this.stream26_0.ReadIntAt(28); this.bool_1 = ((@enum & Enum35.flag_3) == Enum35.flag_0); this.int_0 = this.stream26_0.ReadIntAt(this.bool_1 ? 12 : 16, this.bool_2 && (@enum & Enum35.flag_4) == Enum35.flag_0 && (@enum & Enum35.flag_5) == Enum35.flag_0); if (this.bool_4 && this.string_0 != null) { string text = KeyGenerator.GetFileName(this.string_0); if (text.Contains("_song")) { QbSongClass1.smethod_10(text.Substring(0, text.LastIndexOf("_song.pak")).ToLower()); } else if (!this.bool_1) { QbSongClass1.smethod_10(text.Substring(0, text.LastIndexOf(".pak")).ToLower()); } } while (true) { Enum35 enum2 = (Enum35)this.stream26_0.ReadIntAt(num + 28); bool flag = this.bool_2 && (enum2 & Enum35.flag_4) == Enum35.flag_0 && (enum2 & Enum35.flag_5) == Enum35.flag_0; int int_ = this.stream26_0.ReadIntAt(num, flag); if (QbSongClass1.smethod_3(int_)) { if (QbSongClass1.smethod_5(int_).Equals(".last")) { return; } if (QbSongClass1.smethod_5(int_).Equals("last")) { break; } } int int_2 = this.stream26_0.ReadInt(flag) + num; int int_3 = this.stream26_0.ReadInt(flag); int num3 = this.stream26_0.ReadIntAt(num + (this.bool_1 ? 16 : 12), flag); int num4 = this.stream26_0.ReadIntAt(num + 20, flag); int int_4 = this.stream26_0.ReadInt(flag); this.stream26_0.Position += 4L; if ((enum2 & Enum35.flag_3) != Enum35.flag_0) { this.bool_1 = false; string text2 = this.stream26_0.ReadString(160); int num5 = text2.IndexOf('\0'); if (num5 >= 0) { text2 = text2.Substring(0, num5); } if (QbSongClass1.smethod_3(int_) && !QbSongClass1.smethod_5(int_).EndsWith(".qb.ngc") && !QbSongClass1.smethod_5(int_).EndsWith(".qb.ps2")) { if (!this.bool_2) { if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".ps2", ""), true)) { QbSongClass1.smethod_9(text2); } else if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.smethod_9(text2); } } else if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".ngc", ""), true)) { QbSongClass1.smethod_9(text2); } else if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.smethod_9(text2); } } else { string text3 = "abcdefghijklmnopqrstuvwxyz"; for (int i = 0; i < text3.Length; i++) { char c = text3[i]; if (num3 == KeyGenerator.GetQbKey(c + text2, true)) { QbSongClass1.smethod_9(c + text2); } } } if (num4 == KeyGenerator.GetQbKey(text2 = KeyGenerator.GetFileNameNoExt(text2), true)) { QbSongClass1.smethod_9(text2); } } TreeNode treeNode; if (QbSongClass1.smethod_3(int_) && QbSongClass1.smethod_5(int_).Contains("qb")) { treeNode = new Class309(int_, int_2, int_3, num3, num4, int_4, enum2); } else if (QbSongClass1.smethod_3(int_) && QbSongClass1.smethod_5(int_).Contains("qs")) { treeNode = new Class328(int_, int_2, int_3, num3, num4, int_4, enum2); } else { treeNode = new zzCocoaNode12(int_, int_2, int_3, num3, num4, int_4, enum2); } if (this.bool_4) { if (QbSongClass1.smethod_3(num3)) { base.method_1 <TreeNode>(QbSongClass1.smethod_5(num3), treeNode); } else { this.method_5(num3, (Interface12)treeNode); } } else { this.list_0.Add((Interface12)treeNode); } num += (((enum2 & Enum35.flag_3) != Enum35.flag_0) ? 192 : 32); } }
private void method_4() { if (Stream260 == null) { Stream260 = new Stream26(File.Open(String0, FileMode.Open, FileAccess.Read, FileShare.Read)); } Class3180 = ((String1 != null) ? new ZzPakNode2(String1, false) : this); if (Stream260.Length == 0L) { throw new Exception("Pak File is empty!"); } var num = 0; var num2 = Stream260.ReadInt(); Stream260.ReverseEndianness = (Bool2 = (!QbSongClass1.ContainsKey(num2) || !QbSongClass1.GetDictString(num2).StartsWith("."))); var @enum = (Enum35)Stream260.ReadIntAt(28); Bool1 = ((@enum & Enum35.Flag3) == Enum35.Flag0); Int0 = Stream260.ReadIntAt(Bool1 ? 12 : 16, Bool2 && (@enum & Enum35.Flag4) == Enum35.Flag0 && (@enum & Enum35.Flag5) == Enum35.Flag0); if (Bool4 && String0 != null) { var text = KeyGenerator.GetFileName(String0); if (text.Contains("_song")) { QbSongClass1.GenerateSongTrackStuff(text.Substring(0, text.LastIndexOf("_song.pak")).ToLower()); } else if (!Bool1) { QbSongClass1.GenerateSongTrackStuff(text.Substring(0, text.LastIndexOf(".pak")).ToLower()); } } while (true) { var enum2 = (Enum35)Stream260.ReadIntAt(num + 28); var flag = Bool2 && (enum2 & Enum35.Flag4) == Enum35.Flag0 && (enum2 & Enum35.Flag5) == Enum35.Flag0; var int_ = Stream260.ReadIntAt(num, flag); if (QbSongClass1.ContainsKey(int_)) { if (QbSongClass1.GetDictString(int_).Equals(".last")) { return; } if (QbSongClass1.GetDictString(int_).Equals("last")) { break; } } var int2 = Stream260.ReadInt(flag) + num; var int3 = Stream260.ReadInt(flag); var num3 = Stream260.ReadIntAt(num + (Bool1 ? 16 : 12), flag); var num4 = Stream260.ReadIntAt(num + 20, flag); var int4 = Stream260.ReadInt(flag); Stream260.Position += 4L; if ((enum2 & Enum35.Flag3) != Enum35.Flag0) { Bool1 = false; var text2 = Stream260.ReadString(160); var num5 = text2.IndexOf('\0'); if (num5 >= 0) { text2 = text2.Substring(0, num5); } if (QbSongClass1.ContainsKey(int_) && !QbSongClass1.GetDictString(int_).EndsWith(".qb.ngc") && !QbSongClass1.GetDictString(int_).EndsWith(".qb.ps2")) { if (!Bool2) { if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".ps2", ""), true)) { QbSongClass1.AddKeyToDictionary(text2); } else if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.AddKeyToDictionary(text2); } } else if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".ngc", ""), true)) { QbSongClass1.AddKeyToDictionary(text2); } else if (num3 == KeyGenerator.GetQbKey(text2 = text2.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.AddKeyToDictionary(text2); } } else { var text3 = "abcdefghijklmnopqrstuvwxyz"; for (var i = 0; i < text3.Length; i++) { var c = text3[i]; if (num3 == KeyGenerator.GetQbKey(c + text2, true)) { QbSongClass1.AddKeyToDictionary(c + text2); } } } if (num4 == KeyGenerator.GetQbKey(text2 = KeyGenerator.GetFileNameNoExt(text2), true)) { QbSongClass1.AddKeyToDictionary(text2); } } TreeNode treeNode; if (QbSongClass1.ContainsKey(int_) && QbSongClass1.GetDictString(int_).Contains("qb")) { treeNode = new Class309(int_, int2, int3, num3, num4, int4, enum2); } else if (QbSongClass1.ContainsKey(int_) && QbSongClass1.GetDictString(int_).Contains("qs")) { treeNode = new Class328(int_, int2, int3, num3, num4, int4, enum2); } else { treeNode = new ZzCocoaNode12(int_, int2, int3, num3, num4, int4, enum2); } if (Bool4) { if (QbSongClass1.ContainsKey(num3)) { method_1(QbSongClass1.GetDictString(num3), treeNode); } else { method_5(num3, (INterface12)treeNode); } } else { List0.Add((INterface12)treeNode); } num += (((enum2 & Enum35.Flag3) != Enum35.Flag0) ? 192 : 32); } }
public abstract void Visit(Class328 c);
public override void Visit(Class328 c) { }
private void method_19() { if (this.string_1 != null) { this.class318_0 = new zzPakNode2(this.string_1, false); } using (Stream26 stream = new Stream26(File.Open(this.string_0, FileMode.Open, FileAccess.Read, FileShare.Read))) { int num = 0; int num2 = (int)stream.Length; if (num2 == 0) { throw new Exception("Pak File is empty!"); } int int_ = stream.ReadInt(); stream._reverseEndianness = (this.bool_2 = (!QbSongClass1.smethod_3(int_) || !QbSongClass1.smethod_5(int_).StartsWith("."))); this.bool_3 = ((long)stream.ReadInt() < stream.Length); Enum35 @enum = (Enum35)stream.ReadIntAt(28); this.bool_1 = ((@enum & Enum35.flag_3) == Enum35.flag_0); this.int_0 = stream.ReadIntAt(this.bool_1 ? 12 : 16, this.bool_2 && (@enum & Enum35.flag_4) == Enum35.flag_0 && (@enum & Enum35.flag_5) == Enum35.flag_0); while (true) { Enum35 enum2 = (Enum35)stream.ReadIntAt(num + 28, false); bool bool_ = this.bool_2 && (enum2 & Enum35.flag_4) == Enum35.flag_0 && (enum2 & Enum35.flag_5) == Enum35.flag_0; int num3 = stream.ReadIntAt(num, bool_); if (QbSongClass1.smethod_3(num3) && (QbSongClass1.smethod_5(num3).Equals(".last") || QbSongClass1.smethod_5(num3).Equals("last"))) { break; } int num4 = stream.ReadInt(bool_); if (!this.bool_3) { num4 = num4 - num2 + num; } if (num4 < 0) { num4 = 0; } int int_2 = stream.ReadInt(bool_); int num5 = stream.ReadIntAt(num + (this.bool_1 ? 16 : 12), bool_); int num6 = stream.ReadIntAt(num + 20, bool_); int int_3 = stream.ReadInt(bool_); stream.Position += 4L; if ((enum2 & Enum35.flag_3) != Enum35.flag_0) { this.bool_1 = false; string text = this.stream26_0.ReadString(160); int num7 = text.IndexOf('\0'); if (num7 >= 0) { text = text.Substring(0, num7); } if (QbSongClass1.smethod_3(num3) && !QbSongClass1.smethod_5(num3).EndsWith(".qb.ngc") && !QbSongClass1.smethod_5(num3).EndsWith(".qb.ps2")) { if (!this.bool_2) { if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".ps2", ""), true)) { QbSongClass1.smethod_9(text); } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.smethod_9(text); } } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".ngc", ""), true)) { QbSongClass1.smethod_9(text); } else if (num5 == KeyGenerator.GetQbKey(text = text.Replace("/", "\\").Replace(".qb", ""), true)) { QbSongClass1.smethod_9(text); } } else { string text2 = "abcdefghijklmnopqrstuvwxyz"; for (int i = 0; i < text2.Length; i++) { char c = text2[i]; if (num5 == KeyGenerator.GetQbKey(c + text, true)) { QbSongClass1.smethod_9(c + text); } } } if (num6 == KeyGenerator.GetQbKey(text = KeyGenerator.GetFileNameNoExt(text), true)) { QbSongClass1.smethod_9(text); } } TreeNode treeNode; if (QbSongClass1.smethod_3(num3) && QbSongClass1.smethod_5(num3).EndsWith("qb")) { treeNode = new Class309(num3, num4, int_2, num5, num6, int_3, enum2); } else if (QbSongClass1.smethod_3(num3) && QbSongClass1.smethod_5(num3).Contains("qs")) { treeNode = new Class328(num3, num4, int_2, num5, num6, int_3, enum2); } else { treeNode = new zzCocoaNode12(num3, num4, int_2, num5, num6, int_3, enum2); } if (QbSongClass1.smethod_3(num5)) { base.method_1<TreeNode>(QbSongClass1.smethod_5(num5), treeNode); } else { base.method_5(num5, (Interface12)treeNode); } num += (((enum2 & Enum35.flag_3) != Enum35.flag_0) ? 192 : 32); } } this.stream26_0 = new Stream26(File.Open(this.string_2, FileMode.Open, FileAccess.Read, FileShare.Read)); if (this.stream26_0.Length == 0L) { throw new Exception("Pab File is empty!"); } }