Function at 0x405e10
Capabilities:
Check os version
Get number of processors
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x164
mov eax, dword [0x41c040]
xor eax, esp
mov dword [esp + 0x160], eax
mov eax, dword [ebp + 0x10]
xor edx, edx
mov byte [esp + 2], dl
mov byte [esp + 3], dl
push ebx
push esi
push edi
test eax, eax
je 0x405e4a
mov edx, eax
mov dword [0x41d1e0], edx
jmp 0x405e50
mov edx, dword [0x41d1e0]
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x405e61
mov ecx, esi
mov dword [0x41d1e4], ecx
jmp 0x405e67
mov ecx, dword [0x41d1e4]
test edx, edx
je 0x40641d
test ecx, ecx
je 0x40641d
test eax, eax
je 0x405ea2
inc dword [eax + 8]
cmp dword [ecx], 0
jbe 0x405e94
cmp dword [ecx], 8
jbe 0x405e8d
cmp dword [ecx], 0x11
jne 0x405e94
xor ecx, ecx
xor edx, edx
inc ecx
jmp 0x405e99
xor edx, edx
inc edx
xor ecx, ecx
add eax, 0x10
push eax
call fcn.004054b9
mov ebx, dword [0x7ffe0004]
mov edx, 0x7ffe0324
mov edi, 0x7ffe0320
mov dword [esp + 0x10], ebx
mov ecx, 0x7ffe0328
mov edx, dword [edx]
mov edi, dword [edi]
mov eax, dword [ecx]
cmp edx, eax
je 0x405ee3
lea esi, [ecx - 4]
lea ebx, [ecx - 8]
pause
mov edx, dword [esi]
mov edi, dword [ebx]
mov ecx, dword [ecx]
cmp edx, ecx
mov ecx, 0x7ffe0328
jne 0x405ecb
mov esi, dword [ebp + 0x14]
mov ebx, dword [esp + 0x10]
mov eax, edx
mul ebx
mov ecx, eax
mov eax, edx
shld eax, ecx, 8
mov dword [esp + 0x14], eax
mov eax, edi
mov edi, dword [esp + 0x14]
mul ebx
mov ebx, dword [ebp + 8]
shrd eax, edx, 0x18
shl ecx, 8
shr edx, 0x18
add ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, dword [0x41d1e0]
adc edi, edx
mov dword [esp + 0x14], edi
cmp byte [ecx], 0
je 0x405f64
mov eax, dword [ecx + 8]
cmp eax, 1
je 0x405f5c
cmp eax, dword [ecx + 4]
je 0x405f5c
mov edx, dword [esp + 0x10]
mov eax, edi
sub edx, dword [ecx + 0x18]
sbb eax, dword [ecx + 0x1c]
mov dword [esp + 0x64], eax
jne 0x405f5c
cmp edx, 0x3e8
jae 0x405f5c
test ebx, ebx
je 0x405f64
cmp byte [ecx + 0x20], 0
jne 0x405f64
mov dl, 1
mov byte [esp + 0xe], dl
mov byte [esp + 0xf], dl
jmp 0x405f68
mov dl, 1
mov byte [esp + 0xe], dl
jmp 0x405f68
mov dl, byte [esp + 0xe]
cmp byte [ecx + 0x21], 0
je 0x405f9c
test esi, esi
je 0x405f9c
test ebx, ebx
jne 0x405f9c
mov eax, dword [0x41d1e4]
cmp dword [eax], ebx
jbe 0x405f9c
cmp dword [eax], 2
jbe 0x405f98
cmp dword [eax], 3
jbe 0x405f9c
cmp dword [eax], 6
jbe 0x405f98
cmp dword [eax], 8
je 0x405f98
cmp dword [eax], 0x11
jne 0x405f9c
mov al, 1
jmp 0x405f9e
xor eax, eax
xor ecx, ecx
mov byte [esp + 0xd], al
mov word [esp + 0x80], cx
mov dword [esp + 0x82], ecx
mov word [esp + 0x86], cx
test dl, dl
jne 0x405fc7
test al, al
je 0x40641d
lea eax, [esp + 0x24]
push eax
lea edx, [esp + 0x84]
call fcn.00405adf
test eax, eax
js 0x40641d
movzx eax, word [esp + 0x80]
mov ecx, 0xffff
sub ecx, eax
cmp ecx, 2
jb 0x40641d
cmp byte [esp + 0xd], 0
je 0x406178
push 8
pop esi
xor edx, edx
mov dword [esp + 0xac], esi
push 0xa
pop ecx
mov al, dl
mov dword [esp + 0xb8], esi
mov dword [esp + 0xc4], esi
mov edi, edx
mov byte [esp + 0xd], al
lea esi, [esp + 0xac]
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], 0x40182c
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xc0], 0x401838
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xcc], 0x401844
test al, al
jne 0x4060cd
mov ecx, dword [esi]
mov al, dl
mov byte [esp + 0xd], al
cmp ecx, dword [esp + 0x24]
ja 0x4060b2
mov eax, dword [esp + 0x2c]
mov edx, esi
sub eax, ecx
mov dword [esp + 0x30], ecx
add eax, dword [esp + 0x24]
mov dword [esp + 0x38], eax
lea eax, [esp + 0xd]
push eax
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x34]
push fcn.004192a0
call fcn.00418b8b
mov ecx, eax
mov al, byte [esp + 0xd]
xor edx, edx
test ecx, ecx
js 0x40641d
mov ecx, edx
test ecx, ecx
js 0x40641d
inc edi
add esi, 0xc
cmp edi, 3
jb 0x406065
test al, al
je 0x406178
lea eax, [esp + 0xd]
mov dword [esp + 0x3c], 0x14
push eax
push ecx
lea edx, [esp + 0x2c]
mov dword [esp + 0x48], 0x16
lea ecx, [esp + 0x44]
mov dword [esp + 0x4c], 0x401850
call fcn.00418d3d
test eax, eax
js 0x40641d
cmp byte [esp + 0xd], 0
jne 0x406178
xor eax, eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
push eax
call fcn.0040849f
mov ecx, dword [0x41d1e0]
lea eax, [esp + 0x18]
sub esp, 0xc
lea ecx, [ecx + 0x24]
push eax
call fcn.00408560
lea esi, [esp + 0x18]
test eax, eax
jns 0x406161
cmp dword [esp + 0x20], 0
lea edi, [esp + 0x48]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x40641d
lea ecx, [esp + 0x48]
call fcn.0041a38f
jmp 0x40641d
cmp dword [esp + 0x20], 0
lea edi, [esp + 0x54]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x406178
lea ecx, [esp + 0x54]
call fcn.0041a38f
mov cl, byte [esp + 0xe]
test cl, cl
je 0x40641d
mov ecx, dword [0x41d1e0]
xor edx, edx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x94], edx
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x88], eax
mov eax, dword [ecx + 0xc]
lea ecx, [esp + 0x88]
mov dword [esp + 0x90], eax
call fcn.00411622
xor eax, eax
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x80]
add eax, 2
push eax
call fcn.004083d6
test eax, eax
js 0x406414
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.ntdll.dll_RtlCopyUnicodeString]
movzx ecx, word [esp + 0x74]
xor edx, edx
mov eax, dword [esp + 0x78]
shr ecx, 1
mov word [eax + ecx*2], dx
cmp word [esp + 0x74], dx
jbe 0x406414
mov dword [esp + 0x7c], edx
sub ebx, edx
je 0x406233
sub ebx, 1
je 0x40622c
sub ebx, 1
jne 0x406414
mov eax, 0xc0000003
jmp 0x406238
mov eax, 0xc0000002
jmp 0x406238
mov eax, 0x40000001
lea ecx, [esp + 0x68]
mov dword [esp + 0x68], edx
push ecx
push eax
mov eax, dword fs:[0x30]
push edx
push 0xb
push dword [eax + 8]
call dword [sym.imp.ntdll.dll_RtlFindMessage]
test eax, eax
js 0x406414
mov ebx, dword [esp + 0x68]
test byte [ebx + 2], 1
je 0x406414
mov esi, dword [0x41d1e0]
push 0x64
pop edi
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x406294
mov eax, dword [esi + 8]
cmp ecx, eax
jbe 0x406294
mul edi
test edx, edx
ja 0x406294
jb 0x40628e
cmp eax, 0xffffffff
ja 0x406294
xor edx, edx
div ecx
mov edi, eax
mov ecx, dword [esi + 8]
lea eax, [esp + 0x7c]
push eax
mov dword [esp + 0x9c], ecx
lea eax, [esp + 0xd4]
mov ecx, dword [esi + 4]
mov dword [esp + 0xac], edi
mov edi, 0x96
push edi
push eax
lea eax, [esp + 0xa4]
mov dword [esp + 0xa8], ecx
mov ecx, dword [esp + 0x84]
push eax
push 1
xor eax, eax
mov dword [esp + 0xb4], ecx
mov ecx, dword [ebp + 0xc]
push eax
push eax
push eax
lea eax, [ebx + 4]
mov dword [esp + 0xc4], ecx
push eax
call dword [sym.imp.ntdll.dll_RtlFormatMessage]
mov ebx, 0x80000005
cmp eax, ebx
jne 0x40639f
push 0x2e
pop esi
mov ax, word [esp + 0x74]
cmp ax, 0x10
jb 0x406414
shr ax, 1
mov word [esp + 0x74], ax
movzx ecx, ax
movzx eax, word [esp + 0x76]
sub eax, ecx
cmp eax, 8
jb 0x406414
mov eax, dword [esp + 0x78]
xor edx, edx
shr ecx, 1
mov word [eax + ecx*2], si
movzx ecx, word [esp + 0x74]
mov eax, dword [esp + 0x78]
shr ecx, 1
mov word [eax + ecx*2 + 2], si
movzx ecx, word [esp + 0x74]
mov eax, dword [esp + 0x78]
shr ecx, 1
mov word [eax + ecx*2 + 4], si
movzx ecx, word [esp + 0x74]
mov eax, dword [esp + 0x78]
shr ecx, 1
mov word [eax + ecx*2 + 6], dx
lea eax, [esp + 0x7c]
push eax
push edi
lea eax, [esp + 0xd8]
push eax
lea eax, [esp + 0xa4]
push eax
xor eax, eax
push 1
push eax
push eax
push eax
mov eax, dword [esp + 0x88]
add eax, 4
push eax
call dword [sym.imp.ntdll.dll_RtlFormatMessage]
cmp eax, ebx
je 0x406303
test eax, eax
js 0x406414
mov eax, dword [esp + 0x7c]
cmp eax, 2
jb 0x4063b3
sub eax, 2
mov dword [esp + 0x7c], eax
mov word [esp + 0x6c], ax
lea ecx, [esp + 0xd0]
mov dword [esp + 0x70], ecx
mov ecx, 0x98
movzx eax, ax
shr eax, 1
mov word [esp + 0x6e], cx
xor ecx, ecx
mov word [esp + eax*2 + 0xd0], cx
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.ntdll.dll_NtDrawText]
test eax, eax
jns 0x4063fa
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.ntdll.dll_NtDisplayString]
test eax, eax
js 0x406414
mov eax, dword [0x41d1e0]
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x18], ecx
mov ecx, dword [esp + 0x14]
mov dword [eax + 0x1c], ecx
mov cl, byte [esp + 0xf]
mov byte [eax + 0x20], cl
lea ecx, [esp + 0x74]
call fcn.004089e7
mov ecx, dword [esp + 0x16c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041ba49
mov esp, ebp
pop ebp
ret 0x10