Unfortunately for me this was all done years ago and I no longer remember the ins and outs of the MIDI file format. I would expect that any byte could appear in a SYSEX event, for example, as this is a manufacturer specific block.
There is a MIDI standard that defines this so maybe it can offer some info on this.
Some introduction material here: Standard MIDI file format, updated
Standards document here: Standard MIDI Files (SMF) Specification
Someone else may know more.