Function at 0x40e6a0
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 0x40e6f9
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push ecx
call edi
test eax, eax
jne 0x40e6f9
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 0x40e907
dec eax
jne 0x40e991
cmp dword [esp + 0x1c], 4
ja 0x40e727
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 0x40e74e
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40e74e
push str.Microsoft_Windows_2000
push esi
call edi
add esp, 8
add esi, eax
mov ecx, 5
test ebx, ebx
je 0x40e805
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x40e79b
cmp dword [esp + 0x1c], ecx
jne 0x40e77b
cmp dword [esp + 0x20], 1
jne 0x40e77b
push str.Microsoft_Windows_XP
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x40e791
push str.Home_Edition
jmp 0x40e8b0
push str.Professional
jmp 0x40e8b0
cmp al, 3
jne 0x40e8b8
cmp dword [esp + 0x1c], ecx
jne 0x40e7bd
cmp dword [esp + 0x20], 1
jne 0x40e7bd
push str.Microsoft_Windows_.NET
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test al, 0x80
je 0x40e7d2
push str.DataCenter_Server
jmp 0x40e8b0
test al, 2
je 0x40e7eb
cmp dword [esp + 0x1c], 4
je 0x40e8ab
push str.Enterprise_Server
jmp 0x40e8b0
cmp ax, 0x400
jne 0x40e7fb
push str.Web_Server
jmp 0x40e8b0
push 0x4dfd2c
jmp 0x40e8b0
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 0x40e878
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 0x40e898
push 0x4dfd2c
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 0x40e8b8
push str.Advanced_Server
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja 0x40e8e7
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 0x40e98b
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 0x40e98b
mov eax, dword [esp + 0x1c]
mov ebx, 4
cmp eax, ebx
jne 0x40e991
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40e94a
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 0x40e937
cmp al, 0x42
jne 0x40e944
push str.OSR2
push esi
call edi
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x40e98d
cmp dword [esp + 0x20], 0xa
jne 0x40e979
push str.Microsoft_Windows_98
push esi
call edi
add esi, eax
mov al, byte [esp + 0x35]
add esp, 8
cmp al, 0x41
jne 0x40e973
push 0x4dfc54
push esi
call edi
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x40e98d
cmp dword [esp + 0x20], 0x5a
jne 0x40e98d
push str.Microsoft_Windows_Millennium_Edition
push esi
call edi
add esp, 8
add esi, eax
cmp esi, ebp
jne 0x40e9ab
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