Function at 0x40f3f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48c8c8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
mov eax, dword [0x4bf1d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
push 0x49d138
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.00401c30
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
lea ecx, [ebp - 0x14]
mov edx, edi
mov byte [ebp - 4], 1
call fcn.00467210
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f47c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40f53f
mov esi, dword [ebp - 0x14]
test esi, esi
setne al
test eax, eax
jne 0x40f4a0
push 0x80004005
call fcn.00401ae0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
push esi
push eax
call fcn.0046972c
add esp, 8
test eax, eax
jne 0x40f52a
push 0x49d138
lea ecx, [ebp - 0x18]
call fcn.00401c30
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push ecx
push ebx
push edx
lea edx, [edi + 4]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00467210
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f4fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x14]
xor eax, eax
test esi, esi
setne al
test eax, eax
jne 0x40f513
push 0x80004005
call fcn.00401ae0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
push esi
push eax
call fcn.0046972c
add esp, 8
test eax, eax
je 0x40f644
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push edx
push ebx
push eax
mov ebx, edi
call fcn.0040f680
jmp 0x40f644
lea esi, [ebp - 0x18]
mov eax, edi
call fcn.004671e0
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f562
test al, 0x10
jne 0x40f562
mov eax, 1
jmp 0x40f564
xor eax, eax
test eax, eax
mov eax, dword [ebp - 0x18]
sete byte [ebp - 0xd]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f589
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0xd], 0
je 0x40f631
lea eax, [edi + 4]
lea esi, [ebp - 0x18]
call fcn.004671e0
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f5b7
test al, 0x10
jne 0x40f5b7
mov eax, 1
jmp 0x40f5b9
xor eax, eax
test eax, eax
mov eax, dword [ebp - 0x18]
sete byte [ebp - 0xd]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f5de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0xd], 0
je 0x40f631
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push ebx
push edx
mov ecx, edi
call fcn.0040f7d0
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f61c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push ebx
push edx
mov ebx, edi
call fcn.0040f680
mov esi, dword [ebp - 0x14]
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f667
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8