Function at 0x4042d0
Capabilities:
Check os version
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [0x5023a4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x32c], ecx
je 0x4045e7
call fcn.004031c0
test eax, eax
je 0x404665
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x350], eax
call fcn.004031c0
test eax, eax
je 0x404665
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x34c], eax
call fcn.004031c0
test eax, eax
je 0x404665
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x348], eax
call fcn.004031c0
test eax, eax
je 0x404665
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x344], eax
test esi, esi
jne 0x404378
xor ecx, ecx
jmp 0x40438f
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404380
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x350]
call fcn.00403760
push 6
push str._start
lea ecx, [ebp - 0x348]
call fcn.00403760
push 0
push 0x4d9ea8
lea ecx, [ebp - 0x344]
call fcn.00403760
lea eax, [ebp - 0x328]
mov dword [ebp - 0x340], 0x28
push eax
mov dword [ebp - 0x328], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
or edi, 0xffffffff
cmp dword [ebp - 0x324], 6
jb 0x40440a
mov ecx, dword [ebp - 0x32c]
lea eax, [ebp - 0x350]
push eax
push ebx
call fcn.004047b0
mov esi, eax
test esi, esi
jne 0x404573
sub esp, 0xc
mov dword [ebp - 0x338], 0
lea ecx, [ebp - 0x338]
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
call fcn.00404210
test eax, eax
jne 0x404560
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x404665
mov eax, dword [ecx]
call dword [eax + 0xc]
push dword [ebp - 0x348]
add eax, 0x10
push dword [ebp - 0x350]
mov dword [ebp - 0x32c], eax
lea eax, [ebp - 0x32c]
push str.__s___s
push eax
call fcn.004040c0
push 0x208
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0049b560
add esp, 0x1c
mov dword [ebp - 0x33c], 0x208
lea eax, [ebp - 0x33c]
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x354]
push eax
push 0
push ebx
push dword [ebp - 0x338]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4044e2
mov eax, dword [ebp - 0x354]
cmp eax, 1
je 0x4044d0
cmp eax, 2
jne 0x4044e2
cmp dword [ebp - 0x33c], 0
jne 0x4044e2
xor eax, eax
mov word [ebp - 0x210], ax
mov esi, dword [ebp - 0x32c]
lea eax, [ebp - 0x210]
push eax
push esi
call fcn.004a4268
add esp, 8
test eax, eax
je 0x404531
test esi, esi
je 0x404531
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404505
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push ebx
mov ebx, dword [ebp - 0x338]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x404537
mov ebx, dword [ebp - 0x338]
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40454e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x404559
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 1
jmp 0x404573
mov eax, dword [ebp - 0x338]
test eax, eax
je 0x404571
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
mov edx, dword [ebp - 0x344]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404590
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x348]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4045ad
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x34c]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4045ca
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x350]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x404650
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x404650
push ebx
call fcn.00405d30
sub esp, 0xc
mov dword [ebp - 0x338], 0
lea ecx, [ebp - 0x338]
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
call fcn.00404210
test eax, eax
jne 0x40463d
mov esi, dword [ebp - 0x338]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test esi, esi
je 0x404636
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 1
jmp 0x404650
mov eax, dword [ebp - 0x338]
test eax, eax
je 0x40464e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049765c
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00402f10
int3