Function at 0x4ca370
Capabilities:
Check if file exists
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56c778
mov eax, dword fs:[0]
push eax
sub esp, 0x998
mov eax, dword [0x5c5ebc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x988], 0
lea ecx, [ebp - 0x82c]
call fcn.00415d60
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x820]
call fcn.00415d60
mov byte [ebp - 4], 1
push 0x11c
push 0
lea eax, [ebp - 0x974]
push eax
call fcn.005281f0
add esp, 0xc
mov dword [ebp - 0x974], 0x11c
lea ecx, [ebp - 0x974]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 0x818], eax
cmp dword [ebp - 0x818], 0
jne 0x4ca462
mov dword [ebp - 0x974], 0x114
lea edx, [ebp - 0x974]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4ca462
push 0x58be70
mov ecx, dword [ebp + 8]
call fcn.00415da0
mov eax, dword [ebp - 0x988]
or eax, 1
mov dword [ebp - 0x988], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x820]
call fcn.00415e20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x82c]
call fcn.00415e20
mov eax, dword [ebp + 8]
jmp 0x4ca78d
mov ecx, dword [ebp - 0x964]
mov dword [ebp - 0x98c], ecx
cmp dword [ebp - 0x98c], 2
je 0x4ca47c
jmp 0x4ca52e
cmp dword [ebp - 0x970], 5
jne 0x4ca49e
cmp dword [ebp - 0x96c], 2
jne 0x4ca49e
push str.Microsoft_Windows_Server_2003_
lea ecx, [ebp - 0x820]
call fcn.00415e60
cmp dword [ebp - 0x970], 5
jne 0x4ca4c0
cmp dword [ebp - 0x96c], 1
jne 0x4ca4c0
push str.Microsoft_Windows_XP
lea ecx, [ebp - 0x820]
call fcn.00415e60
cmp dword [ebp - 0x970], 5
jne 0x4ca4e2
cmp dword [ebp - 0x96c], 0
jne 0x4ca4e2
push str.Microsoft_Windows_2000
lea ecx, [ebp - 0x820]
call fcn.00415e60
cmp dword [ebp - 0x970], 4
ja 0x4ca4fb
push str.Microsoft_Windows_NT
lea ecx, [ebp - 0x820]
call fcn.0042e0f0
lea ecx, [ebp - 0x820]
call fcn.00415f90
test eax, eax
jne 0x4ca52c
mov edx, dword [ebp - 0x96c]
push edx
mov eax, dword [ebp - 0x970]
push eax
push str.Windows__d._d
lea ecx, [ebp - 0x820]
push ecx
call fcn.004171c0
add esp, 0x10
jmp 0x4ca549
mov edx, dword [ebp - 0x964]
push edx
push str.PlatformId__u
lea eax, [ebp - 0x820]
push eax
call fcn.004171c0
add esp, 0xc
lea ecx, [ebp - 0x81c]
call fcn.00415d60
mov byte [ebp - 4], 2
push str.C:WindowsSysWOW64
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ca579
push str._x64
lea ecx, [ebp - 0x81c]
call fcn.00415e60
jmp 0x4ca589
push str._x86
lea ecx, [ebp - 0x81c]
call fcn.00415e60
lea ecx, [ebp - 0x828]
call fcn.00415d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x81c]
push ecx
lea edx, [ebp - 0x820]
push edx
lea eax, [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x97c]
push ecx
call fcn.0043b320
add esp, 0xc
mov dword [ebp - 0x990], eax
mov edx, dword [ebp - 0x990]
mov dword [ebp - 0x994], edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x994]
push eax
lea ecx, [ebp - 0x980]
push ecx
call fcn.0043b320
add esp, 0xc
mov dword [ebp - 0x998], eax
mov edx, dword [ebp - 0x998]
mov dword [ebp - 0x99c], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x99c]
push eax
lea ecx, [ebp - 0x828]
call fcn.00415e40
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x980]
call fcn.00415e20
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x97c]
call fcn.00415e20
lea ecx, [ebp - 0x850]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x400
lea edx, [ebp - 0x814]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x2e
lea eax, [ebp - 0x814]
push eax
call fcn.004111d0
add esp, 8
xor ecx, ecx
mov word [eax], cx
push 0x5c
lea edx, [ebp - 0x814]
push edx
call fcn.004111d0
add esp, 8
add eax, 2
push eax
lea ecx, [ebp - 0x978]
call fcn.00415da0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x978]
call fcn.0043b2a0
lea ecx, [ebp - 0x824]
call fcn.00415d60
mov byte [ebp - 4], 7
push 3
lea eax, [ebp - 0x984]
push eax
call fcn.004d1490
add esp, 8
mov dword [ebp - 0x9a0], eax
mov ecx, dword [ebp - 0x9a0]
mov dword [ebp - 0x9a4], ecx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x9a4]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x84c]
push ecx
push str.__PageSize__d___s
lea edx, [ebp - 0x824]
push edx
call fcn.004171c0
add esp, 0x10
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x984]
call fcn.00415e20
lea eax, [ebp - 0x824]
push eax
lea ecx, [ebp - 0x828]
call fcn.004115f0
lea ecx, [ebp - 0x828]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00415d80
mov edx, dword [ebp - 0x988]
or edx, 1
mov dword [ebp - 0x988], edx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x824]
call fcn.00415e20
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x978]
call fcn.00415e20
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x828]
call fcn.00415e20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x81c]
call fcn.00415e20
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x820]
call fcn.00415e20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x82c]
call fcn.00415e20
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00527aad
mov esp, ebp
pop ebp
ret