Function at 0x403400
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x461184
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x628
push esi
push edi
mov eax, dword [esp + 0x640]
mov dword [esp + 0x638], 0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [esp + 0x640]
jne 0x40347c
mov edx, dword [0x46f430]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4037cd
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4037cd
mov edx, dword [esp + 0x640]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
jmp 0x4037cd
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov ecx, dword [0x46f42c]
mov esi, eax
test esi, esi
mov dword [esp + 8], ecx
je 0x4034de
mov edx, esi
shr edx, 0x10
jne 0x4034ac
and esi, 0xffff
lea ecx, [esp + 8]
push esi
call fcn.00407c70
jmp 0x4034de
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x4034de
push edi
lea ecx, [esp + 0xc]
call fcn.00408040
test eax, eax
je 0x4034de
mov edx, dword [esp + 8]
lea eax, [edi + edi]
push eax
lea ecx, [edi + edi + 2]
push esi
push ecx
push edx
call fcn.00407060
add esp, 0x10
mov eax, dword [esp + 8]
push str..lnk
push eax
mov byte [esp + 0x640], 1
call fcn.004554ed
add esp, 8
test eax, eax
je 0x403550
mov eax, dword [esp + 8]
mov edx, dword [0x46f430]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40352d
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40352d
mov edx, dword [esp + 8]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov eax, dword [esp + 0x640]
mov edx, dword [0x46f430]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4037cd
add eax, 0xfffffff4
push eax
call esi
jmp 0x40345c
mov dword [esp + 0xc], 0
lea eax, [esp + 0xc]
push eax
push 0x46f6d8
push 0x17
push 0
push 0x466fd8
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40378f
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push 0x466fe8
mov ecx, dword [eax]
push eax
mov byte [esp + 0x644], 3
call dword [ecx]
test eax, eax
jl 0x403779
mov eax, dword [esp + 0x640]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x10]
push 0
push esi
push eax
mov ecx, dword [eax]
mov byte [esp + 0x644], 4
call dword [ecx + 0x14]
push esi
mov edi, eax
mov byte [esp + 0x63c], 3
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test edi, edi
jl 0x403779
mov eax, dword [esp + 0xc]
push 1
push 0
push eax
mov edx, dword [eax]
call dword [edx + 0x4c]
test eax, eax
jl 0x403779
mov eax, dword [esp + 0xc]
push 4
push 0
lea edx, [esp + 0x228]
mov ecx, dword [eax]
push 0x104
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x403649
lea eax, [esp + 0x220]
test eax, eax
je 0x403634
lea ecx, [esp + 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x644]
lea edx, [esp + 0x220]
push edx
push eax
call fcn.004080a0
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x18]
push 0x104
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
test eax, eax
jl 0x403686
lea eax, [esp + 0x18]
test eax, eax
je 0x403674
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x648]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.004080a0
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x428]
push 0x104
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
test eax, eax
jl 0x4036cf
lea eax, [esp + 0x428]
test eax, eax
je 0x4036ba
lea ecx, [esp + 0x428]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x64c]
lea edx, [esp + 0x428]
push edx
push eax
call fcn.004080a0
mov eax, dword [esp + 0x10]
mov byte [esp + 0x638], 2
test eax, eax
je 0x4036e5
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0xc]
mov byte [esp + 0x638], 1
test eax, eax
je 0x4036fb
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 8]
mov edx, dword [0x46f430]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40372c
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40372c
mov edx, dword [esp + 8]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov eax, dword [esp + 0x640]
mov edx, dword [0x46f430]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40375d
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40375d
mov edx, dword [esp + 0x640]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x628]
mov dword fs:[0], ecx
add esp, 0x634
ret
mov eax, dword [esp + 0x10]
mov byte [esp + 0x638], 2
test eax, eax
je 0x40378f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0xc]
mov byte [esp + 0x638], 1
test eax, eax
je 0x4037a5
mov edx, dword [eax]
push eax
call dword [edx + 8]
lea ecx, [esp + 8]
mov byte [esp + 0x638], 0
call fcn.00408010
lea ecx, [esp + 0x640]
mov dword [esp + 0x638], 0xffffffff
call fcn.00408010
mov ecx, dword [esp + 0x630]
pop edi
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x634
ret