Function at 0x4a1fd0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56a3d4
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
mov eax, dword [0x5d6b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov ecx, eax
mov dword [ebp - 0xc0], eax
call fcn.0045abd0
mov dword [ebp - 0xb0], 0
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4a2036
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xb8], eax
mov dword [ebp - 4], 0
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4a2069
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xb8]
mov byte [ebp - 4], 1
push eax
mov ecx, edi
call fcn.004a3c40
mov esi, dword [ebp - 0xb8]
or ebx, 0xffffffff
test eax, eax
je 0x4a2335
cmp dword [esi - 0xc], 0
je 0x4a2335
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0xb4]
call fcn.0045a580
push 1
push 0x57e140
lea ecx, [ebp - 0xb4]
call fcn.00472540
push 0xb
push 0x581fc4
lea ecx, [ebp - 0xb4]
call fcn.00472540
push dword [ebp - 0xb4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a2335
cmp dword [edi + 0x34], 0
jne 0x4a21c4
movsd xmm0, qword [edi + 0x2c]
ucomisd xmm0, qword [0x5a6d58]
lahf
test ah, 0x44
jnp 0x4a21c4
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push dword [ebp - 0xb4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xbc], eax
test eax, eax
je 0x4a21cb
lea ecx, [ebp - 0xe8]
push ecx
lea ecx, [ebp - 0xc8]
push ecx
lea ecx, [ebp - 0xf0]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x4a21b0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x4a21b0
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0xe0]
call fcn.00485560
lea eax, [edi + 0x2c]
push eax
lea eax, [ebp - 0xd4]
push eax
lea ecx, [ebp - 0xe0]
call fcn.00485760
mov ecx, eax
call fcn.004a0f60
mov edx, 1
xor ecx, ecx
cmp eax, edx
cmovg ecx, edx
mov dword [ebp - 0xb0], ecx
push dword [ebp - 0xbc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xb0]
jmp 0x4a21cd
mov ecx, 1
jmp 0x4a21cd
xor ecx, ecx
mov eax, dword [edi + 0x28]
cmp dword [eax - 0xc], 0
je 0x4a21de
test ecx, ecx
je 0x4a2335
lea ecx, [ebp - 0xac]
call fcn.004cc970
lea eax, [ebp - 0xb4]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0xac]
call fcn.004ce1d0
push dword [0x5893f8]
lea ecx, [ebp - 0xac]
call fcn.004cdd90
test al, al
je 0x4a22d6
push 0
push str._profile_last_used
lea ecx, [ebp - 0xac]
call fcn.004cd520
test al, al
je 0x4a22d6
lea ecx, [ebp - 0x30]
call fcn.0048cc20
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0xac]
call fcn.004cdae0
test al, al
je 0x4a22b6
cmp dword [ebp - 0x30], 2
jne 0x4a22b6
mov eax, dword [ebp - 0x2c]
cmp dword [eax - 0xc], 0
je 0x4a22b6
lea eax, [esi - 0x10]
push eax
call fcn.0045a950
add eax, 0x10
add esp, 4
mov dword [ebp - 0xb0], eax
push 0x57e140
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 4
call fcn.0047cf20
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0xb0]
push dword [eax - 0xc]
push eax
call fcn.00472540
push dword [ebp - 0xb0]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4a22e9
lea ecx, [ebp - 0xb0]
call fcn.0048ceb0
mov edx, dword [ebp - 0x2c]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4a22d6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 1
call fcn.004ccab0
xor edi, edi
jmp 0x4a2349
lea eax, [ebp - 0xb0]
push eax
lea ecx, [edi + 0x28]
call fcn.0045a580
lea eax, [ebp - 0xd4]
push eax
call fcn.004a34f0
lea ecx, [ebp - 0xb0]
movq xmm0, qword [eax]
movq qword [edi + 0x2c], xmm0
mov eax, dword [eax + 8]
mov dword [edi + 0x34], eax
call fcn.0048ceb0
lea ecx, [ebp - 0x30]
call fcn.004aa2a0
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 1
call fcn.004ccab0
mov ecx, dword [ebp - 0xc0]
lea eax, [edi + 0x28]
push eax
call fcn.0045a580
mov edi, 1
mov edx, dword [ebp - 0xb4]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4a236c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4a238a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525878
mov esp, ebp
pop ebp
ret 4