This is a straight forward job. I do have a few questions about the type of solution you're looking for.
I am assuming that you want a solution for the x86, but there are a number of details that will need to be known to do a proper solution.
1. Do you want this for 16-bit mode, 32-bit mode, or 64-bit mode?
2. What about Windows vs Linux? (Windows and Linux have different interface for 64-bit assembly).
3. I can whip up a simple solution (small, but possibly very slow on large data sets), or I can whip up a more complicated solution that would on average be faster, but be larger and take more stack space.
4. Also, what assembler would you like this written for? TASM? MASM? GAS? NASM? Other?
By the way, strstr() can get away with two parameters as the strings are terminated with a NUL character (0 byte). When comparing two binaries, we can not rely on such a convention, and so four parameters are required (two are pointers, and two are sizes).