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

Disassembly:
push 0xffffffffffffffff
push 0x407406
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf8
push ebp
push esi
push edi
lea ecx, [esp + 0xc]
call fcn.00406994
mov esi, dword [esp + 0x114]
push 0x40ae74
mov ecx, esi
mov dword [esp + 0x110], 0
call fcn.00406a12
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x9c
call edi
mov ebp, eax
test ebp, ebp
jne 0x40571b
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push ecx
call edi
test eax, eax
jne 0x40571b
lea ecx, [esp + 0xc]
mov dword [esp + 0x10c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4059d1
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x40593b
dec eax
je 0x4058c2
dec eax
jne 0x405947
cmp dword [esp + 0x1c], 4
ja 0x405749
push str.WinNT
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
mov eax, dword [esp + 0x1c]
mov edi, 5
cmp eax, edi
jne 0x40579c
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x405770
push str.Win2000
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
cmp dword [esp + 0x1c], edi
jne 0x40579c
cmp dword [esp + 0x20], 1
jne 0x405789
push str.WinXP
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
cmp dword [esp + 0x1c], edi
jne 0x40579c
cmp dword [esp + 0x20], 2
jne 0x40579c
push str.Win2003
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
test ebp, ebp
je 0x4057fa
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x4057cb
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x4057c1
push str.Pers
jmp 0x4058a3
push str.Pro
jmp 0x4058a3
cmp al, 3
jne 0x4058aa
mov al, byte [esp + 0xb0]
test al, 0x80
je 0x4057e8
push str.DataCenterSrv
jmp 0x4058a3
test al, 2
jne 0x40589e
push str.Srv
jmp 0x4058a3
lea edx, [esp + 0x14]
mov dword [esp + 0x10], 0x50
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0xb4]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0xb4]
push ecx
push str.WINNT
call edi
test eax, eax
jne 0x40586c
push str.Pro
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
lea edx, [esp + 0xb4]
push edx
push str.LANMANNT
call edi
test eax, eax
jne 0x40588b
push str.Srv
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
lea eax, [esp + 0xb4]
push eax
push str.SERVERNT
call edi
test eax, eax
jne 0x4058aa
push str.AdvSrv
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
cmp dword [esp + 0x1c], 4
ja 0x4058bb
lea ecx, [esp + 0x2c]
push ecx
jmp 0x405940
lea edx, [esp + 0x2c]
push edx
jmp 0x405940
mov eax, dword [esp + 0x1c]
mov edi, 4
cmp eax, edi
jne 0x405947
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x405901
push str.Win95
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
mov al, byte [esp + 0x2d]
cmp al, 0x43
je 0x4058ef
cmp al, 0x42
jne 0x4058fb
push str.OSR2
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
cmp dword [esp + 0x1c], edi
jne 0x405947
cmp dword [esp + 0x20], 0xa
jne 0x40592d
push str.Win98
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
cmp byte [esp + 0x2d], 0x41
jne 0x405927
push 0x40a93c
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
cmp dword [esp + 0x1c], edi
jne 0x405947
cmp dword [esp + 0x20], 0x5a
jne 0x405947
push str.WinMe
jmp 0x405940
push str.Win32s
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
lea edx, [esp + 0x14]
push str.mj__d_mn__d
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
push esi
push ecx
call sub.MFC42.DLL_operator
push eax
mov ecx, esi
mov byte [esp + 0x110], 1
call fcn.00406a18
lea ecx, [esp + 0x10]
mov byte [esp + 0x10c], 0
call sub.MFC42.DLL_CString::CString
mov edx, dword [esi]
push edx
push str.OS_detected:__s_
push 0x40ab68
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov ecx, 0x40ac70
push 0x40ab68
call fcn.00406740
lea ecx, [esp + 0xc]
mov dword [esp + 0x10c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x104
ret 4