Matching MIDI messages

I have a problem with matching incomming SysEx messages to already pre-existing messages, the trick is i store midi messages with different values that have a changed byte/bit somewhere, they are described for example

f0 01 20 01 09 02 ls ms f7

witch means that bytes 7 and 8 store the LS and MS portions of the actual value. There are a lot of those messages and can have different variables in different positions. Now on input i get messages with ready values for ex

f0 01 20 01 09 02 00 04 f7

there is over 200 parameters for the Evolver, so i need to match 200 of such values to find the one that corresponds to the incoming value. I think of creating a hashed table, that stores pointers to my internal modulators and the keys are the memory blocks with FF placed in the variable position (ff can never appear in a midi incoming message). Then moving from the last byte to the first matching the incoming messages replacing each byte with FF. But i’d have to match a lot of variations of the incoming message if more then one byte is declared as ls/ms/xx/LS/MS or whatever.

Is there a good way to do this ?