public static void Parse(Replay replay, byte[] buffer) { int headerSize = 4; if (replay.ReplayBuild >= 17326) // 1.2.0 { headerSize = 5; } var numAttributes = BitConverter.ToInt32(buffer, headerSize); var attributes = new ReplayAttribute[numAttributes]; int initialOffset = 4 + headerSize; for (int i = 0; i < numAttributes; i++) { attributes[i] = ReplayAttribute.Parse(buffer, initialOffset + (i * 13)); } var rae = new ReplayAttributeEvents { Attributes = attributes }; rae.ApplyAttributes(replay); }