7.1 Disassembly Challenge

Let's translate the following code into its high-level equivalent. Use the techniques and the concepts that you have learned so far to solve this challenge:

 mov dword ptr [ebp-8], 1
mov dword ptr [ebp-4], 0

loc_401014:
cmp dword ptr [ebp-4], 4
jge short loc_40102E
mov eax, [ebp-8]
add eax, [ebp-4]
mov [ebp-8], eax
mov ecx, [ebp-4]
add ecx, 1
mov [ebp-4], ecx
jmp short loc_401014

loc_40102E: