Function at 0x420020
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
mov dword [ebp - 0xc], ecx
lea ecx, [ebp - 0x40]
push edi
call fcn.00408110
mov eax, dword [0x4c10bc]
xor ecx, ecx
mov edx, dword [0x4c10b8]
or ebx, 0xffffffff
sub eax, edx
mov dword [ebp - 4], ecx
sar eax, 2
test eax, eax
je 0x4204a8
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [edx + ecx*4]
cmp dword [eax + 0x2c], 1
jne 0x420492
mov eax, dword [eax + 8]
lea esi, [eax - 0x10]
mov dword [ebp - 8], eax
push ecx
mov ecx, dword [esi]
mov dword [ebp - 0x1c], esp
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x420095
cmp ecx, dword [esi]
jne 0x420095
lock inc dword [eax]
jmp 0x4200d0
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x420522
mov ecx, dword [edi]
mov dword [esi + 4], ecx
mov eax, dword [edi]
lea ecx, [eax*2 + 2]
push ecx
push dword [ebp - 8]
lea eax, [eax*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00437560
add esp, 0x10
mov ecx, dword [ebp - 0x1c]
lea eax, [esi + 0x10]
push ecx
mov dword [ebp - 8], esp
mov dword [ecx], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5b0]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x420107
cmp ecx, dword [esi]
jne 0x420107
lock inc dword [eax]
jmp 0x420142
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x420522
mov ecx, dword [edi]
mov dword [esi + 4], ecx
mov eax, dword [edi]
lea ecx, [eax*2 + 2]
push ecx
push dword [ebp - 0x1c]
lea eax, [eax*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00437560
add esp, 0x10
mov ecx, dword [ebp - 8]
lea eax, [esi + 0x10]
mov dword [ecx], eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x44]
call fcn.0042b620
mov ecx, dword [ebp - 4]
mov eax, dword [0x4c10b8]
push ecx
mov dword [ebp - 8], esp
mov eax, dword [eax + ecx*4]
mov eax, dword [eax + 8]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x42018a
cmp ecx, dword [esi]
jne 0x42018a
lock inc dword [eax]
jmp 0x4201c5
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x420522
mov ecx, dword [edi]
mov dword [esi + 4], ecx
mov eax, dword [edi]
lea ecx, [eax*2 + 2]
push ecx
push dword [ebp - 0x1c]
lea eax, [eax*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00437560
add esp, 0x10
mov ecx, dword [ebp - 8]
lea eax, [esi + 0x10]
push ecx
mov dword [ebp - 8], esp
mov dword [ecx], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5b4]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x4201fc
cmp ecx, dword [esi]
jne 0x4201fc
lock inc dword [eax]
jmp 0x420237
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x420522
mov ecx, dword [edi]
mov dword [esi + 4], ecx
mov eax, dword [edi]
lea ecx, [eax*2 + 2]
push ecx
push dword [ebp - 0x1c]
lea eax, [eax*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00437560
add esp, 0x10
mov ecx, dword [ebp - 8]
lea eax, [esi + 0x10]
mov dword [ecx], eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x44]
call fcn.0042b620
call fcn.00402250
test eax, eax
je 0x420518
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
mov esi, dword [ebp - 0x18]
add eax, 0x10
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x420329
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.0041d210
mov eax, dword [0x4c10b8]
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, dword [eax + ecx*4]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x420518
mov esi, dword [ebp - 0x10]
mov ecx, esi
nop
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x4202c6
test dx, dx
je 0x4202c2
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x4202c6
add ecx, 4
add eax, 4
test dx, dx
jne 0x4202a0
xor eax, eax
jmp 0x4202cb
sbb eax, eax
or eax, 1
mov edi, dword [ebp - 0x14]
test eax, eax
sete al
test al, al
je 0x4202e5
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 8]
call fcn.00409a20
jmp 0x420315
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.0041d210
add esp, 8
lea ecx, [ebp - 8]
push eax
call fcn.00409a20
mov edx, dword [ebp - 0x20]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420315
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x42035c
mov ecx, dword [esi]
push esi
jmp 0x420357
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push edi
push eax
call fcn.0041d210
add esp, 8
lea ecx, [ebp - 8]
push eax
call fcn.00409a20
mov edx, dword [ebp - 0x24]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42035c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
mov eax, dword [0x4c10b8]
mov esi, dword [ebp - 8]
mov edx, dword [eax + ecx*4]
add edx, 0xc
lea ecx, [esi - 0x10]
mov dword [ebp - 0x28], edx
mov dword [ebp - 8], ecx
mov ebx, dword [edx]
sub ebx, 0x10
cmp ecx, ebx
je 0x4203cb
cmp dword [ebx + 0xc], 0
jl 0x4203bb
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x4203bb
push ecx
call fcn.00403380
add esp, 4
mov dword [ebp - 0x1c], eax
or ecx, 0xffffffff
lea edx, [ebx + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4203b1
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
add eax, 0x10
mov dword [ecx], eax
jmp 0x4203c6
push dword [esi - 0xc]
mov ecx, edx
push esi
call fcn.00402620
mov eax, dword [0x4c10b8]
cmp dword [esi - 0xc], 0
jne 0x4203f2
mov ecx, dword [ebp - 4]
mov eax, dword [eax + ecx*4]
cmp byte [eax + 0x25], 0
je 0x4203ec
cmp byte [0x4c103c], 0
je 0x4203ec
mov byte [eax + 0x24], 1
jmp 0x42043e
mov byte [eax + 0x24], 0
jmp 0x42043e
mov ebx, dword [ebp - 4]
push ecx
mov esi, esp
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0x10]
sub eax, 0x10
push eax
call fcn.00403380
add eax, 0x10
mov dword [esi], eax
mov esi, esp
mov eax, dword [0x4c10b8]
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0xc]
sub eax, 0x10
push eax
call fcn.00403380
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.0040ebe0
mov ecx, dword [0x4c10b8]
add esp, 8
mov ecx, dword [ecx + ebx*4]
mov byte [ecx + 0x24], al
mov edx, dword [ebp - 8]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420458
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x18]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420472
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x420489
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
mov edx, dword [0x4c10b8]
mov eax, dword [0x4c10bc]
inc ecx
sub eax, edx
mov dword [ebp - 4], ecx
sar eax, 2
cmp ecx, eax
jb 0x420060
mov eax, dword [ebp - 0x30]
cmp dword [eax - 0xc], 0
lea edx, [eax - 0x10]
mov esi, dword [edx]
je 0x4204f2
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x4204d5
cmp dword [eax - 8], 0
jge 0x4204c7
jmp 0x42050e
xor ecx, ecx
mov dword [eax - 0xc], 0
mov word [eax], cx
jmp 0x4204f2
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4204e8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
lea edx, [eax - 0x10]
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x420507
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00402080
push 0x80004005
call fcn.00402080
call fcn.004026d0
int3