Function at 0x418f18
Capabilities:
Check if file exists
Resolve function by parsing pe exports

Disassembly:
push 0x54
mov eax, 0x44864e
call fcn.00431dc6
cmp dword [edi + 0x20], 8
push 0xe
pop esi
mov dword [ebp - 0x34], esi
jb 0x418f35
mov eax, dword [edi + 0xc]
jmp 0x418f38
lea eax, [edi + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x418f4b
xor eax, eax
inc eax
jmp 0x41920c
mov eax, dword [edi + 0xb8]
mov eax, dword [eax + 0x28]
call fcn.00418831
test eax, eax
jne 0x418f64
mov eax, esi
jmp 0x41920c
and dword [ebp - 0x40], 0
lea esi, [edi + 8]
cmp dword [esi + 0x18], 8
jb 0x418f76
mov eax, dword [esi + 4]
jmp 0x418f79
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x418f43
push 0x4538b4
lea eax, [ebp - 0x2c]
push esi
push eax
mov dword [ebp - 0x4c], 1
call fcn.00405e08
add esp, 0xc
and dword [ebp - 4], 0
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x418fad
lea eax, [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 0xb8]
mov esi, dword [eax + 0x28]
mov eax, esi
mov dword [ebp - 0x3c], 0x10000001
call fcn.00418831
test eax, eax
je 0x418fff
lea ebx, [esi + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x38], 0
je 0x418fee
mov esi, dword [esi + 0x20]
test esi, esi
je 0x418fee
lea eax, [edi + 0x78]
push eax
push dword [ebp - 0x38]
call esi
mov dword [ebp - 0x3c], eax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x3c], 0
je 0x419085
cmp dword [edi + 0x3c], 8
jb 0x41900a
mov eax, dword [edi + 0x28]
jmp 0x41900d
lea eax, [edi + 0x28]
cmp dword [edi + 0x58], 8
mov dword [ebp - 0x3c], eax
jb 0x41901b
mov eax, dword [edi + 0x44]
jmp 0x41901e
lea eax, [edi + 0x44]
cmp dword [edi + 0x20], 8
mov dword [ebp - 0x38], eax
jb 0x41902c
mov eax, dword [edi + 0xc]
jmp 0x41902f
lea eax, [edi + 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [edi + 0xb8]
mov esi, dword [eax + 0x28]
mov eax, esi
mov dword [ebp - 0x30], 0x10000001
call fcn.00418831
test eax, eax
je 0x419192
lea ebx, [esi + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [esi + 0x10]
test esi, esi
je 0x419074
lea eax, [edi + 0x78]
push eax
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
push dword [ebp - 0x44]
call esi
mov dword [ebp - 0x30], eax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x30], 0
jne 0x419192
or dword [ebp - 0x48], 0xffffffff
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov eax, dword [edi + 0xb8]
mov esi, dword [eax + 0x28]
mov eax, dword [edi + 0x78]
mov dword [ebp - 0x44], eax
mov eax, esi
mov dword [ebp - 0x30], 0x10000001
call fcn.00418831
test eax, eax
je 0x419151
lea ebx, [esi + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [esi + 0x14]
test esi, esi
je 0x4190e1
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x44]
call esi
mov dword [ebp - 0x30], eax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x30], 0
jne 0x419151
lea esi, [edi + 0x90]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x60]
mov dword [edi + 0x68], eax
mov eax, dword [ebp - 0x5c]
mov dword [edi + 0x6c], eax
mov eax, dword [ebp - 0x58]
mov dword [edi + 0x70], eax
mov eax, dword [ebp - 0x54]
push esi
mov dword [edi + 0x74], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0xb
pop esi
cmp dword [ebp - 0x48], esi
je 0x4191b1
cmp dword [ebp - 0x48], 0xc
je 0x4191de
push 0xa
push dword [edi + 0x84]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x419085
mov dword [ebp - 0x34], 4
and dword [ebp - 0x4c], 0
mov eax, dword [edi + 0xb8]
mov esi, dword [eax + 0x28]
mov eax, dword [edi + 0x78]
mov dword [ebp - 0x30], eax
mov eax, esi
call fcn.00418831
test eax, eax
je 0x419188
lea ebx, [esi + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [esi + 0x24]
test esi, esi
je 0x419181
push dword [ebp - 0x30]
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [edi + 0x78], 0
cmp dword [ebp - 0x4c], 0
je 0x4191ea
inc dword [ebp - 0x40]
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea esi, [ebp - 0x2c]
call fcn.004022b6
cmp dword [ebp - 0x40], 5
jl 0x418f68
jmp 0x4191f6
cmp dword [edi + 0x20], 8
jb 0x4191bc
mov eax, dword [edi + 0xc]
jmp 0x4191bf
lea eax, [edi + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4191d6
mov dword [ebp - 0x34], 1
jmp 0x41914d
mov dword [ebp - 0x34], esi
jmp 0x419151
mov dword [ebp - 0x34], 0xd
jmp 0x419151
push 0
push 1
lea esi, [ebp - 0x2c]
call fcn.004022b6
cmp dword [ebp - 0x40], 5
jl 0x419209
cmp dword [ebp - 0x34], 0xe
jne 0x419209
mov dword [ebp - 0x34], 0xc
mov eax, dword [ebp - 0x34]
call fcn.00431e49
ret