function: mov eax,ebx
and ebx,1
shl ebx,2
jmp [ebx+Tab]
Tab: dd F1
dd F2
dd F3
dd F4
F4: sub eax,eax
F3: add eax,eax
F2: sub eax,eax
F1: ret
when ebx = Number–> should return Number in eax if is even otherwise 0
and ebx,1Bitwise AND operation, results in either 0 (in case ebx is even) or 1 (otherwise)shl ebx,2Shift left by 2 bits (which is equivalent of multiply by 4). ebx is now 0 or 4.jmp [ebx+Tab]Get adres from Tab + ebx and jump to it. Tab is array of four byte pointers, and ebx is either 0 or 4, so it points to first (F1) or second (F2) element.In case of even number jump to F1 is taken (which returns original value), otherwise jump to F2 is taken (where eax is cleared and zero is returned).