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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1d4
mov eax, dword [0x43f194]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push edi
mov dword [esp + 0x1dc], eax
xor eax, eax
mov ecx, 0x47
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
xor ebx, ebx
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], 0x11c
call esi
mov edi, eax
cmp edi, ebx
jne 0x406544
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x114
call esi
test eax, eax
je 0x406742
mov eax, dword [esp + 0x28]
dec eax
je 0x406757
dec eax
jne 0x406757
mov eax, dword [esp + 0x1c]
mov esi, 5
cmp eax, esi
jne 0x4065df
mov ecx, dword [esp + 0x20]
mov eax, 2
cmp ecx, eax
jne 0x40658f
push str.M1005Install.NTx86
push 0x440060
mov dword [0x44236c], eax
call fcn.004115e7
mov eax, dword [esp + 0x24]
add esp, 8
cmp eax, esi
jne 0x4065df
mov eax, dword [esp + 0x20]
mov esi, 1
cmp eax, esi
jne 0x4065bb
push str.M1005Install_XP
push 0x440060
mov dword [esp + 0x1c], esi
call fcn.004115e7
mov eax, dword [esp + 0x24]
add esp, 8
cmp eax, 5
jne 0x4065e4
cmp dword [esp + 0x20], ebx
jne 0x4065e4
push str.M1005Install.NTx86
push 0x440060
mov dword [esp + 0x18], esi
mov dword [0x44236c], esi
call fcn.004115e7
add esp, 8
jmp 0x4065e4
mov esi, 1
cmp edi, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x406658
cmp byte [esp + 0x132], 1
jne 0x4066f6
mov ecx, dword [esp + 0x1c]
mov eax, 4
cmp ecx, eax
je 0x4066fd
mov ecx, dword [esp + 0x130]
test ch, 2
je 0x406638
cmp dword [esp + 0x14], esi
jne 0x4066f6
mov dword [0x44236c], 3
jmp 0x4066f6
cmp dword [esp + 0x14], esi
jne 0x406643
mov dword [0x44236c], eax
cmp dword [esp + 0x10], esi
jne 0x4066f6
mov dword [0x44236c], esi
jmp 0x4066f6
lea edx, [esp + 0x14]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
mov esi, 0x50
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], esi
call edi
test eax, eax
jne 0x406742
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x13c]
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406742
cmp dword [esp + 0x10], esi
ja 0x406742
mov eax, dword [esp + 0x14]
push eax
call ebx
lea ecx, [esp + 0x138]
push ecx
push str.WINNT
call fcn.00412da1
lea edx, [esp + 0x140]
push edx
push str.LANMANNT
call fcn.00412da1
lea eax, [esp + 0x148]
push eax
push str.SERVERNT
call fcn.00412da1
add esp, 0x18
mov esi, 1
cmp dword [esp + 0x1c], 4
jne 0x40675c
lea ecx, [esp + 0x2c]
push str.Service_Pack_6
push ecx
call fcn.00412da1
add esp, 8
test eax, eax
jne 0x40675c
lea edx, [esp + 0x10]
push edx
push esi
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov eax, dword [esp + 0x10]
push eax
call ebx
mov eax, esi
mov ecx, dword [esp + 0x1dc]
call fcn.00411bef
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [esp + 0x1dc]
call fcn.00411bef
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 1
mov ecx, dword [esp + 0x1dc]
mov eax, esi
call fcn.00411bef
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret