Function at 0x406c60
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x46b848
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x489ec0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x20]
sub eax, 0x10
push eax
call fcn.004051c0
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x1c]
sub eax, 0x10
push eax
mov dword [esp + 0x48], 0
call fcn.004051c0
add eax, 0x10
mov dword [esp + 0x2c], eax
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x30], esp
mov esi, esp
push eax
mov byte [esp + 0x48], 1
mov dword [esp + 0x34], eax
call fcn.004051c0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00417160
mov esi, dword [edi + 0x30]
add esp, 4
cmp esi, dword [edi + 0x34]
jbe 0x406cef
call fcn.0044f012
mov ebp, dword [edi + 0x24]
mov dword [esp + 0x34], esi
lea ebx, [esi + 0xc]
lea esp, [esp]
mov esi, dword [edi + 0x34]
cmp dword [edi + 0x30], esi
jbe 0x406d0d
call fcn.0044f012
mov eax, dword [edi + 0x24]
test ebp, ebp
je 0x406d18
cmp ebp, eax
je 0x406d1d
call fcn.0044f012
cmp dword [esp + 0x34], esi
je 0x406ea6
push 0x46fb9c
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00406780
add esp, 0xc
mov esi, eax
mov byte [esp + 0x40], 2
test ebp, ebp
jne 0x406e91
call fcn.0044f012
xor eax, eax
mov edx, dword [esp + 0x34]
cmp edx, dword [eax + 0x10]
jb 0x406d62
call fcn.0044f012
push ebx
lea eax, [esp + 0x18]
push esi
push eax
call fcn.004066b0
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x40], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d96
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x46fb9c
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00406780
add esp, 0xc
mov esi, eax
mov byte [esp + 0x40], 5
test ebp, ebp
jne 0x406e99
call fcn.0044f012
xor eax, eax
mov ecx, dword [esp + 0x34]
cmp ecx, dword [eax + 0x10]
jb 0x406dd1
call fcn.0044f012
push ebx
lea edx, [esp + 0x1c]
push esi
push edx
call fcn.004066b0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
add esp, 0xc
mov byte [esp + 0x40], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call dword [0x46f320]
test eax, eax
je 0x406e26
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push 0
push edx
push eax
call dword [0x46f0ec]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e46
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x40], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e6b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebp, ebp
jne 0x406ea1
call fcn.0044f012
xor eax, eax
mov ecx, dword [esp + 0x34]
cmp ecx, dword [eax + 0x10]
jb 0x406e84
call fcn.0044f012
add dword [esp + 0x34], 0x18
add ebx, 0x18
jmp 0x406d00
mov eax, dword [ebp]
jmp 0x406d54
mov eax, dword [ebp]
jmp 0x406dc3
mov eax, dword [ebp]
jmp 0x406e76
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x40], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406ec8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x40], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406ef0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret