[EXERCISE 0006] Very simple one

This one is a very simple one and for the beginners. Translate the following code to C++ or pseudocode. Do this line by line adding explanation what is going on here!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.text:00401000 _main proc near
.text:00401000
.text:00401000 var_8= dword ptr -8
.text:00401000 var_4= dword ptr -4
.text:00401000 argc= dword ptr  8
.text:00401000 argv= dword ptr  0Ch
.text:00401000 envp= dword ptr  10h
.text:00401000
.text:00401000 push    ebp
.text:00401001 mov     ebp, esp
.text:00401003 sub     esp, 8
.text:00401006 mov     [ebp+var_4], 5
.text:0040100D mov     [ebp+var_8], 6
.text:00401014 mov     eax, [ebp+var_8]
.text:00401017 mov     [ebp+var_4], eax
.text:0040101A xor     eax, eax
.text:0040101C mov     esp, ebp
.text:0040101E pop     ebp
.text:0040101F retn
.text:0040101F _main