static uint?ReadVersion(MemoryReader reader, byte?[] pattern, int offset) { var off = reader.ReadOffset(offset + pattern.TakeWhile(x => x != null).Count()); return(reader.IsValid(off) ? (uint?)reader.ReadUInt32(off) : null); }