Function at 0x4972f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e0b0
mov eax, dword fs:[0]
push eax
sub esp, 0xa1c
mov eax, dword [0x5c5244]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xa28], eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x497594
mov dword [ebp - 0xa20], 0
mov dword [ebp - 4], 1
mov dword [ebp - 0xa24], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0xa20]
push eax
push 0x56efa4
push 0x17
push 0
push 0x56f6a0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x497399
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x497394
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
mov byte [ebp - 4], 8
push dword [ebp - 0xa20]
lea ecx, [ebp - 0xa24]
call fcn.00431f60
mov dword [ebp - 4], 4
cmp dword [ebp - 0xa24], 0
jne 0x4973d7
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x4973d2
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
mov eax, dword [ebp - 0xa20]
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x50]
test eax, eax
jns 0x497401
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x4973fc
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
test edi, edi
je 0x49742f
mov eax, dword [ebp - 0xa20]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x2c]
test eax, eax
jns 0x49742f
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x49742a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
mov eax, dword [ebp - 0xa20]
mov ecx, dword [eax]
push 5
push eax
call dword [ecx + 0x3c]
test eax, eax
jns 0x49745a
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x497455
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
push 0x800
push 0
lea eax, [ebp - 0xa1c]
push eax
call fcn.004f39e0
push 0x400
push esi
lea eax, [ebp - 0xa1c]
push eax
call fcn.005128f0
add esp, 0x18
lea eax, [ebp - 0xa1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov esi, dword [ebp + 0x1c]
test esi, esi
jle 0x4974d8
push 0x208
push 0
lea eax, [ebp - 0x21c]
push eax
call fcn.004f39e0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0xa28]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov eax, dword [ebp - 0xa20]
mov ecx, dword [eax]
push esi
lea edx, [ebp - 0x21c]
push edx
push eax
call dword [ecx + 0x44]
mov eax, dword [ebp - 0xa20]
mov ecx, dword [eax]
lea edx, [ebp - 0xa1c]
push edx
push eax
call dword [ecx + 0x24]
test eax, eax
jns 0x497505
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x497503
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
mov eax, dword [ebp - 0xa24]
mov ecx, dword [eax]
push 1
push ebx
push eax
call dword [ecx + 0x18]
test eax, eax
jns 0x49752e
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x49752c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x49757d
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xa24]
test eax, eax
je 0x497542
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xa20]
test eax, eax
je 0x497559
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, 1
jmp 0x497596
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xa20]
test eax, eax
je 0x497594
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004da3bd
mov esp, ebp
pop ebp
ret