Hace mucho que no posteo nada por aca.
Perdon por ponerlo en ingles pero no tengo ganas de escribir esto de vuelta.
A friend of mine was doing some buffer parsing and he was needing a way to find certain bytes in a byte array (an Instr with bytes) so the first answer was, use two loops, one to increase the index in the buffer and the second to compare but, this was kinda crappy so after using the neurons for a while I came out with this solution. Its notably faster and it uses less iterations than a normal 2 loop seach , about [match position / match bytes len] match position is the index in the buffer where the first match is located.
This function does not make use of any API, meaning it can be modded to speed it up but, I wanted to keep it simple to try the concept.