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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
push esi
push edi
push 1
push 0x200
call sub.MSVCRT.dll_calloc
mov edi, dword [ebp + 8]
mov esi, 0x9c
mov dword [ebp - 4], eax
push esi
and byte [edi], 0
lea eax, [ebp - 0xa4]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x14
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push eax
call esi
test eax, eax
mov dword [ebp + 8], eax
jne 0x40a885
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0x94
push eax
call esi
test eax, eax
jne 0x40a885
push str.Unknown_OS
push edi
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [ebp - 0x94]
sub eax, 0
je 0x40ac5d
dec eax
je 0x40abcd
dec eax
jne 0x40ac6a
push 5
pop esi
cmp dword [ebp - 0xa0], esi
jne 0x40a8ff
cmp dword [ebp - 0x9c], 2
jne 0x40a8cb
push str.Microsoft_Windows_Server_2003_family_
push edi
call sub.MSVCRT.dll_strcat
cmp dword [ebp - 0xa0], esi
pop ecx
pop ecx
jne 0x40a8ff
cmp dword [ebp - 0x9c], 1
jne 0x40a8e9
push str.Microsoft_Windows_XP
push edi
call sub.MSVCRT.dll_strcat
cmp dword [ebp - 0xa0], esi
pop ecx
pop ecx
jne 0x40a8ff
cmp dword [ebp - 0x9c], 0
jne 0x40a915
push str.Microsoft_Windows_2000
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
cmp dword [ebp - 0xa0], 4
ja 0x40a915
push str.Microsoft_Windows_NT
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
xor eax, eax
cmp dword [ebp + 8], eax
je 0x40a9e3
cmp byte [ebp - 0xa], 1
jne 0x40a950
cmp dword [ebp - 0xa0], 4
jne 0x40a939
push str.Workstation_4.0
jmp 0x40a9cf
test byte [ebp - 0xb], 2
je 0x40a949
push str.Home_Edition
jmp 0x40a9cf
push str.Professional
jmp 0x40a9cf
cmp byte [ebp - 0xa], 3
jne 0x40aade
cmp dword [ebp - 0xa0], esi
jne 0x40a9c4
cmp dword [ebp - 0x9c], 2
jne 0x40a99b
test byte [ebp - 0xc], 0x80
je 0x40a978
push str.Datacenter_Edition
jmp 0x40a9cf
test byte [ebp - 0xc], 2
je 0x40a985
push str.Enterprise_Edition
jmp 0x40a9cf
cmp word [ebp - 0xc], 0x400
jne 0x40a994
push str.Web_Edition
jmp 0x40a9cf
push str.Standard_Edition
jmp 0x40a9cf
cmp dword [ebp - 0x9c], eax
jne 0x40a9c4
test byte [ebp - 0xc], 0x80
je 0x40a9b0
push str.Datacenter_Server
jmp 0x40a9cf
test byte [ebp - 0xc], 2
je 0x40a9bd
push str.Advanced_Server
jmp 0x40a9cf
push str.Server
jmp 0x40a9cf
test byte [ebp - 0xc], 2
je 0x40a9dc
push str.Server_4.0__Enterprise_Edition
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
jmp 0x40aade
push str.Server_4.0
jmp 0x40a9cf
push 0x50
lea ecx, [ebp + 8]
pop esi
push ecx
push 1
push eax
push str.SYSTEMCurrentControlSetControlProductOptions
push 0x80000002
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40aa1f
push str.Unknown_OS
push edi
call sub.MSVCRT.dll_strcpy
push dword [ebp - 4]
call sub.MSVCRT.dll_free
add esp, 0xc
jmp 0x40ac73
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xf4]
push eax
push 0
push 0
push str.ProductType
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40aba9
cmp dword [ebp - 8], esi
ja 0x40aba9
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0xf4]
push eax
push str.WINNT
call esi
test eax, eax
jne 0x40aa7b
push str.Workstation
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0xf4]
push eax
push str.LANMANNT
call esi
test eax, eax
jne 0x40aa9a
push str.Server
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0xf4]
push eax
push str.SERVERNT
call esi
test eax, eax
jne 0x40aab9
push str.Advanced_Server
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
push str._d._d
push dword [ebp - 4]
call sub.MSVCRT.dll_sprintf
push dword [ebp - 4]
push edi
call sub.MSVCRT.dll_strcat
add esp, 0x18
cmp dword [ebp - 0xa0], 4
jne 0x40ab78
lea eax, [ebp - 0x90]
push str.Service_Pack_6
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40ab78
lea eax, [ebp + 8]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
mov eax, dword [ebp - 0x98]
jne 0x40ab44
and eax, 0xffff
push eax
push str.Service_Pack_6a__Build__d_
push dword [ebp - 4]
call sub.MSVCRT.dll_sprintf
push dword [ebp - 4]
push edi
call sub.MSVCRT.dll_strcat
add esp, 0x14
jmp 0x40ab6a
and eax, 0xffff
push eax
lea eax, [ebp - 0x90]
push eax
push str._s__Build__d_
push dword [ebp - 4]
call sub.MSVCRT.dll_sprintf
push dword [ebp - 4]
push edi
call sub.MSVCRT.dll_strcat
add esp, 0x18
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40ac6a
mov eax, dword [ebp - 0x98]
and eax, 0xffff
push eax
lea eax, [ebp - 0x90]
push eax
push str._s__Build__d_
push dword [ebp - 4]
call sub.MSVCRT.dll_sprintf
push dword [ebp - 4]
push edi
call sub.MSVCRT.dll_strcat
add esp, 0x18
jmp 0x40ac6a
push str.Unknown_OS
push edi
call sub.MSVCRT.dll_strcpy
push dword [ebp - 4]
call sub.MSVCRT.dll_free
add esp, 0xc
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40ac73
cmp dword [ebp - 0xa0], 4
jne 0x40ac6a
cmp dword [ebp - 0x9c], 0
jne 0x40ac18
push str.Microsoft_Windows_95
push edi
call sub.MSVCRT.dll_strcat
cmp byte [ebp - 0x8f], 0x43
pop ecx
pop ecx
je 0x40ac02
cmp byte [ebp - 0x8f], 0x42
jne 0x40ac0f
push str.OSR2
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
cmp dword [ebp - 0xa0], 4
jne 0x40ac6a
cmp dword [ebp - 0x9c], 0xa
jne 0x40ac4d
push str.Microsoft_Windows_98
push edi
call sub.MSVCRT.dll_strcat
cmp byte [ebp - 0x8f], 0x41
pop ecx
pop ecx
jne 0x40ac44
push 0x40eda0
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
cmp dword [ebp - 0xa0], 4
jne 0x40ac6a
cmp dword [ebp - 0x9c], 0x5a
jne 0x40ac6a
push str.Microsoft_Windows_Millennium_Edition
jmp 0x40ac62
push str.Microsoft_Win32s
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push dword [ebp - 4]
call sub.MSVCRT.dll_free
pop ecx
pop edi
pop esi
leave
ret