Function at 0x413020
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48777b
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x4ae498]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x15c], ecx
mov dword [ebp - 0x158], 0
mov dword [ebp - 0xac], 0x94
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xa8], 6
jae 0x413080
jmp 0x4133ad
push 0
push 0
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov ecx, dword [ebp - 0x15c]
mov dword [ecx + 0x17c], eax
mov edx, dword [ebp - 0x15c]
cmp dword [edx + 0x17c], 0
jne 0x413188
call fcn.00427fe0
test eax, eax
je 0x4130f8
push 0x494e54
lea ecx, [ebp - 0xc8]
call fcn.00401d70
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x158]
or eax, 1
mov dword [ebp - 0x158], eax
lea ecx, [ebp - 0xc8]
push ecx
call fcn.00429850
add esp, 4
mov dword [ebp - 0x160], 0
jmp 0x41313b
push str.LoadLibrary_user32.dll___This_really_shouldnt_have_happened
lea ecx, [ebp - 0xe4]
call fcn.00401d70
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x158]
or edx, 2
mov dword [ebp - 0x158], edx
lea eax, [ebp - 0xe4]
push eax
call fcn.00427fe0
mov ecx, eax
call fcn.00428c70
mov dword [ebp - 0x160], 0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x158]
and ecx, 2
je 0x41315f
and dword [ebp - 0x158], 0xfffffffd
lea ecx, [ebp - 0xe4]
call fcn.00401db0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x158]
and edx, 1
je 0x413183
and dword [ebp - 0x158], 0xfffffffe
lea ecx, [ebp - 0xc8]
call fcn.00401db0
jmp 0x4133ad
push str.ShutdownBlockReasonCreate
mov eax, dword [ebp - 0x15c]
mov ecx, dword [eax + 0x17c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x15c]
mov dword [edx + 0x180], eax
mov eax, dword [ebp - 0x15c]
cmp dword [eax + 0x180], 0
jne 0x413294
call fcn.00427fe0
test eax, eax
je 0x413209
push 0x494ef0
lea ecx, [ebp - 0x100]
call fcn.00401d70
mov dword [ebp - 4], 2
mov ecx, dword [ebp - 0x158]
or ecx, 4
mov dword [ebp - 0x158], ecx
lea edx, [ebp - 0x100]
push edx
call fcn.00429850
add esp, 4
mov dword [ebp - 0x164], 0
jmp 0x41324c
push str.GetProcAddress_ShutdownBlockReasonCreate__nFailed_to_load_Vista_specific_function
lea ecx, [ebp - 0x11c]
call fcn.00401d70
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x158]
or eax, 8
mov dword [ebp - 0x158], eax
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00427fe0
mov ecx, eax
call fcn.00428c70
mov dword [ebp - 0x164], 0
mov dword [ebp - 4], 2
mov edx, dword [ebp - 0x158]
and edx, 8
je 0x413270
and dword [ebp - 0x158], 0xfffffff7
lea ecx, [ebp - 0x11c]
call fcn.00401db0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x158]
and eax, 4
je 0x413294
and dword [ebp - 0x158], 0xfffffffb
lea ecx, [ebp - 0x100]
call fcn.00401db0
push str.ShutdownBlockReasonDestroy
mov ecx, dword [ebp - 0x15c]
mov edx, dword [ecx + 0x17c]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x15c]
mov dword [ecx + 0x184], eax
mov edx, dword [ebp - 0x15c]
cmp dword [edx + 0x184], 0
jne 0x4133a0
call fcn.00427fe0
test eax, eax
je 0x413315
push 0x494fb8
lea ecx, [ebp - 0x138]
call fcn.00401d70
mov dword [ebp - 4], 4
mov eax, dword [ebp - 0x158]
or eax, 0x10
mov dword [ebp - 0x158], eax
lea ecx, [ebp - 0x138]
push ecx
call fcn.00429850
add esp, 4
mov dword [ebp - 0x168], 0
jmp 0x413358
push str.GetProcAddress_ShutdownBlockReasonDestroy__nFailed_to_load_Vista_specific_function
lea ecx, [ebp - 0x154]
call fcn.00401d70
mov dword [ebp - 4], 5
mov edx, dword [ebp - 0x158]
or edx, 0x20
mov dword [ebp - 0x158], edx
lea eax, [ebp - 0x154]
push eax
call fcn.00427fe0
mov ecx, eax
call fcn.00428c70
mov dword [ebp - 0x168], 0
mov dword [ebp - 4], 4
mov ecx, dword [ebp - 0x158]
and ecx, 0x20
je 0x41337c
and dword [ebp - 0x158], 0xffffffdf
lea ecx, [ebp - 0x154]
call fcn.00401db0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x158]
and edx, 0x10
je 0x4133a0
and dword [ebp - 0x158], 0xffffffef
lea ecx, [ebp - 0x138]
call fcn.00401db0
mov eax, dword [ebp - 0x15c]
mov byte [eax + 0x178], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046aaed
mov esp, ebp
pop ebp
ret