Am I correct to assume that call to 18222E214 will be never executed?
sub rsp, 28h
mov byte ptr [rsp+27h], 0
mov al, [rsp+27h]
test al, 1
jz short loc_182C60C26
call loc_18222E214
>Solution :
It shouldn’t be. You’re loading the value 0 into the al register. test al,1 sets the Sign, Zero, and Parity flags as though an and instruction had been executed. If you do an and al,1 when al contains 0, the Zero flag is set.
In your example, the Zero flag will be set by the test instruction, so the short jump will be taken and the call instruction following the jz will not be executed.