public static List <int> ReadVTBFMGX(BufferedStreamReader streamReader) { List <int> mgxIds = new List <int>(); //For now, just get these. The data inside is pretty accessible, but we have nothing to do with it int dataEnd = (int)streamReader.BaseStream().Length; //Seek past vtbf tag streamReader.Seek(0x10, SeekOrigin.Current); //VTBF tags while (streamReader.Position() < dataEnd) { var data = ReadVTBFTag(streamReader, out string tagType, out int ptrCount, out int entryCount); switch (tagType) { case "DOC ": break; case "MAGR": Debug.WriteLine((int)data[0][0xFF]); mgxIds.Add((int)data[0][0xFF]); break; default: //Data being null signfies that the last thing read wasn't a proper tag. This should mean the end of the VTBF stream if nothing else. if (data == null) { return(mgxIds); } throw new System.Exception($"Unexpected tag at {streamReader.Position().ToString("X")}! {tagType} Please report!"); } } return(mgxIds); }