Function at 0x40fce0
Capabilities:
Check os version
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47be41
mov eax, dword fs:[0]
push eax
mov eax, 0x1114
call fcn.0047a9b0
mov eax, dword [0x49f008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp - 0x111c]
mov dword [ebp - 0x111c], eax
xor eax, eax
mov dword [ebp - 0x111c], 0x4a1df0
mov dword [0x4a1e10], 0
mov dword [0x4a1e14], 7
mov word [0x4a1e00], ax
mov dword [ebp - 4], eax
mov dword [0x4a1e28], eax
mov dword [0x4a1e2c], 7
mov word [0x4a1e18], ax
mov dword [0x4a1e40], eax
mov dword [0x4a1e44], 7
mov word [0x4a1e30], ax
mov dword [0x4a1e58], eax
mov dword [0x4a1e5c], 7
mov word [0x4a1e48], ax
mov dword [0x4a1e70], eax
mov dword [0x4a1e74], 7
mov word [0x4a1e60], ax
mov byte [ebp - 4], 4
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov word [0x4a1e78], ax
mov word [ebp - 0xd8], ax
lea eax, [ebp - 0xd8]
push 0x64
push eax
push str.PROCESSOR_ARCHITECTURE
call esi
test eax, eax
je 0x40fdcb
cmp eax, 0x64
jbe 0x40fdd4
xor eax, eax
mov word [ebp - 0xd8], ax
lea eax, [ebp - 0xd8]
push eax
push 0x48910c
call fcn.00467591
add esp, 8
test eax, eax
sete byte [0x4a1e78]
test eax, eax
je 0x40fe4b
xor eax, eax
mov word [ebp - 0xd8], ax
lea eax, [ebp - 0xd8]
push 0x64
push eax
push str.PROCESSOR_ARCHITEW6432
call esi
test eax, eax
je 0x40fe17
cmp eax, 0x64
jbe 0x40fe20
xor eax, eax
mov word [ebp - 0xd8], ax
lea eax, [ebp - 0xd8]
push eax
push 0x48910c
call fcn.00467591
movzx ecx, byte [0x4a1e79]
add esp, 8
test eax, eax
mov edx, 1
cmove ecx, edx
mov byte [0x4a1e79], cl
lea eax, [ebp - 0x1118]
xorps xmm0, xmm0
push eax
push 0x20119
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
movups xmmword [0x4a1df0], xmm0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4102ba
xor ebx, ebx
mov dword [ebp - 0x10f0], 7
xorps xmm0, xmm0
mov dword [ebp - 0x10e8], ebx
xor esi, esi
mov dword [ebp - 0x10e0], ebx
mov dword [ebp - 0x10e4], ebx
movups xmmword [ebp - 0x1114], xmm0
mov dword [ebp - 0x10f4], ebx
mov word [ebp - 0x1104], ax
mov dword [ebp - 0x10ec], eax
mov byte [ebp - 4], 5
lea eax, [ebp - 0x10d8]
mov dword [ebp - 0x10dc], 0x1000
mov ecx, 0x1000
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40fed1
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x10dc]
push eax
lea eax, [ebp - 0x10d8]
push eax
push ecx
push ecx
push 0x489764
push dword [ebp - 0x1118]
call edi
test eax, eax
je 0x40ff0c
xor eax, eax
mov word [ebp - 0x10d8], ax
lea ecx, [ebp - 0x10d8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ff15
sub ecx, edx
sar ecx, 1
je 0x40ff30
push ecx
lea eax, [ebp - 0x10d8]
push eax
jmp 0x40ff37
push 7
push str.Windows
mov ecx, 0x4a1e48
call fcn.00402380
cmp dword [0x4a1e5c], 8
mov eax, 0x4a1e48
push dword [0x4a1e58]
cmovae eax, dword [0x4a1e48]
mov ecx, 0x4a1e60
push eax
call fcn.00402380
mov dword [ebp - 0x10dc], 0x1000
lea eax, [ebp - 0x10d8]
mov ecx, 0x1000
nop word [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40ff80
lea eax, [ebp - 0x10dc]
push eax
lea eax, [ebp - 0x10d8]
push eax
push ecx
push ecx
push str.CurrentBuildNumber
push dword [ebp - 0x1118]
call edi
test eax, eax
je 0x40ffb5
xor eax, eax
mov word [ebp - 0x10d8], ax
lea ecx, [ebp - 0x10d8]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ffc0
sub ecx, edx
sar ecx, 1
je 0x40fff7
push ecx
lea eax, [ebp - 0x10d8]
mov ecx, 0x4a1e30
push eax
call fcn.00402380
lea eax, [ebp - 0x10d8]
push eax
call fcn.0046812d
add esp, 4
mov dword [0x4a1df8], eax
mov dword [ebp - 0x10dc], 0x1000
lea eax, [ebp - 0x10d8]
mov ecx, 0x1000
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x410010
lea eax, [ebp - 0x10dc]
push eax
lea eax, [ebp - 0x10d8]
push eax
push ecx
push ecx
push str.CurrentVersion
push dword [ebp - 0x1118]
call edi
test eax, eax
je 0x410045
xor eax, eax
mov word [ebp - 0x10d8], ax
lea ecx, [ebp - 0x10d8]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410050
sub ecx, edx
sar ecx, 1
je 0x4100b6
lea eax, [ebp - 0x10d8]
push eax
call fcn.0046812d
lea edx, [ebp - 0x10d8]
add esp, 4
mov ebx, eax
lea esi, [edx + 2]
xor ecx, ecx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410080
sub edx, esi
sar edx, 1
test edx, edx
jle 0x4100b4
nop dword [eax]
nop word [eax + eax]
cmp word [ebp + ecx*2 - 0x10d8], 0x2e
je 0x410277
inc ecx
cmp ecx, edx
jl 0x4100a0
xor esi, esi
lea eax, [ebp - 0x10dc]
mov dword [ebp - 0x10dc], 4
push eax
lea eax, [ebp - 0x10e8]
push eax
push 0
push 0
push str.CurrentMajorVersionNumber
push dword [ebp - 0x1118]
call edi
test eax, eax
jne 0x410290
lea eax, [ebp - 0x10dc]
mov dword [ebp - 0x10dc], 4
push eax
lea eax, [ebp - 0x10e0]
push eax
push 0
push 0
push str.CurrentMinorVersionNumber
push dword [ebp - 0x1118]
call edi
mov ecx, dword [ebp - 0x10e0]
xor edx, edx
test eax, eax
mov eax, dword [ebp - 0x10e8]
cmovne ecx, edx
mov dword [ebp - 0x10e0], ecx
cmp eax, 6
ja 0x41013d
jne 0x41029a
cmp ecx, 3
jbe 0x41029a
mov ebx, eax
mov dword [ebp - 0x10dc], 0x1000
mov esi, ecx
lea eax, [ebp - 0x10d8]
mov ecx, 0x1000
mov byte [eax], dl
lea eax, [eax + 1]
sub ecx, 1
jne 0x410156
lea eax, [ebp - 0x10dc]
push eax
lea eax, [ebp - 0x10d8]
push eax
push ecx
push ecx
push str.ReleaseId
push dword [ebp - 0x1118]
call edi
test eax, eax
je 0x41018a
xor eax, eax
mov word [ebp - 0x10d8], ax
lea ecx, [ebp - 0x10d8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410193
sub ecx, edx
sar ecx, 1
je 0x4101b6
push ecx
lea eax, [ebp - 0x10d8]
mov ecx, 0x4a1e18
push eax
call fcn.00402380
mov dword [ebp - 0x10dc], 0x1000
lea eax, [ebp - 0x10d8]
mov ecx, 0x1000
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4101d0
lea eax, [ebp - 0x10dc]
push eax
lea eax, [ebp - 0x10d8]
push eax
push ecx
push ecx
push str.DisplayVersion
push dword [ebp - 0x1118]
call edi
test eax, eax
je 0x410205
xor eax, eax
mov word [ebp - 0x10d8], ax
lea ecx, [ebp - 0x10d8]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410210
sub ecx, edx
sar ecx, 1
je 0x410233
push ecx
lea eax, [ebp - 0x10d8]
mov ecx, 0x4a1e00
push eax
call fcn.00402380
lea eax, [ebp - 0x10dc]
mov dword [ebp - 0x10dc], 4
push eax
lea eax, [ebp - 0x10e4]
push eax
push 0
push 0
push 0x489870
push dword [ebp - 0x1118]
call edi
mov ecx, dword [ebp - 0x10e4]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x10e4], ecx
mov dword [0x4a1dfc], ecx
jmp 0x41029a
lea eax, [ebp - 0x10d6]
lea eax, [eax + ecx*2]
push eax
call fcn.0046812d
add esp, 4
mov esi, eax
jmp 0x4100b6
mov dword [ebp - 0x10e8], 0
test ebx, ebx
je 0x4102aa
mov dword [0x4a1df0], ebx
mov dword [0x4a1df4], esi
push dword [ebp - 0x1118]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 4
mov eax, dword [0x4a1df0]
cmp eax, 0xa
jne 0x41030b
cmp dword [0x4a1df8], 0x55f0
jl 0x410329
push ecx
push 0x489878
mov ecx, 0x4a1e48
call fcn.0040a140
mov esi, eax
cmp esi, 0xffffffff
je 0x410329
push 3
push esi
mov ecx, 0x4a1e48
call fcn.004020b0
push 3
push 0x489880
push esi
mov ecx, 0x4a1e48
call fcn.00460390
mov eax, dword [0x4a1df0]
test eax, eax
jne 0x410329
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx ecx, al
movzx eax, ax
shr eax, 8
mov dword [0x4a1df0], ecx
mov dword [0x4a1df4], eax
mov eax, 0x4a1df0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004632a0
mov esp, ebp
pop ebp
ret