Function at 0x40d510
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x46e780]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [0x46fb34]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [esi - 0xc]
xor edi, edi
cmp eax, edi
jl 0x40d553
push 0x460d90
push esi
call fcn.0043b5b7
add esp, 8
cmp eax, edi
je 0x40d553
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40d5bd
push str._Exists__Invalid_arguments__Missing_operator_____:
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.00402290
mov ebx, dword [eax]
add esp, 8
cmp ebx, edi
jne 0x40d572
mov dword [ebp - 8], edi
jmp 0x40d5a3
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40d588
mov dword [ebp - 8], edi
jmp 0x40d5a3
lea esi, [eax + eax]
mov eax, esi
call fcn.00441030
mov ecx, dword [ebp - 0x14]
mov eax, esp
push ecx
push esi
push ebx
push eax
call fcn.00408280
mov dword [ebp - 8], eax
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 0x24]
call fcn.0043b4a4
push 0x4686c8
lea eax, [ebp - 0x24]
push eax
call fcn.0043e342
cmp dword [esi - 0xc], edi
jge 0x40d5c7
or eax, 0xffffffff
jmp 0x40d5e2
push 0x460d90
push esi
call fcn.0043b5b7
add esp, 8
cmp eax, edi
jne 0x40d5de
or eax, 0xffffffff
jmp 0x40d5e2
sub eax, esi
sar eax, 1
push eax
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp + 8]
call fcn.00407850
cmp dword [esi - 0xc], edi
jge 0x40d5f9
or eax, 0xffffffff
jmp 0x40d614
push 0x460d90
push esi
call fcn.0043b5b7
add esp, 8
cmp eax, edi
jne 0x40d610
or eax, 0xffffffff
jmp 0x40d614
sub eax, esi
sar eax, 1
add eax, 2
lea ebx, [ebp + 8]
call fcn.004076c0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x10], eax
call fcn.00402470
add esp, 4
push 0xa
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x18], eax
call fcn.00428a45
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x40]
push edx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0xc], esp
mov esi, esp
push eax
mov dword [ebp - 8], eax
call fcn.00402470
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040b8a0
add esp, 8
cmp eax, 1
je 0x40d679
push str._Exists__Invalid_arguments__nArg_1_:
lea eax, [ebp - 0xc]
jmp 0x40d55b
push edi
lea ecx, [ebp - 0x40]
call fcn.00428a21
cmp eax, edi
jne 0x40d68b
jmp fcn.00423abe
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402470
add esp, 4
lea edi, [eax + 0x10]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, 0x45f238
jne 0x40d6b2
mov eax, 0x45f254
push ecx
mov ecx, esp
mov dword [ebp - 0xc], esp
push eax
call fcn.004024e0
mov esi, dword [ebp - 0x18]
push ecx
mov dword [ebp - 0xc], esp
mov ebx, esp
push esi
call fcn.00402470
add eax, 0x10
add esp, 4
mov dword [ebx], eax
call fcn.0040aff0
lea eax, [edi - 0x10]
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d6f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x40]
call fcn.00428b7d
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d71a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [ebp - 8]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d736
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d752
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x4c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439c98
mov esp, ebp
pop ebp
ret