Function at 0x402070
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x42ad46
mov eax, dword fs:[0]
push eax
sub esp, 0x1f0
mov eax, dword [0x437050]
xor eax, esp
mov dword [esp + 0x1ec], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x437050]
xor eax, esp
push eax
lea eax, [esp + 0x204]
mov dword fs:[0], eax
mov eax, dword [esp + 0x214]
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov dword [esp + 0x21c], ebx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x402171
mov ebp, dword [esp + 0x14]
push 0xc8
lea edx, [esp + 0x13a]
push ebx
push edx
mov dword [esp + 0x24], ebp
mov word [esp + 0x140], bx
call fcn.0041c410
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea edi, [esp + 0x18]
lea esi, [esp + 0x138]
mov dword [esp + 0x18], 0x64
call fcn.00405d70
cmp ebp, ebx
je 0x402144
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebp, ebp
mov dword [esp + 0x18], ebp
cmp word [esp + 0x134], bx
je 0x402171
mov esi, dword [esp + 0x1c]
push esi
lea ecx, [esp + 0x138]
call fcn.004043b0
cmp ebp, ebx
je 0x40216a
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x40230f
mov edx, dword [0x43832c]
mov eax, dword [edx + 0xc]
mov ecx, 0x43832c
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x110
lea ecx, [esp + 0x28]
push ebx
mov byte [esp + 0x214], 1
push ecx
mov dword [esp + 0x2c], 0x114
call fcn.0041c410
add esp, 0xc
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [esp + 0x30]
sub eax, ebx
je 0x4022bd
sub eax, 1
je 0x402245
sub eax, 1
jne 0x4022cb
mov eax, dword [esp + 0x24]
cmp eax, 4
ja 0x4021e3
mov edx, str.Microsoft_Windows_NT
jmp 0x4022c2
cmp eax, 5
jne 0x402218
mov eax, dword [esp + 0x28]
cmp eax, ebx
jne 0x4021fa
mov edx, str.Microsoft_Windows_2000
jmp 0x4022c2
cmp eax, 1
jne 0x402209
mov edx, str.Microsoft_Windows_XP
jmp 0x4022c2
cmp eax, 2
jne 0x40223e
mov edx, str.Microsoft_Windows_Server_2003
jmp 0x4022c2
cmp eax, 6
jne 0x40223e
mov eax, dword [esp + 0x28]
cmp eax, ebx
jne 0x40222f
mov edx, str.Microsoft_Windows_Vista
jmp 0x4022c2
cmp eax, 1
jne 0x40223e
mov edx, str.Microsoft_Windows_Longhorn_Server
jmp 0x4022c2
mov edx, str.Microsoft_Windows_Vista_Later
jmp 0x4022c2
cmp dword [esp + 0x24], 4
jne 0x4022b6
mov eax, dword [esp + 0x28]
cmp eax, ebx
jne 0x402283
mov edx, str.Microsoft_Windows_95
lea edi, [esp + 0x14]
call fcn.00401800
mov ax, word [esp + 0x36]
cmp ax, 0x43
je 0x402273
cmp ax, 0x42
jne 0x4022cb
mov edx, str._OSR2
lea edi, [esp + 0x14]
call fcn.00404460
jmp 0x4022cb
cmp eax, 0xa
jne 0x4022aa
mov edx, str.Microsoft_Windows_98
lea edi, [esp + 0x14]
call fcn.00401800
cmp word [esp + 0x36], 0x41
jne 0x4022cb
mov edx, 0x42e104
call fcn.00404460
jmp 0x4022cb
cmp eax, 0x5a
jne 0x4022b6
mov edx, str.Microsoft_Windows_Me
jmp 0x4022c2
mov edx, str.Microsoft_Windows_Me_later
jmp 0x4022c2
mov edx, str.Microsoft_Win32s
lea edi, [esp + 0x14]
call fcn.00401800
mov esi, dword [esp + 0x14]
add esi, 0xfffffff0
mov eax, esi
call fcn.00401da0
mov edi, dword [esp + 0x1c]
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0x20c], bl
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402302
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
cmp ebp, ebx
je 0x40230d
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov ecx, dword [esp + 0x204]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1ec]
xor ecx, esp
call fcn.0041a2d1
add esp, 0x1fc
ret