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

Disassembly:
push 0x38c
mov eax, 0x47f5d2
call fcn.00466686
mov esi, ebx
call fcn.00420d0f
lea esi, [ebp - 0x84]
call fcn.00424973
mov esi, 0x11c
xor edi, edi
push esi
lea eax, [ebp - 0x1c4]
push edi
push eax
mov dword [ebp - 4], edi
call fcn.00467850
add esp, 0xc
lea eax, [ebp - 0x1c4]
mov dword [ebp - 0x1c4], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push eax
call esi
mov dword [ebp - 0x1f8], eax
cmp eax, edi
jne 0x420dbb
lea eax, [ebp - 0x1c4]
push eax
mov dword [ebp - 0x1c4], 0x114
call esi
test eax, eax
jne 0x420dbb
lea ecx, [ebp - 0x84]
call fcn.0042523a
or eax, 0xffffffff
call fcn.00466709
ret
cmp dword [ebp - 0x1c0], 6
jne 0x420dcd
cmp dword [ebp - 0x1bc], 2
je 0x420dd9
cmp dword [ebp - 0x1c0], edi
jne 0x420eb5
mov eax, dword fs:[0x18]
cmp eax, edi
je 0x420eb5
mov edi, dword [eax + 0x30]
test edi, edi
je 0x420eb5
mov eax, dword [edi + 0xa4]
mov dword [ebp - 0x1c0], eax
mov eax, dword [edi + 0xa8]
mov dword [ebp - 0x1bc], eax
movzx eax, word [edi + 0xac]
mov dword [ebp - 0x1b8], eax
movzx eax, word [edi + 0xae]
test ax, ax
je 0x420ea9
movzx esi, ax
push 0x48cce8
lea eax, [ebp - 0xa4]
push eax
shr esi, 8
call fcn.00424e0d
push 0xa
push esi
lea esi, [ebp - 0x278]
mov byte [ebp - 4], 1
call fcn.00424b5b
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x274]
push eax
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 2
call fcn.0041fd9f
mov ecx, esi
call fcn.0042523a
cmp dword [ebp - 0x88], 8
mov ecx, dword [ebp - 0x9c]
jae 0x420e86
lea ecx, [ebp - 0x9c]
lea edx, [ebp - 0x1b0]
movzx eax, word [ecx]
inc ecx
mov word [edx], ax
inc ecx
inc edx
inc edx
test ax, ax
jne 0x420e8c
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], al
call fcn.0042523a
mov eax, dword [edi + 0xb0]
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp - 0x1c0]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x1bc]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x1b8]
mov dword [ebx + 0x14], eax
mov esi, 0x48bc00
push esi
lea eax, [ebp - 0x2b8]
push eax
call fcn.00424e0d
push esi
lea eax, [ebp - 0x238]
push eax
mov byte [ebp - 4], 3
call fcn.00424e0d
push 0xa
mov byte [ebp - 4], 4
push dword [ebx + 0x14]
lea esi, [ebp - 0x318]
call fcn.00424b5b
mov edi, eax
push 0xa
mov byte [ebp - 4], 5
push dword [ebx + 0x10]
lea esi, [ebp - 0x2f8]
call fcn.00424b5b
mov dword [ebp - 0x1f4], eax
push 0xa
mov byte [ebp - 4], 6
push dword [ebx + 0xc]
lea esi, [ebp - 0x338]
call fcn.00424b5b
lea ecx, [ebp - 0x238]
push ecx
push eax
lea eax, [ebp - 0x378]
push eax
mov byte [ebp - 4], 7
call fcn.004273c5
add esp, 0xc
push dword [ebp - 0x1f4]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x2d8]
push eax
call fcn.004273c5
add esp, 0xc
lea ecx, [ebp - 0x2b8]
push ecx
push eax
lea eax, [ebp - 0x358]
push eax
mov byte [ebp - 4], 9
call fcn.004273c5
add esp, 0xc
push edi
push eax
lea eax, [ebp - 0x398]
push eax
mov byte [ebp - 4], 0xa
call fcn.004273c5
add esp, 0xc
lea esi, [ebx + 0x18]
mov byte [ebp - 4], 0xb
call fcn.00424f31
lea ecx, [ebp - 0x398]
call fcn.0042523a
lea ecx, [ebp - 0x358]
call fcn.0042523a
lea ecx, [ebp - 0x2d8]
call fcn.0042523a
lea ecx, [ebp - 0x378]
call fcn.0042523a
lea ecx, [ebp - 0x338]
call fcn.0042523a
lea ecx, [ebp - 0x2f8]
call fcn.0042523a
lea ecx, [ebp - 0x318]
call fcn.0042523a
lea ecx, [ebp - 0x238]
call fcn.0042523a
lea ecx, [ebp - 0x2b8]
mov byte [ebp - 4], 0
call fcn.0042523a
movzx eax, word [ebp - 0xac]
mov dword [ebx + 0x38], eax
movzx eax, byte [ebp - 0xaa]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebp - 0x1b4]
dec eax
je 0x4213c1
dec eax
jne 0x4213f7
mov edx, dword [ebp - 0x1c0]
mov ecx, dword [ebp - 0x1bc]
push 6
pop esi
cmp edx, esi
jne 0x421080
test ecx, ecx
jne 0x421054
mov dword [ebx], 8
cmp ecx, 1
jne 0x42105f
mov dword [ebx], 9
cmp ecx, 2
jne 0x42106a
mov dword [ebx], 0xa
cmp ecx, 3
jne 0x421075
mov dword [ebx], 0xb
cmp ecx, 4
jne 0x4210b7
mov dword [ebx], 0xc
cmp edx, 0xa
jne 0x42108f
test ecx, ecx
jne 0x4210b7
mov dword [ebx], 0xd
push 5
pop eax
cmp edx, eax
jne 0x4210ae
cmp ecx, 2
jne 0x4210a1
mov dword [ebx], 7
cmp ecx, 1
jne 0x4210a8
mov dword [ebx], esi
test ecx, ecx
jne 0x4210b7
mov dword [ebx], eax
push 4
pop eax
cmp edx, eax
ja 0x4210b7
mov dword [ebx], eax
lea eax, [ebp - 0x1b0]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00424e0d
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0xc
call fcn.00409901
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 0
call fcn.0042523a
push 0x48bc84
lea eax, [ebp - 0x218]
push eax
call fcn.00424e0d
lea ecx, [ebp - 0x218]
lea edi, [ebp - 0x84]
mov byte [ebp - 4], 0xd
call fcn.0042577e
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 0
call fcn.0042523a
push str.Service_Pack
lea eax, [ebp - 0x298]
push eax
call fcn.00424da9
xor esi, esi
push esi
mov eax, edi
push eax
lea eax, [ebp - 0x298]
call fcn.0042534f
lea ecx, [ebp - 0x298]
mov edi, eax
call fcn.0042523a
cmp edi, esi
jl 0x42118c
lea eax, [ebp - 0x196]
push eax
lea eax, [ebp - 0x1e4]
push eax
call fcn.00424e0d
lea eax, [ebp - 0x1e4]
call fcn.004256d7
lea ecx, [eax - 1]
cmp ecx, 9
ja 0x421181
mov dword [ebx + 8], eax
lea ecx, [ebp - 0x1e4]
call fcn.0042523a
cmp dword [ebp - 0x1f8], esi
je 0x4212ae
cmp byte [ebp - 0xaa], 1
jne 0x4211f8
push 4
pop ecx
cmp dword [ebp - 0x1c0], ecx
jne 0x4211b8
mov dword [ebx + 4], 1
jmp 0x42136c
mov eax, dword [ebp - 0xac]
test eax, 0x200
je 0x4211cd
mov dword [ebx + 4], ecx
jmp 0x42135f
test eax, 0x100
je 0x4211e5
cmp dword [ebx], 0xb
jne 0x4211e5
mov dword [ebx + 4], 3
jmp 0x42135f
and al, 0x40
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xb
inc eax
inc eax
jmp 0x4212a6
cmp byte [ebp - 0xaa], 3
jne 0x42135f
cmp dword [ebp - 0x1c0], 5
jne 0x421296
cmp dword [ebp - 0x1bc], 2
jne 0x421261
test byte [ebp - 0xac], 0x80
je 0x421230
mov dword [ebx + 4], 7
jmp 0x4213f7
test byte [ebp - 0xac], 2
je 0x421245
mov dword [ebx + 4], 3
jmp 0x4213f7
xor ecx, ecx
mov eax, 0x400
cmp word [ebp - 0xac], ax
sete cl
add ecx, 5
mov dword [ebx + 4], ecx
jmp 0x4213f7
cmp dword [ebp - 0x1bc], esi
jne 0x421296
test byte [ebp - 0xac], 0x80
je 0x42127e
mov dword [ebx + 4], 8
jmp 0x4213f7
test byte [ebp - 0xac], 2
push 0
pop eax
setne al
add eax, 0xb
mov dword [ebx + 4], eax
jmp 0x4213f7
test byte [ebp - 0xac], 2
push 0
pop eax
setne al
add eax, 9
mov dword [ebx + 4], eax
jmp 0x42135f
push 0x50
pop edi
lea eax, [ebp - 0x1ec]
push eax
push 1
push esi
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x1e8], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x420da7
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x64]
push eax
push esi
push esi
push str.ProductType
push dword [ebp - 0x1ec]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4213ac
cmp dword [ebp - 0x1e8], edi
ja 0x4213ac
push dword [ebp - 0x1ec]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x64]
push eax
push str.WINNT
call edi
test eax, eax
jne 0x421333
mov dword [ebx + 4], 1
lea eax, [ebp - 0x64]
push eax
push str.LANMANNT
call edi
test eax, eax
jne 0x421349
mov dword [ebx + 4], 0xb
lea eax, [ebp - 0x64]
push eax
push str.SERVERNT
call edi
test eax, eax
jne 0x42135f
mov dword [ebx + 4], 0xc
cmp dword [ebp - 0x1c0], 4
jne 0x4213f7
lea eax, [ebp - 0x1b0]
push str.Service_Pack_6
push eax
call fcn.0046349b
pop ecx
pop ecx
test eax, eax
jne 0x4213f7
lea eax, [ebp - 0x1f0]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [ebp - 0x1f0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4213f7
or esi, 0xffffffff
lea ecx, [ebp - 0x84]
call fcn.0042523a
mov eax, esi
jmp 0x420db5
cmp dword [ebp - 0x1c0], 4
jne 0x4213f7
cmp dword [ebp - 0x1bc], 0
jne 0x4213d9
mov dword [ebx], 1
cmp dword [ebp - 0x1bc], 0xa
jne 0x4213e8
mov dword [ebx], 2
cmp dword [ebp - 0x1bc], 0x5a
jne 0x4213f7
mov dword [ebx], 3
xor esi, esi
jmp 0x4213af