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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x458152
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2034
call fcn.00443390
mov eax, dword [0x4736c0]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
xor ebx, ebx
push 0x1fff
lea eax, [ebp - 0x201b]
push ebx
mov dword [ebp - 4], ebx
push eax
mov dword [ebp - 0x2030], ebx
mov dword [ebp - 0x202c], ebx
mov dword [ebp - 0x2020], ebx
mov byte [ebp - 0x201c], bl
call fcn.00442fd0
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
add esp, 0xc
push ecx
mov dword [ebp - 0x2028], 0x2000
mov dword [ebp - 0x2024], 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4070c7
test al, 0x10
jne 0x4070c7
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x2038], esp
mov esi, esp
push eax
call fcn.00408350
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004072e0
push 0x14
call fcn.00421a19
mov ecx, eax
add esp, 4
mov dword [ebp - 0x2038], ecx
test ecx, ecx
mov byte [ebp - 4], 2
je 0x4070f6
push 0
push 0
push 0
push 0
push 1
push 0
call fcn.004240bc
mov ecx, eax
jmp 0x4070f8
xor ecx, ecx
push 0
push 0
push reloc.OLEAUT32.dll_SysReAllocString
push 1
push edi
mov byte [ebp - 4], 1
mov dword [ebp - 0x2030], ecx
call fcn.00424cdd
mov edi, eax
test edi, edi
mov dword [ebp - 0x202c], edi
je 0x407216
push 0x10
call fcn.00421a19
mov ecx, eax
add esp, 4
mov dword [ebp - 0x2038], ecx
test ecx, ecx
mov byte [ebp - 4], 3
je 0x407146
call fcn.00425379
mov esi, eax
jmp 0x407148
xor esi, esi
mov byte [ebp - 4], 1
mov edx, dword [esi]
mov eax, dword [ebp + 8]
mov edx, dword [edx + 0x20]
xor ebx, ebx
push ebx
push 0x9001
push eax
mov ecx, esi
mov dword [ebp - 0x2020], esi
call edx
cmp eax, 1
jne 0x4071f6
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push ebx
push ebx
push ebx
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push 2
push ebx
push ebx
mov ecx, edi
call edx
push ebx
mov esi, eax
mov eax, dword [edi]
push ebx
mov dword [ebp - 0x2038], edx
mov edx, dword [eax + 0x28]
push ebx
mov ecx, edi
call edx
cmp esi, 0x2000
jae 0x4071ab
mov dword [ebp - 0x2028], esi
test esi, esi
jbe 0x407210
mov ecx, dword [ebp - 0x2028]
mov eax, dword [edi]
mov eax, dword [eax + 0x34]
push ecx
lea edx, [ebp - 0x201c]
push edx
mov ecx, edi
call eax
mov ecx, dword [ebp - 0x2020]
mov edx, dword [ecx]
mov edx, dword [edx + 0x38]
mov ebx, eax
push ebx
lea eax, [ebp - 0x201c]
push eax
call edx
mov ecx, dword [ebp - 0x2020]
mov eax, dword [ecx]
mov edx, dword [eax + 0x48]
call edx
sub esi, ebx
cmp esi, 0x2000
ja 0x4071ab
jmp 0x4071a5
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 1
mov ecx, esi
call edx
mov dword [ebp - 0x2024], ebx
mov dword [ebp - 4], 0
jmp 0x407247
mov ebx, dword [ebp - 0x2020]
mov dword [ebp - 4], 0
jmp 0x407247
test ebx, ebx
je 0x40725f
mov eax, dword [ebx]
mov edx, dword [eax + 0x4c]
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 1
mov ecx, ebx
call edx
test edi, edi
je 0x407277
mov eax, dword [edi]
mov edx, dword [eax + 0x4c]
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 4]
push 1
mov ecx, edi
call edx
mov ecx, dword [ebp - 0x2030]
test ecx, ecx
je 0x40728a
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 1
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4072b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x2024]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.004404d0
mov esp, ebp
pop ebp
ret 4