Function at 0x465489
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
mov eax, 0x4e39f7
call fcn.004daf98
sub esp, 0x1c
mov eax, dword [0x51e6c8]
push ebx
push esi
push edi
mov ecx, 0x51e6c8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
and dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push eax
push str._x_
lea eax, [ebp - 0x14]
call fcn.00408fb3
pop ecx
pop ecx
lea eax, [ebp - 0x1c]
push eax
call fcn.00465260
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00408d0a
pop ecx
pop ecx
mov esi, dword [ebp + 8]
lea ebx, [esi + 0x5e0]
mov edi, ebx
mov byte [ebp - 4], 2
call fcn.00407a9f
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.0040763c
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040763c
add esi, 0x5c0
call fcn.00477fdd
test eax, eax
je 0x46563f
cmp dword [esi + 8], 0x100000
jb 0x46563f
call fcn.0047808c
test eax, eax
jne 0x46554c
mov ebx, esi
call fcn.004780e4
test eax, eax
mov ebx, edi
je 0x46563f
cmp dword [esi + 8], 0x1e00000
mov dword [esi + 0x14], 1
ja 0x465561
call fcn.00477d4a
push dword [ebx]
mov ecx, esi
push 0
call fcn.00477e17
lea eax, [ebp - 0x18]
push 0x4f4a38
push eax
mov ecx, ebx
call fcn.0040b374
lea ecx, [ebp - 0x1c]
push 0x520088
push ecx
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.00408d0a
add esp, 0x10
push eax
push ecx
mov byte [ebp - 4], 4
call fcn.00478d78
pop ecx
mov ecx, eax
call fcn.00478dd8
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040763c
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.0040763c
push dword [ebx]
lea eax, [ebp - 0x24]
push eax
call fcn.0046437f
pop ecx
pop ecx
mov byte [ebp - 4], 5
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
call fcn.00478d78
mov esi, dword [eax + 0x14]
call fcn.00478d78
mov edi, dword [eax + 0x10]
call fcn.00478d78
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], eax
call fcn.00478d78
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
call fcn.00478d78
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
call fcn.0045f77e
mov ecx, dword [ebp - 0x1c]
push dword [ebp - 0x20]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x18]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], esi
add eax, 0x18
push eax
call fcn.004080b5
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.0040763c
mov edi, dword [ebp + 8]
call fcn.00466c6c
push edi
call fcn.00466dde
call fcn.00464c62
push edi
call fcn.00465326
lea eax, [ebp - 0x10]
push str._res
push eax
mov ecx, ebx
call fcn.0040b374
pop ecx
pop ecx
mov byte [ebp - 4], 6
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x465696
mov esi, dword [ebp - 0x10]
call fcn.004143b8
push esi
push eax
call fcn.004080b5
call fcn.0041567b
mov ebx, eax
call fcn.004157dc
call fcn.0046baf1
call fcn.0046b882
call fcn.0046b486
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.0040763c
push 0
push 0x26
lea esi, [edi + 0x5b4]
push 0x104
call fcn.004078e4
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, eax
mov eax, dword [esi]
test eax, eax
je 0x4656e0
push eax
call fcn.0049795c
pop ecx
mov edx, esi
call fcn.004078c3
test edi, edi
jne 0x4656f6
push str.c:program_files
push esi
call fcn.004080b5
push 0x4f4a38
push esi
call fcn.00408f40
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x9c0]
push dword [eax - 0xc]
push eax
mov eax, esi
call fcn.00408dba
lea esi, [edi + 0x1064]
call fcn.0045c21d
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.0040763c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4