ndisasm: Prevent nil dereference on registerd decoding
ndisasm: Prevent nil dereference on registerd decoding

The sequence | 0x0F 0x1B 0x75 | get matched into
one of BNDx instruction which register value 6
which is of course out of possible BND registers
implemented in hardware at the moment leading to
nil dereference.

Instead lets use a macro in whichreg() helper
which would test the registers bounds and force
the caller to try another template if register is
out of range. In the case above it simply means
ndisasm instead of crashing outputs

 | 00000000  0F                db 0x0f
 | 00000001  1B                db 0x1b
 | 00000002  75                db 0x75

http://bugzilla.nasm.us/show_bug.cgi?id=3392289

Reported-by: Hanno Boeck <898dba66b7f38fdb797b262b137097fc973d6485@hboeck.de>
Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@gmail.com>

techkey/nasm,techkey/nasm,techkey/nasm,techkey/nasm,techkey/nasm