Function at 0x405880
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4353b0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebp
push esi
push edi
mov eax, dword [0x4451b0]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], 0
mov eax, dword [eax]
xor edi, edi
push edi
push ecx
sub eax, 0x10
mov dword [esp + 0x1c], esp
mov esi, esp
call fcn.00401ea0
add eax, 0x10
mov dword [esi], eax
push ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x38], edi
mov eax, dword [ecx]
sub eax, 0x10
mov dword [esp + 0x28], esp
mov esi, esp
call fcn.00401ea0
add eax, 0x10
mov dword [esi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.00405440
add esp, 0xc
mov dword [esp + 0x2c], 1
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], edi
je 0x405935
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405ad6
mov esi, dword [esp + 0x34]
push esi
mov ecx, 0x43a630
call fcn.004029c0
jmp 0x405aeb
mov edi, dword [esp + 0x14]
inc edi
cmp edi, 3
mov dword [esp + 0x14], edi
jg 0x40590e
mov edx, dword [esp + 0x3c]
mov esi, dword [edx]
push 0
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub esi, 0x10
mov dword [esp + 0x24], esp
mov ebp, esp
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x405975
cmp eax, dword [esi]
jne 0x405975
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4059b0
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x405ad1
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0041a79e
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
push ecx
mov ecx, dword [esp + 0x44]
mov byte [esp + 0x38], 2
mov esi, dword [ecx]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
mov dword [esp + 0x2c], esp
mov ebp, esp
call eax
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x4059ef
cmp eax, dword [esi]
jne 0x4059ef
mov edi, esi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x405a2a
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x405ad1
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0041a79e
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x38], 1
call fcn.00405440
add esp, 0xc
mov byte [esp + 0x2c], 3
mov ecx, dword [eax]
mov esi, dword [esp + 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x405a99
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x405a8b
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x405a8b
call fcn.00401ea0
mov ebp, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x405a82
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x10], ebp
jmp 0x405a99
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea eax, [esp + 0x18]
call fcn.00402fe0
mov byte [esp + 0x2c], 1
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 0x405abe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0
je 0x405931
jmp 0x40590e
call fcn.00402650
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
call fcn.00401ea0
mov esi, dword [esp + 0x34]
add eax, 0x10
mov dword [esi], eax
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b13
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x20
ret