Need help understanding what the values of the registers be after this code finish executing
mov dword ptr [ebp-4], 1
cmp dword ptr [ebp-4], 0
jnz loc_40101C
mov eax, [ebp-4]
xor eax, 2
mov [ebp-4], eax
jmp loc_401025
loc_40101C:
mov ecx, [ebp-4]
xor ecx, 3
mov [ebp-4], ecx
loc_401025:
mov ebx, [ebp-4]
xor ebx, 5
mov [ebp-4], ebx
From my current understanding, the code jumps to loc_40101C because the cmp instruction above did not return with a zero flag. So, instructions below jnz are ignored and will be skipped to loc_40101C.
Now at loc_40101C, the value 1 gets moved to ecx. ecx then gets XOR'd with 3 resulting in the value of 2. The code then finishes executing resulting in ecx having a value of 2.
My question is, would any value be assigned to eax and ebx after this code finishes executing?