Function at 0x40e9b0
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 0x40ea09
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push ecx
call edi
test eax, eax
jne 0x40ea09
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 0x40ec17
dec eax
jne 0x40eca1
cmp dword [esp + 0x1c], 4
ja 0x40ea37
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 0x40ea5e
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40ea5e
push str.Microsoft_Windows_2000
push esi
call edi
add esp, 8
add esi, eax
mov ecx, 5
test ebx, ebx
je 0x40eb15
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x40eaab
cmp dword [esp + 0x1c], ecx
jne 0x40ea8b
cmp dword [esp + 0x20], 1
jne 0x40ea8b
push str.Microsoft_Windows_XP
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x40eaa1
push str.Home_Edition
jmp 0x40ebc0
push str.Professional
jmp 0x40ebc0
cmp al, 3
jne 0x40ebc8
cmp dword [esp + 0x1c], ecx
jne 0x40eacd
cmp dword [esp + 0x20], 1
jne 0x40eacd
push str.Microsoft_Windows_.NET
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test al, 0x80
je 0x40eae2
push str.DataCenter_Server
jmp 0x40ebc0
test al, 2
je 0x40eafb
cmp dword [esp + 0x1c], 4
je 0x40ebbb
push str.Enterprise_Server
jmp 0x40ebc0
cmp ax, 0x400
jne 0x40eb0b
push str.Web_Server
jmp 0x40ebc0
push 0x4e0d34
jmp 0x40ebc0
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 0x40eb88
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 0x40eba8
push 0x4e0d34
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 0x40ebc8
push str.Advanced_Server
push esi
call edi
add esp, 8
add esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja 0x40ebf7
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 0x40ec9b
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 0x40ec9b
mov eax, dword [esp + 0x1c]
mov ebx, 4
cmp eax, ebx
jne 0x40eca1
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40ec5a
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 0x40ec47
cmp al, 0x42
jne 0x40ec54
push str.OSR2
push esi
call edi
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x40ec9d
cmp dword [esp + 0x20], 0xa
jne 0x40ec89
push str.Microsoft_Windows_98
push esi
call edi
add esi, eax
mov al, byte [esp + 0x35]
add esp, 8
cmp al, 0x41
jne 0x40ec83
push 0x4e0c5c
push esi
call edi
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x40ec9d
cmp dword [esp + 0x20], 0x5a
jne 0x40ec9d
push str.Microsoft_Windows_Millennium_Edition
push esi
call edi
add esp, 8
add esi, eax
cmp esi, ebp
jne 0x40ecbb
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