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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xfc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, eax
mov ecx, 0x27
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 ebx, eax
test ebx, ebx
jne 0x4147d4
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x94
call edi
test eax, eax
jne 0x4147d4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x28]
dec eax
je 0x4149f5
dec eax
jne 0x414a96
cmp dword [esp + 0x1c], 4
ja 0x414802
mov edi, dword [ebp + 8]
push str.Microsoft_Windows_NT
push edi
call fcn.0044c02b
mov esi, eax
add esp, 8
add esi, edi
mov eax, dword [esp + 0x1c]
mov edi, 5
cmp eax, edi
jne 0x414827
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x414827
push str.Microsoft_Windows_2000
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
test ebx, ebx
je 0x4148e4
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x414877
cmp dword [esp + 0x1c], edi
jne 0x414857
cmp dword [esp + 0x20], 1
jne 0x414857
push str.Microsoft_Windows_XP
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x41486d
push str.Home_Edition
jmp 0x414995
push str.Professional
jmp 0x414995
cmp al, 3
jne 0x4149a0
cmp dword [esp + 0x1c], edi
jne 0x41489c
cmp dword [esp + 0x20], 1
jne 0x41489c
push str.Microsoft_Windows_.NET
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
mov eax, dword [esp + 0xb0]
test al, al
jns 0x4148b1
push str.DataCenter_Server
jmp 0x414995
test al, 2
je 0x4148ca
cmp dword [esp + 0x1c], 4
je 0x414990
push str.Enterprise_Server
jmp 0x414995
cmp ax, 0x400
jne 0x4148da
push str.Web_Server
jmp 0x414995
push str.Server
jmp 0x414995
lea edx, [esp + 0x10]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.WS2_32.dll_bind
mov dword [esp + 0x28], 0x50
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0xbc]
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 edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0xb8]
push ecx
push str.WINNT
call edi
test eax, eax
jne 0x41495a
push str.Professional
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
lea edx, [esp + 0xb8]
push edx
push str.LANMANNT
call edi
test eax, eax
jne 0x41497d
push str.Server
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
lea eax, [esp + 0xb8]
push eax
push str.SERVERNT
call edi
test eax, eax
jne 0x4149a0
push str.Advanced_Server
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja 0x4149d2
mov ecx, dword [esp + 0x24]
and ecx, 0xffff
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x30]
push edx
push ecx
push eax
push str.version__d._d__s__Build__d_
push esi
call fcn.0044c02b
add esp, 0x18
jmp 0x414a8f
mov edx, dword [esp + 0x24]
and edx, 0xffff
push edx
lea eax, [esp + 0x30]
push eax
push str._s__Build__d_
push esi
call fcn.0044c02b
add esp, 0x10
jmp 0x414a8f
mov eax, dword [esp + 0x1c]
mov ebx, 4
cmp eax, ebx
jne 0x414a96
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x414a45
mov edi, dword [ebp + 8]
push str.Microsoft_Windows_95
push edi
call fcn.0044c02b
mov esi, eax
mov al, byte [esp + 0x35]
add esp, 8
add esi, edi
cmp al, 0x43
je 0x414a2f
cmp al, 0x42
jne 0x414a3f
push str.OSR2
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x414a91
cmp dword [esp + 0x20], 0xa
jne 0x414a7a
push str.Microsoft_Windows_98
push esi
call fcn.0044c02b
add esi, eax
mov al, byte [esp + 0x35]
add esp, 8
cmp al, 0x41
jne 0x414a74
push 0x463e64
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
cmp dword [esp + 0x1c], ebx
jne 0x414a91
cmp dword [esp + 0x20], 0x5a
jne 0x414a91
push str.Microsoft_Windows_Millennium_Edition
push esi
call fcn.0044c02b
add esp, 8
add esi, eax
cmp esi, dword [ebp + 8]
jne 0x414ab3
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 fcn.0044c02b
add esp, 0x14
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret