Function at 0x40a140
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4371f0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x44a00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
push dword [ebp + 0xc]
call fcn.004075c0
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov eax, dword [ebp + 0xc]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp dword [eax - 0xc], 0
jne 0x40a2a3
lea eax, [ebp - 0x14]
push eax
call fcn.0040a030
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.004085c0
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a1cf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x40a23a
mov esi, dword [ebp + 8]
mov ecx, esi
push 0x43f0f8
call fcn.004075c0
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a205
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x40a224
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x1c]
push eax
call fcn.0040a390
push str..txt
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x18]
call fcn.004073f0
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x10]
push dword [eax]
call fcn.0040ad50
mov byte [ebp - 4], 3
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a285
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a2a3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00406c60
mov ecx, eax
test ecx, ecx
jne 0x40a2b8
push 0x80004005
call fcn.00406fc0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 5
push dword [ebp - 0x10]
call ebx
test eax, eax
je 0x40a30e
push ecx
mov ecx, dword [ebp - 0x10]
lea ebx, [ebp - 0x14]
mov esi, esp
mov dword [ebp - 0x24], esi
lea ecx, [ecx - 0x10]
call fcn.00407960
add eax, 0x10
mov ecx, ebx
mov dword [esi], eax
call fcn.0040da30
mov esi, dword [ebp - 0x14]
add esp, 4
test eax, eax
je 0x40a30e
add esi, 0xfffffff0
mov ecx, esi
call fcn.00407960
mov ebx, dword [ebp + 8]
add eax, 0x10
mov dword [ebx], eax
jmp 0x40a320
mov ebx, dword [ebp + 8]
mov ecx, ebx
push 0x43f0f8
call fcn.004075c0
add esi, 0xfffffff0
mov eax, edi
mov byte [ebp - 4], 1
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40a338
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a356
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x40a375
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8