Function at 0x40f460
Capabilities:
Check os version
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d0bb1
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1d8
mov eax, dword [0x508164]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 8]
xorps xmm0, xmm0
push 0x118
mov dword [ebp - 0x184], eax
lea eax, [ebp - 0x174]
push 0
push eax
movups xmmword [ebp - 0x1cc], xmm0
mov dword [ebp - 0x1ac], 0
movups xmmword [ebp - 0x1bc], xmm0
call fcn.004a5f00
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x178]
add esp, 0xc
mov dword [ebp - 0x178], 0x11c
push eax
call esi
test eax, eax
jne 0x40f528
push 0x118
push eax
lea eax, [ebp - 0x174]
push eax
call fcn.004a5f00
add esp, 0xc
mov dword [ebp - 0x178], 0x114
lea eax, [ebp - 0x178]
push eax
call esi
test eax, eax
je 0x40f73a
push str.RtlGetNtVersionNumbers
push str.ntdll.dll
mov dword [ebp - 0x180], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40f5e6
lea ecx, [ebp - 0x16c]
push ecx
lea ecx, [ebp - 0x170]
push ecx
lea ecx, [ebp - 0x174]
push ecx
call eax
movzx eax, word [ebp - 0x16c]
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x17c]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x17c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40f5e6
lea eax, [ebp - 0x188]
mov dword [ebp - 0x188], 4
push eax
lea eax, [ebp - 0x180]
mov dword [ebp - 0x18c], 4
push eax
lea eax, [ebp - 0x18c]
push eax
push 0
push 0x4ea8cc
push dword [ebp - 0x17c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x17c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x174]
mov edi, dword [ebp - 0x170]
cmp esi, 6
jb 0x40f647
jne 0x40f5fe
cmp edi, 1
je 0x40f647
push 0x40
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.004a5f00
add esp, 0xc
lea eax, [ebp - 0x58]
push dword [ebp - 0x180]
push dword [ebp - 0x16c]
push edi
push esi
push str._d._d._d._d
push 0x40
push eax
call fcn.00429320
add esp, 0x1c
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x1a8]
push eax
call fcn.004834d0
mov dword [ebp - 4], 1
jmp 0x40f688
push 0x40
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.004a5f00
add esp, 0xc
lea eax, [ebp - 0x58]
push dword [ebp - 0x16c]
push edi
push esi
push str._d._d._d
push 0x40
push eax
call fcn.00429320
add esp, 0x18
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x1a8]
push eax
call fcn.004834d0
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x184]
lea eax, [ebp - 0x1a8]
push eax
push str.osversion
mov ecx, esi
call fcn.00483fc0
mov ecx, eax
call fcn.00483ad0
lea ecx, [ebp - 0x1a8]
mov dword [ebp - 4], 0xffffffff
call fcn.00483a60
push str.GetNativeSystemInfo
push 0x4ec3c0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40f6e0
lea ecx, [ebp - 0x1cc]
push ecx
call eax
jmp 0x40f6ed
lea eax, [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [ebp - 0x1cc], 9
mov ecx, 0x4ea4bc
mov eax, 0x4ea4b8
cmovne eax, ecx
lea ecx, [ebp - 0x1e8]
push eax
call fcn.004834d0
lea eax, [ebp - 0x1e8]
mov dword [ebp - 4], 2
push eax
push str.arch
mov ecx, esi
call fcn.00483fc0
mov ecx, eax
call fcn.00483ad0
lea ecx, [ebp - 0x1e8]
call fcn.00483a60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0048d8b2
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4