Function at 0x405f70
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x4210f6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x10]
call fcn.0040b130
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0xa4]
xor ebx, ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0xa4]
mov dword [esp + 0x140], ebx
push eax
mov dword [esp + 0xa8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0xb4]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xac]
cmp eax, 2
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], edx
mov edi, 1
je 0x405ff9
cmp eax, edi
jne 0x4062dc
cmp eax, 2
jne 0x40612f
cmp ecx, 3
mov dword [esp + 0x1c], 0x42a72c
mov dword [ebp], edi
jne 0x40601b
cmp edx, 0x33
je 0x4062dc
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.004084c0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov dword [ebp + 0x24], ecx
add esp, 8
lea ecx, [esp + 0x18]
mov dword [ebp + 0x20], eax
call fcn.0040b130
lea edx, [esp + 0x24]
push 0x80
push edx
push edi
push str.identifier
push str.HARDWAREDESCRIPTIONSystem
push ebx
lea ecx, [esp + 0x30]
mov byte [esp + 0x158], 1
call fcn.0040b150
lea eax, [esp + 0x24]
push eax
call fcn.004154a0
add esp, 4
mov esi, str.NEC_PC_98
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4060a8
cmp cl, bl
je 0x4060a1
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4060a8
add eax, 2
add esi, 2
cmp cl, bl
jne 0x406081
xor eax, eax
or esi, 0xffffffff
jmp 0x4060b1
sbb eax, eax
mov esi, 0xffffffff
sbb eax, esi
cmp eax, ebx
jne 0x4060bc
mov dword [ebp + 0x1c], 1
push 0xe0000000
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
je 0x4060db
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp + 0x18], 1
cmp dword [esp + 0xa8], 5
jne 0x4060f1
mov ecx, ebp
call fcn.00405f10
mov dword [ebp + 0x14], eax
jmp 0x4060f9
cmp byte [0x42a628], bl
jne 0x406118
lea ecx, [esp + 0x18]
mov dword [ebp + 0x10], ebx
mov byte [esp + 0x140], bl
call fcn.0040b140
mov dword [esp + 0x140], esi
jmp 0x4062e7
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], bl
call fcn.0040b140
mov edi, 1
jmp 0x4061a1
push edi
call dword [sym.imp.USER32.dll_GetKeyboardType]
xor ecx, ecx
mov cl, ah
cmp cl, 0xd
jne 0x406142
mov dword [ebp + 0x1c], edi
mov eax, dword [ebp + 8]
mov dword [ebp], ebx
cmp eax, 4
jne 0x406155
cmp dword [ebp + 0xc], 0xa
jge 0x406157
cmp eax, eax
jle 0x40615a
mov dword [ebp + 4], edi
call fcn.004088a0
add eax, 0x7148
cmp eax, 0xffff
jbe 0x40616e
mov dword [ebp + 0x2c], edi
lea edx, [esp + 0x14]
push edx
push 4
push ebx
push str.SOFTWARE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
cmp esi, 5
setne cl
mov dword [ebp + 0x18], ecx
or esi, 0xffffffff
cmp dword [esp + 0xb4], edi
jne 0x406240
lea edx, [esp + 0x24]
push 0x80
push edx
push edi
push str.VersionNumber
push str.SoftwareMicrosoftWindowsCurrentVersion
push ebx
lea ecx, [esp + 0x28]
call fcn.0040b150
lea edi, [esp + 0x24]
mov ecx, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x24]
mov cl, byte [esp + ecx + 0x24]
cmp cl, 0x2e
je 0x4061f0
mov cl, byte [eax - 1]
dec eax
cmp cl, 0x2e
jne 0x4061e7
inc eax
push eax
call fcn.00414640
mov ecx, dword [ebp + 8]
add esp, 4
cmp ecx, 4
jne 0x406218
cmp eax, 0x3b6
jle 0x40621d
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x140], esi
jmp 0x4062e7
cmp eax, 0x3b6
jne 0x40627a
lea ecx, [esp + 0x14]
call fcn.0040b130
lea ecx, [esp + 0x14]
mov dword [ebp + 0x10], ebx
call fcn.0040b140
mov dword [esp + 0x140], esi
jmp 0x4062e7
lea edi, [esp + 0xb8]
mov ecx, esi
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
push ecx
call fcn.00415180
add esp, 4
lea esi, [esp + 0x24]
jmp 0x40627e
mov esi, dword [esp + 0x14]
push 0xd
push str.service_pack
push esi
call fcn.00415140
add esp, 0xc
test eax, eax
jne 0x4062c7
movsx edx, byte [esi + 0xd]
add esi, 0xd
push edx
call fcn.00414750
add esp, 4
test eax, eax
je 0x4062b8
movsx eax, byte [esi + 1]
inc esi
push eax
call fcn.00414750
add esp, 4
test eax, eax
jne 0x4062a6
mov edx, dword [esp + 0x1c]
mov cl, byte [esi]
cmp cl, byte [edx]
jl 0x4062d5
mov dword [ebp + 0x10], ebx
jmp 0x4062dc
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x30
jne 0x4062d5
mov dword [ebp + 0x10], ebx
jmp 0x4062dc
mov dword [ebp + 0x10], 1
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.0040b140
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x134
ret