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

Disassembly:
push 0xffffffffffffffff
push 0x407936
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf8
push ebx
push ebp
mov ebx, ecx
push esi
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov esi, dword [esp + 0x118]
push 0x40aabc
mov ecx, esi
mov dword [esp + 0x114], 0
call fcn.004068c8
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0x9c
call edi
mov ebp, eax
test ebp, ebp
jne 0x40593e
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x94
push ecx
call edi
test eax, eax
jne 0x40593e
lea ecx, [esp + 0x10]
mov dword [esp + 0x110], 0xffffffff
call fcn.004068bc
xor eax, eax
jmp 0x405bf1
mov eax, dword [esp + 0x2c]
sub eax, 0
je 0x405b5e
dec eax
je 0x405ae5
dec eax
jne 0x405b6a
cmp dword [esp + 0x20], 4
ja 0x40596c
push str.WinNT
mov ecx, esi
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0x20]
mov edi, 5
cmp eax, edi
jne 0x4059bf
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x405993
push str.Win2000
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp dword [esp + 0x20], edi
jne 0x4059bf
cmp dword [esp + 0x24], 1
jne 0x4059ac
push str.WinXP
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp dword [esp + 0x20], edi
jne 0x4059bf
cmp dword [esp + 0x24], 2
jne 0x4059bf
push str.Win2003
mov ecx, esi
call sub.MFC42.DLL_CString::operator
test ebp, ebp
je 0x405a1d
mov al, byte [esp + 0xb6]
cmp al, 1
jne 0x4059ee
mov eax, dword [esp + 0xb4]
test ah, 2
je 0x4059e4
push str.Pers
jmp 0x405ac6
push str.Pro
jmp 0x405ac6
cmp al, 3
jne 0x405acd
mov al, byte [esp + 0xb4]
test al, 0x80
je 0x405a0b
push str.DataCenterSrv
jmp 0x405ac6
test al, 2
jne 0x405ac1
push str.Srv
jmp 0x405ac6
lea edx, [esp + 0x18]
mov dword [esp + 0x14], 0x50
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
lea ecx, [esp + 0xb8]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0xb8]
push ecx
push str.WINNT
call edi
test eax, eax
jne 0x405a8f
push str.Pro
mov ecx, esi
call sub.MFC42.DLL_CString::operator
lea edx, [esp + 0xb8]
push edx
push str.LANMANNT
call edi
test eax, eax
jne 0x405aae
push str.Srv
mov ecx, esi
call sub.MFC42.DLL_CString::operator
lea eax, [esp + 0xb8]
push eax
push str.SERVERNT
call edi
test eax, eax
jne 0x405acd
push str.AdvSrv
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp dword [esp + 0x20], 4
ja 0x405ade
lea ecx, [esp + 0x30]
push ecx
jmp 0x405b63
lea edx, [esp + 0x30]
push edx
jmp 0x405b63
mov eax, dword [esp + 0x20]
mov edi, 4
cmp eax, edi
jne 0x405b6a
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x405b24
push str.Win95
mov ecx, esi
call sub.MFC42.DLL_CString::operator
mov al, byte [esp + 0x31]
cmp al, 0x43
je 0x405b12
cmp al, 0x42
jne 0x405b1e
push str.OSR2
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp dword [esp + 0x20], edi
jne 0x405b6a
cmp dword [esp + 0x24], 0xa
jne 0x405b50
push str.Win98
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp byte [esp + 0x31], 0x41
jne 0x405b4a
push 0x40a7ec
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp dword [esp + 0x20], edi
jne 0x405b6a
cmp dword [esp + 0x24], 0x5a
jne 0x405b6a
push str.WinMe
jmp 0x405b63
push str.Win32s
mov ecx, esi
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
lea edx, [esp + 0x18]
push str.mj__d_mn__d
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push esi
push ecx
call sub.MFC42.DLL_operator
push eax
mov ecx, esi
mov byte [esp + 0x114], 1
call fcn.004069d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x110], 0
call fcn.004068bc
mov edx, dword [esi]
push edx
push str.OS:__s_
push 0x40aab0
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov ecx, ebx
push 0x40aab0
call fcn.00405750
lea ecx, [esp + 0x10]
mov dword [esp + 0x110], 0xffffffff
call fcn.004068bc
mov eax, 1
mov ecx, dword [esp + 0x108]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x104
ret 4