I'm trying to understand some disassembled code, but I can't understand what's going on here. Can you explain what it does?
sub ecx, edi
sar edx, 1
mov eax, 2AAAAAABh
imul ecx
mov eax, edx
shr eax, 31
add eax, edx
test eax, eax
jle ...
ecx, edx and edi contains some kind of input values for this code.
I can only assume that the pair of last two lines may work as something like if(eax <= 0) goto ..., but I'm not sure.