将下列汇编代码逆成等价的C代码。 func1: &nbs...
将下列汇编代码逆成等价的C代码。
func1:
push ebp
mov ebp, esp
sub esp, 14h
push esi
mov eax, 4
imul ecx, eax, 0
mov edx, [ebp+0Ch]
mov eax, [edx+ecx]
mov [ebp-8], eax
mov ecx, 4
shl ecx, 0
mov edx, [ebp+0Ch]
mov eax, [edx+ecx]
mov [ebp-0Ch], eax
mov [ebp-14h], 61C88647h
mov [ebp-4], 0C6EF3720h
mov [ebp-10h], 0
jmp short loc_401369
loc_401360:
mov ecx, [ebp-10h]
add ecx, 1
mov [ebp-10h], ecx
loc_401369:
mov edx, [ebp-10h]
cmp edx, [ebp+8]
jnb short loc_4013D3
mov eax, [ebp-8]
shl eax, 5
mov ecx, [ebp-8]
shr ecx, 4
xor eax, ecx
add eax, [ebp-8]
mov edx, [ebp-4]
shr edx, 0Bh
and edx, 3
mov ecx, [ebp+10h]
mov esi, [ebp-4]
add esi, [ecx+edx*4]
xor eax, esi
mov edx, [ebp-0Ch]
sub edx, eax
mov [ebp-0Ch], edx
mov eax, [ebp-4]
add eax, [ebp-14h]
mov [ebp-4], eax
mov ecx, [ebp-0Ch]
shl ecx, 5
mov edx, [ebp-0Ch]
shr edx, 4
xor ecx, edx
add ecx, [ebp-0Ch]
mov eax, [ebp-4]
and eax, 3
mov edx, [ebp+10h]
mov esi, [ebp-4]
add esi, [edx+eax*4]
xor ecx, esi
mov eax, [ebp-8]
sub eax, ecx
mov [ebp-8], eax
jmp short loc_401360
loc_4013D3:
mov ecx, 4
imul edx, ecx, 0
mov eax, [ebp+0Ch]
mov ecx, [ebp-8]
mov [eax+edx], ecx
mov edx, 4
shl edx, 0
mov eax, [ebp+0Ch]
mov ecx, [ebp-0Ch]
mov [eax+edx], ecx
pop esi
mov esp, ebp
pop ebp
retn
endp
func1(1,2,3)