Function at 0x407842
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push 0x1d4
mov eax, 0x464867
call fcn.0043587d
mov eax, dword [0x485c94]
xor edi, edi
cmp eax, edi
jne 0x407b2d
mov esi, 0x11c
push esi
lea eax, [ebp - 0x1cc]
push edi
push eax
xor ebx, ebx
mov dword [ebp - 0x1d0], 1
call fcn.004374f0
add esp, 0xc
lea eax, [ebp - 0x1cc]
mov dword [ebp - 0x1cc], esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetVersionExW]
push eax
call esi
cmp eax, edi
jne 0x4078b8
lea eax, [ebp - 0x1cc]
push eax
mov dword [ebp - 0x1cc], 0x114
call esi
test eax, eax
jne 0x4078d4
inc eax
jmp 0x407b2d
cmp byte [ebp - 0xb2], 1
jne 0x4078c8
xor ebx, ebx
jmp 0x40795f
cmp byte [ebp - 0xb2], 3
jmp 0x40795a
lea eax, [ebp - 0x1d4]
push eax
push 1
push edi
push str.SYSTEMCurrentControlSetControlProductOptions
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x1d8]
push eax
lea eax, [ebp - 0xb0]
push eax
push edi
push edi
push str.ProductType
push dword [ebp - 0x1d4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x1d4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
lea eax, [ebp - 0xb0]
push eax
push str.WINNT
call esi
test eax, eax
jne 0x407935
xor ebx, ebx
lea eax, [ebp - 0xb0]
push eax
push str.LANMANNT
call esi
test eax, eax
jne 0x40794a
xor ebx, ebx
inc ebx
lea eax, [ebp - 0xb0]
push eax
push str.SERVERNT
call esi
test eax, eax
jne 0x40795f
xor ebx, ebx
inc ebx
mov eax, dword [ebp - 0x1bc]
sub eax, edi
je 0x407b18
dec eax
je 0x407ad3
dec eax
jne 0x407b22
mov eax, dword [ebp - 0x1c8]
cmp eax, 4
ja 0x407995
mov dword [ebp - 0x1d0], 6
jmp 0x407b22
cmp eax, 5
jne 0x4079e5
cmp dword [ebp - 0x1c4], edi
jne 0x4079b1
mov dword [ebp - 0x1d0], 0xb
jmp 0x407b22
cmp dword [ebp - 0x1c4], 1
jne 0x4079c9
mov dword [ebp - 0x1d0], 0xd
jmp 0x407b22
cmp dword [ebp - 0x1c4], 2
jne 0x407b22
mov dword [ebp - 0x1d0], 0xf
jmp 0x407b22
cmp eax, 6
jne 0x407ac5
mov eax, dword [ebp - 0x1c4]
cmp eax, edi
jne 0x407a08
xor eax, eax
cmp ebx, edi
setne al
lea eax, [eax + eax + 0x13]
jmp 0x407b10
cmp eax, 1
jne 0x407a1d
xor eax, eax
cmp ebx, edi
setne al
lea eax, [eax + eax + 0x17]
jmp 0x407b10
push 2
pop esi
cmp eax, esi
jne 0x407ab4
xor eax, eax
cmp ebx, edi
setne al
push ecx
mov ecx, esp
mov dword [ebp - 0x1d8], esp
push str.CurrentVersion
add eax, 0x1b
mov dword [ebp - 0x1d0], eax
call fcn.004076dd
push ecx
mov ecx, esp
mov dword [ebp - 0x1dc], esp
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov dword [ebp - 4], edi
call fcn.004076dd
push ecx
mov ecx, esp
mov dword [ebp - 0x1e0], esp
push str.HKEY_LOCAL_MACHINE
mov byte [ebp - 4], 1
call fcn.004076dd
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x1d4]
push eax
call fcn.0040771e
add esp, 0x10
push 0x46c5cc
mov ecx, eax
mov dword [ebp - 4], esi
call fcn.004061cf
mov ecx, dword [ebp - 0x1d4]
mov ebx, eax
neg ebx
sbb bl, bl
add ecx, 0xfffffff0
call fcn.00405c12
inc bl
je 0x407b22
jmp 0x407ab9
cmp eax, 3
jne 0x407ac7
mov dword [ebp - 0x1d0], 0x1e
jmp 0x407b22
jb 0x407b22
mov dword [ebp - 0x1d0], 0x1f
jmp 0x407b22
cmp dword [ebp - 0x1c8], 4
jne 0x407b22
cmp dword [ebp - 0x1c4], edi
jne 0x407af0
mov dword [ebp - 0x1d0], 3
jmp 0x407b22
push 0xa
pop eax
cmp dword [ebp - 0x1c4], eax
jne 0x407b07
mov dword [ebp - 0x1d0], 8
jmp 0x407b22
cmp dword [ebp - 0x1c4], 0x5a
jne 0x407b22
mov dword [ebp - 0x1d0], eax
jmp 0x407b22
mov dword [ebp - 0x1d0], 2
mov eax, dword [ebp - 0x1d0]
mov dword [0x485c94], eax
call fcn.00435900
ret