public GameSettingsChecker(zzPakNode2 class318_0) { if (!class318_0.method_6(GameSettingsChecker._hashPath)) { return; } zzGenericNode1 @class = new zzGenericNode1(GameSettingsChecker._hashPath, KeyGenerator.smethod_8(class318_0.method_12(GameSettingsChecker._hashPath), "MaC39SubInfo1245")); this.version = new Version(@class.method_5<UnicodeRootNode>(new UnicodeRootNode("version")).method_7()); float[] array = @class.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode("date")).method_7().method_7<float>(); this.date = new DateTime((int)array[0], (int)array[1], (int)array[2]); this.unkBuffer = @class.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode("hash")).method_7().method_7<int>(); class318_0.method_7(GameSettingsChecker._hashPath); using (Stream26 stream = class318_0.method_17()) { stream.Position = 0L; // Ignore checks for external tools modifying game settings because we're not children who will dictate how people can play their game // Possibly turn this on later softly for warning the player of possible data integrity issues // this._GameSettingsUntampered = Class244.smethod_53<int>(Class244.smethod_21(Class244.smethod_43(stream.stream_0)), this.int_0); this._GameSettingsUntampered = true; } GC.Collect(); this._AssemblyVersionMatches = (Assembly.GetExecutingAssembly().GetName().Version.CompareTo(this.version) == 0); this._LoadedSuccessfully = true; if (!this._AssemblyVersionMatches) { MessageBox.Show("The game settings were created under a different version."); } if (!this._GameSettingsUntampered) { MessageBox.Show("The game settings were modified by an external tool!"); } }
public Class309(string string_0, zzGenericNode1 class308_0) : this(string_0) { foreach (AbstractTreeNode1 node in class308_0.Nodes) { base.Nodes.Add(node); } }
public void method_0() { byte[] byte_; ZIPManager.smethod_3(this.saveLocation, out byte_, "songs.info", "SGH9ZIP2PASS4MXKR"); zzGenericNode1 @class = new zzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR")); foreach (StructurePointerNode class302_ in @class.Nodes) { GH3Song gH3Song = new GH3Song(class302_); gH3Song.editable = true; this.gh3SongList.method_0(gH3Song, this.string_0 != null); } ZIPManager.smethod_3(this.saveLocation, out byte_, "setlist.info", "SGH9ZIP2PASS4MXKR"); this.setlistToExport.method_1(new GH3Setlist((StructureHeaderNode)new zzGenericNode1("setlist", KeyGenerator.smethod_8(byte_, "SET4AES4KEY9MXKR")).Nodes[0], this.gh3SongList)); if (this.string_0 != null) { List<string> list = new List<string>(); List<string> list2 = new List<string>(); foreach (GH3Tier current in this.setlistToExport.tiers) { foreach (GH3Song current2 in current.songs) { if (current2.editable) { list.Add(current2.name + "_song.pak.xen"); list2.Add(this.string_0 + "songs\\" + current2.name + "_song.pak.xen"); list.Add(current2.name + ".dat.xen"); list2.Add(this.string_0 + "music\\" + current2.name + ".dat.xen"); list.Add(current2.name + ".fsb.xen"); list2.Add(this.string_0 + "music\\" + current2.name + ".fsb.xen"); } } } ZIPManager.smethod_11(this.saveLocation, list2, list, "SGH9ZIP2PASS4MXKR"); } }
public void imethod_17(byte[] byte_1) { Stream26 stream26_ = new Stream26(byte_1); zzGenericNode1 @class; if (base.Parent != null && base.Parent is zzPakNode1 && !(base.Parent as zzPakNode1).bool_0) { TreeNode treeNode = this; int level = treeNode.Level; while (level-- != 0) { treeNode = treeNode.Parent; } if (treeNode is zzPakNode2 && (treeNode as zzPakNode2).class318_0 != null) { string string_ = this.imethod_9().Contains(".qb") ? this.imethod_9().Replace(".qb", ".qs") : (this.imethod_9() + ".qs"); if ((treeNode as zzPakNode2).class318_0.method_6(string_)) { @class = new zzGenericNode1("TempFile", stream26_, (treeNode as zzPakNode2).class318_0.method_9(string_).dictionary_0); } else { @class = new zzGenericNode1("TempFile", stream26_); } } else { @class = new zzGenericNode1("TempFile", stream26_); } } else { @class = new zzGenericNode1("TempFile", stream26_); } base.Nodes.Clear(); foreach (AbstractTreeNode1 node in @class.Nodes) { base.Nodes.Add(node); } bool flag; this.vmethod_9(flag = @class.vmethod_8()); if (flag) { this.vmethod_11(@class.vmethod_10()); } this.bool_1 = @class.vmethod_7(); this.bool_3 = true; }
public static void SignHash(zzPakNode2 pakNode) { if (pakNode.method_6(GameSettingsChecker._hashPath)) { pakNode.method_7(GameSettingsChecker._hashPath); } zzGenericNode1 @class = new zzGenericNode1(); @class.method_3(new UnicodeRootNode("version", GameSettingsChecker._hashPath, Assembly.GetExecutingAssembly().GetName().Version.ToString())); using (Stream26 stream = pakNode.method_17()) { stream.Position = 0L; @class.method_3(new ArrayPointerRootNode("hash", GameSettingsChecker._hashPath, new IntegerArrayNode(KeyGenerator.smethod_21(KeyGenerator.HashStream(stream._stream))))); } GC.Collect(); DateTime now = DateTime.Now; @class.method_3(new ArrayPointerRootNode("date", GameSettingsChecker._hashPath, new FloatArrayNode(new float[] { (float)now.Year, (float)now.Month, (float)now.Day }))); pakNode.method_1<zzCocoaNode12>(GameSettingsChecker._hashPath, new zzCocoaNode12(GameSettingsChecker._hashPath, KeyGenerator.smethod_2(@class.method_8(), "MaC39SubInfo1245"))); }
public zzGenericNode1 method_4(string string_0) { zzGenericNode1 @class = new zzGenericNode1(); int int_ = QbSongClass1.smethod_9("songs\\" + string_0 + ".mid.qb"); string[] array = new string[] { "", "rhythm_", "guitarcoop_", "rhythmcoop_", "aux_" }; for (int i = 0; i < array.Length; i++) { string str = array[i]; string[] array2 = new string[] { "easy", "medium", "hard", "expert" }; for (int j = 0; j < array2.Length; j++) { string str2 = array2[j]; string text = str + str2; if (this.noteList.ContainsKey(text)) { this.method_5(int_, string_0 + "_song_" + text, @class, this.noteList[text]); } else { this.method_11(int_, string_0 + "_song_" + text, @class); } if (this.spList.ContainsKey(text)) { this.method_6(int_, string_0 + "_" + text + "_star", @class, this.spList[text]); } else { this.method_11(int_, string_0 + "_" + text + "_star", @class); } if (this.battleNoteList.ContainsKey(text)) { this.method_6(int_, string_0 + "_" + text + "_starbattlemode", @class, this.battleNoteList[text]); } else { this.method_11(int_, string_0 + "_" + text + "_starbattlemode", @class); } } } this.method_7(int_, string_0 + "_faceoffp1", @class, this.class228_2); this.method_7(int_, string_0 + "_faceoffp2", @class, this.class228_3); this.method_7(int_, string_0 + "_bossbattlep1", @class, this.bpmList); this.method_7(int_, string_0 + "_bossbattlep2", @class, this.class228_5); this.method_8(int_, string_0 + "_timesig", @class); this.method_9(int_, string_0 + "_fretbars", @class); this.method_10(int_, string_0 + "_markers", @class); this.method_11(int_, string_0 + "_scripts_notes", @class); this.method_11(int_, string_0 + "_anim_notes", @class); this.method_11(int_, string_0 + "_triggers_notes", @class); this.method_11(int_, string_0 + "_cameras_notes", @class); this.method_11(int_, string_0 + "_lightshow_notes", @class); this.method_11(int_, string_0 + "_crowd_notes", @class); this.method_11(int_, string_0 + "_drums_notes", @class); this.method_11(int_, string_0 + "_performance_notes", @class); this.method_11(int_, string_0 + "_scripts", @class); this.method_11(int_, string_0 + "_anim", @class); this.method_11(int_, string_0 + "_triggers", @class); this.method_11(int_, string_0 + "_cameras", @class); this.method_11(int_, string_0 + "_lightshow", @class); this.method_11(int_, string_0 + "_crowd", @class); this.method_11(int_, string_0 + "_drums", @class); this.method_11(int_, string_0 + "_performance", @class); return @class; }
public QBCParser(string string_0, zzGenericNode1 class308_0, zzGenericNode1 class308_1, zzGenericNode1 class308_2) { string[] array = new string[] { "Easy", "Medium", "Hard", "Expert" }; string[] array2 = new string[] { "Single", "Double" }; ArrayPointerRootNode @class; for (int i = 0; i < array2.Length; i++) { string a = array2[i]; string[] array3 = new string[] { "Guitar", "Rhythm" }; for (int j = 0; j < array3.Length; j++) { string text = array3[j]; string[] array4 = array; for (int k = 0; k < array4.Length; k++) { string text2 = array4[k]; string text3 = (text.ToLower() + ((a == "Double") ? "coop" : "") + "_" + text2.ToLower()).Replace("guitar_", ""); @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_song_" + text3)); if (@class != null && @class.method_7() is IntegerArrayNode) { Track<int, NotesAtOffset> class2 = new Track<int, NotesAtOffset>(); int[] array5 = @class.method_7().method_7<int>(); for (int l = 0; l < array5.Length; l += 3) { class2.Add(array5[l], new NotesAtOffset(array5[l + 2], array5[l + 1])); } this.noteList.Add(text3, class2); } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_" + text3 + "_star")); if (@class != null && @class.method_7() is ListArrayNode) { Track<int, int[]> class3 = new Track<int, int[]>(); foreach (IntegerArrayNode current in @class.method_7().method_8<IntegerArrayNode>()) { class3.Add(current[0], new int[] { current[1], current[2] }); } this.spList.Add(text3, class3); } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_" + text3 + "_starbattlemode")); if (@class != null && @class.method_7() is ListArrayNode) { Track<int, int[]> class4 = new Track<int, int[]>(); foreach (IntegerArrayNode current2 in @class.method_7().method_8<IntegerArrayNode>()) { class4.Add(current2[0], new int[] { current2[1], current2[2] }); } this.battleNoteList.Add(text3, class4); } } } } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_faceoffp1")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (IntegerArrayNode current3 in @class.method_7().method_8<IntegerArrayNode>()) { this.class228_2.Add(current3[0], current3[1]); } } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_faceoffp2")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (IntegerArrayNode current4 in @class.method_7().method_8<IntegerArrayNode>()) { this.class228_3.Add(current4[0], current4[1]); } } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_bossbattlep1")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (IntegerArrayNode current5 in @class.method_7().method_8<IntegerArrayNode>()) { this.bpmList.Add(current5[0], current5[1]); } } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_bossbattlep2")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (IntegerArrayNode current6 in @class.method_7().method_8<IntegerArrayNode>()) { this.class228_5.Add(current6[0], current6[1]); } } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_timesig")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (IntegerArrayNode current7 in @class.method_7().method_8<IntegerArrayNode>()) { this.tsList.Add(current7[0], new int[] { current7[1], current7[2] }); } } @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_fretbars")); if (@class != null && @class.method_7() is IntegerArrayNode) { this.class239_0 = new Class239<int>(@class.method_7().method_8<int>()); this.int_0 = (this.class239_0[1] - this.class239_0[0]) / 4; try { Dictionary<int, string> dictionary = new Dictionary<int, string>(); @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_markers")); if (class308_1 != null && @class != null && @class.method_7() is StructureArrayNode) { foreach (UnicodeRootNode class5 in class308_1.Nodes) { dictionary.Add(class5.int_0, class5.method_7()); } using (List<StructureHeaderNode>.Enumerator enumerator9 = @class.method_7().method_8<StructureHeaderNode>().GetEnumerator()) { while (enumerator9.MoveNext()) { StructureHeaderNode current8 = enumerator9.Current; this.class228_1.Add(((IntegerStructureNode)current8[0]).method_8(), dictionary[((FileTagStructureNode)current8[1]).method_9()]); } goto IL_7C2; } } if (@class != null && @class.method_7() is StructureArrayNode) { foreach (StructureHeaderNode current9 in @class.method_7().method_8<StructureHeaderNode>()) { this.class228_1.Add(((IntegerStructureNode)current9[0]).method_8(), ((UnicodeStructureNode)current9[1]).method_8()); } } IL_7C2:; } catch { } try { if (class308_2 != null) { this.gh3Song_0 = new GH3Song(class308_2.method_5<StructurePointerNode>(new StructurePointerNode(string_0))); } return; } catch { return; } } throw new Exception("Not a MID.QB!"); }
public QBCParser(string gh3SongName, zzGenericNode1 class308_0, zzGenericNode1 class308_1) : this(gh3SongName, class308_0, class308_1, null) { }
public QBCParser(string string_0, zzGenericNode1 class308_0) : this(string_0, class308_0, null) { }
private void method_9(int int_2, string string_0, zzGenericNode1 class308_0) { class308_0.method_3(new ArrayPointerRootNode(string_0, int_2, new IntegerArrayNode(this.class239_0))); }
private void method_8(int int_2, string string_0, zzGenericNode1 class308_0) { ListArrayNode @class = new ListArrayNode(); foreach (int current in this.tsList.Keys) { @class.method_3(new IntegerArrayNode(new int[] { current, this.tsList[current][0], this.tsList[current][1] })); } class308_0.method_3(new ArrayPointerRootNode(string_0, int_2, @class)); }
private void method_7(int int_2, string string_0, zzGenericNode1 class308_0, Track<int, int> class228_7) { if (class228_7.Keys.Count == 0) { this.method_11(int_2, string_0, class308_0); return; } ListArrayNode @class = new ListArrayNode(); foreach (int current in class228_7.Keys) { @class.method_3(new IntegerArrayNode(new int[] { current, class228_7[current] })); } class308_0.method_3(new ArrayPointerRootNode(string_0, int_2, @class)); }
private void method_5(int int_2, string string_0, zzGenericNode1 class308_0, Track<int, NotesAtOffset> class228_7) { if (class228_7.Keys.Count == 0) { this.method_11(int_2, string_0, class308_0); return; } List<int> list = new List<int>(); foreach (int current in class228_7.Keys) { list.Add(current); list.Add(class228_7[current].sustainLength); list.Add(class228_7[current].method_0()); } class308_0.method_3(new ArrayPointerRootNode(string_0, int_2, new IntegerArrayNode(list))); }
private void method_11(int int_2, string string_0, zzGenericNode1 class308_0) { class308_0.method_3(new ArrayPointerRootNode(string_0, int_2, this.class287_0)); }
private void method_10(int int_2, string string_0, zzGenericNode1 class308_0) { if (this.class228_1.Keys.Count == 0) { this.method_11(int_2, string_0, class308_0); return; } StructureArrayNode @class = new StructureArrayNode(); foreach (int current in this.class228_1.Keys) { @class.method_3(new StructureHeaderNode(new zzUnkNode294[] { new IntegerStructureNode("time", current), new UnicodeStructureNode("marker", this.class228_1[current]) })); } class308_0.method_3(new ArrayPointerRootNode(string_0, int_2, @class)); }