Function at 0x4067b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5411a0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
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
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 2
push 1
push eax
call fcn.00407dc0
add esp, 4
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x4067fe
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], 2
jb 0x406823
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], 4
jb 0x40683d
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], 2
jb 0x406862
push dword [ebp - 0x28]
call fcn.00408e11
add esp, 4
lea eax, [ebp + 8]
mov ecx, ebx
push eax
call fcn.00403400
lea eax, [ebp + 0xc]
lea ecx, [ebx + 4]
push eax
call fcn.00403400
mov eax, dword [ebx]
push ecx
sub eax, 0x10
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], 5
jb 0x4068a6
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401bb0
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 7
jb 0x4068c4
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 0x4069bf
mov esi, dword [ebp - 0x30]
push ecx
mov dword [ebp - 0x34], esp
mov dword [ebp - 0x2c], 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 0x406917
cmp ecx, dword [esi - 0x10]
jne 0x406917
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x406943
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4069e2
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 - 0x2c]
lea eax, [edi + 0x10]
mov dword [ecx], eax
mov esi, dword [ebp + 0x10]
push ecx
mov byte [ebp - 4], 8
mov dword [ebp - 0x2c], 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 0x40697c
cmp ecx, dword [esi - 0x10]
jne 0x40697c
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x4069a4
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4069e2
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 - 0x2c]
lea eax, [edi + 0x10]
mov dword [ecx], eax
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.00406160
test al, al
je 0x4068e7
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
push 0
push 0
push 0
push ebx
push 0x4071d0
call fcn.0040ba7f
mov ecx, ebx
call fcn.00406e70
call fcn.00409980
int3