Function at 0x4069f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x541208
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x59ff60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x34], ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 1
push 1
push eax
call fcn.00407dc0
add esp, 4
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 2
jb 0x406a41
mov eax, dword [eax]
push ecx
mov ecx, esp
push eax
call fcn.00401bb0
mov ecx, ebx
call fcn.004049f0
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 1
jb 0x406a66
push dword [ebp - 0x28]
call fcn.00408e11
add esp, 4
lea eax, [ebp - 0x28]
push 0
push eax
call fcn.00407dc0
add esp, 4
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x406a80
mov eax, dword [eax]
push ecx
mov ecx, esp
push eax
call fcn.00401bb0
mov ecx, ebx
call fcn.004049f0
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 1
jb 0x406aa5
push dword [ebp - 0x28]
call fcn.00408e11
add esp, 4
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00403470
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov ecx, ebx
lea eax, [ebp - 0x28]
push eax
call fcn.00407ce0
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 4
jb 0x406ad3
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401bb0
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x406af1
push dword [ebp - 0x28]
call fcn.00408e11
add esp, 4
push dword [ebp - 0x30]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x406be9
mov esi, dword [ebp - 0x30]
push ecx
mov dword [ebp - 0x2c], esp
mov ebx, esp
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
lea edx, [esi - 4]
mov ecx, eax
jl 0x406b43
cmp ecx, dword [esi - 0x10]
jne 0x406b43
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x406b6f
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x406c6b
mov ecx, dword [esi - 0xc]
lea eax, [edi + 0x10]
mov dword [edi + 4], ecx
mov ecx, dword [esi - 0xc]
inc ecx
push ecx
push esi
push ecx
push eax
call fcn.00524a46
add esp, 0x10
lea eax, [edi + 0x10]
mov dword [ebx], eax
mov esi, dword [ebp + 0xc]
push ecx
mov byte [ebp - 4], 7
mov ebx, esp
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
lea edx, [esi - 4]
mov ecx, eax
jl 0x406ba4
cmp ecx, dword [esi - 0x10]
jne 0x406ba4
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x406bd0
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x406c6b
mov ecx, dword [esi - 0xc]
lea eax, [edi + 0x10]
mov dword [edi + 4], ecx
mov ecx, dword [esi - 0xc]
inc ecx
push ecx
push esi
push ecx
push eax
call fcn.00524a46
add esp, 0x10
mov ecx, dword [ebp - 0x34]
lea eax, [edi + 0x10]
mov dword [ebx], eax
mov byte [ebp - 4], 6
call fcn.00406160
test al, al
je 0x406b14
mov edx, dword [ebp - 0x30]
or esi, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 1
mov eax, esi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x406c0c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov ecx, esi
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406c2c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x406c4d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525164
mov esp, ebp
pop ebp
ret 8
call fcn.00409980
int3