Function at 0x405f40
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x41e3a6
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.0040b0f0
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 0x405fc9
cmp eax, edi
jne 0x4062ac
cmp eax, 2
jne 0x4060ff
cmp ecx, 3
mov dword [esp + 0x1c], 0x427654
mov dword [ebp], edi
jne 0x405feb
cmp edx, 0x33
je 0x4062ac
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.00408480
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.0040b0f0
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.0040b110
lea eax, [esp + 0x24]
push eax
call fcn.00414360
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 0x406078
cmp cl, bl
je 0x406071
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406078
add eax, 2
add esi, 2
cmp cl, bl
jne 0x406051
xor eax, eax
or esi, 0xffffffff
jmp 0x406081
sbb eax, eax
mov esi, 0xffffffff
sbb eax, esi
cmp eax, ebx
jne 0x40608c
mov dword [ebp + 0x1c], 1
push 0xe0000000
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
je 0x4060ab
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp + 0x18], 1
cmp dword [esp + 0xa8], 5
jne 0x4060c1
mov ecx, ebp
call fcn.00405ee0
mov dword [ebp + 0x14], eax
jmp 0x4060c9
cmp byte [0x427550], bl
jne 0x4060e8
lea ecx, [esp + 0x18]
mov dword [ebp + 0x10], ebx
mov byte [esp + 0x140], bl
call fcn.0040b100
mov dword [esp + 0x140], esi
jmp 0x4062b7
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], bl
call fcn.0040b100
mov edi, 1
jmp 0x406171
push edi
call dword [sym.imp.USER32.dll_GetKeyboardType]
xor ecx, ecx
mov cl, ah
cmp cl, 0xd
jne 0x406112
mov dword [ebp + 0x1c], edi
mov eax, dword [ebp + 8]
mov dword [ebp], ebx
cmp eax, 4
jne 0x406125
cmp dword [ebp + 0xc], 0xa
jge 0x406127
cmp eax, eax
jle 0x40612a
mov dword [ebp + 4], edi
call fcn.00408860
add eax, 0x7148
cmp eax, 0xffff
jbe 0x40613e
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 0x406210
lea edx, [esp + 0x24]
push 0x80
push edx
push edi
push str.VersionNumber
push str.SoftwareMicrosoftWindowsCurrentVersion
push ebx
lea ecx, [esp + 0x28]
call fcn.0040b110
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 0x4061c0
mov cl, byte [eax - 1]
dec eax
cmp cl, 0x2e
jne 0x4061b7
inc eax
push eax
call fcn.00413500
mov ecx, dword [ebp + 8]
add esp, 4
cmp ecx, 4
jne 0x4061e8
cmp eax, 0x3b6
jle 0x4061ed
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x140], esi
jmp 0x4062b7
cmp eax, 0x3b6
jne 0x40624a
lea ecx, [esp + 0x14]
call fcn.0040b0f0
lea ecx, [esp + 0x14]
mov dword [ebp + 0x10], ebx
call fcn.0040b100
mov dword [esp + 0x140], esi
jmp 0x4062b7
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.00414040
add esp, 4
lea esi, [esp + 0x24]
jmp 0x40624e
mov esi, dword [esp + 0x14]
push 0xd
push str.service_pack
push esi
call fcn.00414000
add esp, 0xc
test eax, eax
jne 0x406297
movsx edx, byte [esi + 0xd]
add esi, 0xd
push edx
call fcn.00413610
add esp, 4
test eax, eax
je 0x406288
movsx eax, byte [esi + 1]
inc esi
push eax
call fcn.00413610
add esp, 4
test eax, eax
jne 0x406276
mov edx, dword [esp + 0x1c]
mov cl, byte [esi]
cmp cl, byte [edx]
jl 0x4062a5
mov dword [ebp + 0x10], ebx
jmp 0x4062ac
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x30
jne 0x4062a5
mov dword [ebp + 0x10], ebx
jmp 0x4062ac
mov dword [ebp + 0x10], 1
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.0040b100
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x134
ret