- There's no reason to use a switch statement to perform left-shift.
- Deciding that insn->sibIndex is SIB_INDEX_NONE does not require any check beyond the fully decoded bits being equal to 0x4. The expression insn->sibIndex == SIB_INDEX_sib could not have been true unless index were 0x4, because SIB_INDEX_sib is merely the range base (SIB_INDEX_EAX) plus 4. Respectively SIB_INDEX_sib64.
Moreover, the enumerated values "SIB_INDEX_sib" and "SIB_INDEX_sib64" are misnomers, best avoided, because really they mean "no index". But the names are auto-generated, and make sense for EA_BASE_sib, EA_BASE_sib64 which mean what they say.