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

Disassembly:
sub esp, 0xf4
push ebx
push ebp
mov ebp, dword [esp + 0x100]
push esi
push edi
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 esi, ebp
mov dword [esp + 0x1c], 0x9c
call edi
mov ebx, eax
test ebx, ebx
jne 0x40e749
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push ecx
call edi
test eax, eax
jne 0x40e749
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret
mov eax, dword [esp + 0x28]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
dec eax
je 0x40e957
dec eax
jne 0x40e9e1
cmp dword [esp + 0x1c], 4
ja 0x40e777
push str.Microsoft_Windows_NT
push ebp
call edi
mov esi, eax
add esp, 8
add esi, ebp
mov eax, dword [esp + 0x1c]
mov ecx, 5
cmp eax, ecx
jne 0x40e79e
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40e79e
push str.Microsoft_Windows_2000
push esi
call edi
add esp, 8
add esi, eax
mov ecx, 5
test ebx, ebx
je 0x40e855
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x40e7eb
cmp dword [esp + 0x1c], ecx
jne 0x40e7cb
cmp dword [esp + 0x20], 1
jne 0x40e7cb
push str.Microsoft_Windows_XP
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x40e7e1
push str.Home_Edition
jmp 0x40e900
push str.Professional
jmp 0x40e900
cmp al, 3
jne 0x40e908
cmp dword [esp + 0x1c], ecx
jne 0x40e80d
cmp dword [esp + 0x20], 1
jne 0x40e80d
push str.Microsoft_Windows_.NET
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test al, 0x80
je 0x40e822
push str.DataCenter_Server
jmp 0x40e900
test al, 2
je 0x40e83b
cmp dword [esp + 0x1c], 4
je 0x40e8fb
push str.Enterprise_Server
jmp 0x40e900
cmp ax, 0x400
jne 0x40e84b
push str.Web_Server
jmp 0x40e900
push 0x4dfd34
jmp 0x40e900
lea edx, [esp + 0x10]
mov dword [esp + 0x14], 0x50
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
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 + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0xb4]
push ecx
push str.WINNT
call ebx
test eax, eax
jne 0x40e8c8
push str.Professional
push esi
call edi
add esp, 8
add esi, eax
lea edx, [esp + 0xb4]
push edx
push str.LANMANNT
call ebx
test eax, eax
jne 0x40e8e8
push 0x4dfd34
push esi
call edi
add esp, 8
add esi, eax
lea eax, [esp + 0xb4]
push eax
push str.SERVERNT
call ebx
test eax, eax
jne 0x40e908
push str.Advanced_Server
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja 0x40e937
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x2c]
and ecx, 0xffff
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
push eax
push str.version__d._d__s__Build__d_
push esi
call edi
add esp, 0x18
jmp 0x40e9db
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
and edx, 0xffff
push edx
push eax
push str._s__Build__d_
push esi
call edi
add esp, 0x10
jmp 0x40e9db
mov eax, dword [esp + 0x1c]
mov ebx, 4
cmp eax, ebx
jne 0x40e9e1
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40e99a
push str.Microsoft_Windows_95
push ebp
call edi
mov esi, eax
mov al, byte [esp + 0x35]
add esp, 8
add esi, ebp
cmp al, 0x43
je 0x40e987
cmp al, 0x42
jne 0x40e994
push str.OSR2
push esi
call edi
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x40e9dd
cmp dword [esp + 0x20], 0xa
jne 0x40e9c9
push str.Microsoft_Windows_98
push esi
call edi
add esi, eax
mov al, byte [esp + 0x35]
add esp, 8
cmp al, 0x41
jne 0x40e9c3
push 0x4dfc5c
push esi
call edi
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x40e9dd
cmp dword [esp + 0x20], 0x5a
jne 0x40e9dd
push str.Microsoft_Windows_Millennium_Edition
push esi
call edi
add esp, 8
add esi, eax
cmp esi, ebp
jne 0x40e9fb
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
push str._d._d_build__d
push esi
call edi
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xf4
ret