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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55a8d6
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x5b4450]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push esi
push edi
mov eax, dword [0x5b4450]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
lea eax, [esp + 0x14]
push str.Tool_CheckCoreEdition
push eax
call fcn.0040ac70
add esp, 0xc
push 0x11c
lea ecx, [esp + 0x30]
push ebx
push ecx
mov dword [esp + 0x16c], ebx
mov dword [esp + 0x24], ebx
call fcn.005373f0
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x41228a
push ebx
push str.return___08x
lea eax, [esp + 0x18]
push 2
push eax
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x160], 0xffffffff
call fcn.0040ae50
xor eax, eax
jmp 0x412462
call fcn.0040bea0
mov ecx, dword [esp + 0x30]
mov dl, byte [esp + 0x146]
cmp ecx, 6
jne 0x412348
cmp dword [esp + 0x34], 2
jae 0x41234e
cmp eax, 0xa
jne 0x412433
cmp dl, 1
je 0x412433
push str.Win2008_Server
lea ecx, [esp + 0x14]
push 7
push ecx
call fcn.0040aed0
add esp, 0xc
push str.kernel32.dll
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
je 0x412433
push str.GetProductInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x412433
movzx ecx, word [esp + 0x142]
lea edx, [esp + 0x1c]
push edx
movzx edx, word [esp + 0x144]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x3c]
push ecx
push edx
call eax
test eax, eax
je 0x412433
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
cmp eax, 0x1d
ja case.0x412341.15
movzx eax, byte [eax + 0x412490]
jmp dword [eax*4 + 0x412488]
jbe 0x4122ae
cmp dl, 1
je 0x4122ae
push str.Win2012_2016_Server
lea ecx, [esp + 0x14]
push 7
push ecx
call fcn.0040aed0
add esp, 0xc
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
push 0x20019
push str.SoftwareMicrosoftWindows_NTCurrentVersionServerServerLevels
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x16c], 1
call fcn.0040a130
mov edi, dword [esp + 0x20]
test eax, eax
jne 0x4123f0
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push ebx
push ebx
push ebx
push ebx
push str.ServerCoreExtended
push edi
call esi
cmp eax, 2
jne 0x4123c4
push str.Core_Edtion___
push 7
lea edx, [esp + 0x18]
push edx
jmp 0x4123e0
push ebx
push ebx
push ebx
push ebx
push 0x58b444
push edi
call esi
test eax, eax
jne 0x4123f0
push str.Nano_Server___
push 7
lea eax, [esp + 0x18]
push eax
call fcn.0040aed0
mov dword [esp + 0x24], 1
add esp, 0xc
mov byte [esp + 0x160], bl
cmp edi, ebx
je 0x412433
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x412433
push str.Core_Edtion___
lea ecx, [esp + 0x14]
push 7
push ecx
call fcn.0040aed0
mov dword [esp + 0x24], 1
jmp 0x412430
push str.NOT_Core_Edtion___
lea edx, [esp + 0x14]
push 7
push edx
call fcn.0040aed0
add esp, 0xc
mov esi, dword [esp + 0x18]
push esi
push str.return___08x
lea eax, [esp + 0x18]
push 2
push eax
call fcn.0040aed0
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x160], 0xffffffff
call fcn.0040ae50
mov eax, esi
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.005337cb
mov esp, ebp
pop ebp
ret