I want to identify the jump statements due to switch/case in an IDA Pro disassembled binary. My ultimate goal is to read the jump table entries. I am also interested in function table/vtables. For switch/case, I see the jump statements as:
jmp ds:off_20B280CC[ebx*4]
jmp dword ptr ds:loc_6B2A825C[ecx*4]
[Q: Is it due to switch/jump?]
The operand types of these jumps, as I see from GetOperandValue(inst.ea, 0)
, are "Memory Reference" (type value 2). The jump statements like jb short loc_6B2A8154
has operand type "Immediate Near Address" (type value 7). However, the jump statements like jmp ds:__imp_memset
in the thunk functions to call imported functions also have the operand type "Memory Reference".
Is there any way I can distinguish between jump statements for switch/case and thunk functions?