Function at 0x40bb90
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bfa1
mov eax, dword fs:[0]
push eax
mov eax, 0x2464
call fcn.0041b840
mov eax, dword [0x425024]
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 edi, edx
mov dword [ebp - 0x2424], edi
push 0x41d7ac
lea ecx, [ebp - 0x241c]
call fcn.00402e20
lea ecx, [ebp - 0x2460]
mov dword [ebp - 4], 0
call fcn.0040a270
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [eax]
mov esi, dword [ebp - 0x241c]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x40bc58
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40bc43
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x40bc43
call fcn.004031a0
mov dword [ebp - 0x2420], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x40bc38
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2420]
add eax, 0x10
mov dword [ebp - 0x241c], eax
jmp 0x40bc52
push dword [edx - 0xc]
lea ecx, [ebp - 0x241c]
push edx
call fcn.00403200
mov edi, dword [ebp - 0x2424]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x2460]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40bc79
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x241c]
cmp dword [eax - 0xc], 0
je 0x40c147
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x418]
call fcn.0040a710
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40bcca
lea eax, [ebp - 0x418]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x400
lea eax, [ebp - 0x818]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x818]
push eax
push 0x41d864
push ecx
call fcn.00409af0
add esp, 0xc
lea edx, [ebp - 0x818]
mov ecx, edi
call fcn.0040c740
test eax, eax
je 0x40bd0f
cmp eax, 5
jne 0x40c147
lea eax, [ebp - 0x2454]
mov dword [ebp - 0x2428], 0
push eax
mov dword [ebp - 0x242c], 0
mov dword [ebp - 0x2468], 0
mov dword [ebp - 0x2420], 0
mov dword [ebp - 0x245c], 0
mov dword [ebp - 0x2458], 0
mov dword [ebp - 0x243c], 0
mov dword [ebp - 0x2438], 0
mov dword [ebp - 0x2434], 0
mov dword [ebp - 0x2430], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x400
mov dword [ebp - 0x2464], eax
lea eax, [ebp - 0x1018]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1018]
push eax
push 0x41d928
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x200
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x4288d8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x40be15
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
push 0
push 0
push eax
lea eax, [ebp - 0x210]
push eax
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
sub esp, 0x18
mov edx, esp
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
cmp dword [edx + 0x14], 0x10
jb 0x40be32
mov eax, dword [edx]
jmp 0x40be34
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x210], 0
jne 0x40be44
xor ecx, ecx
jmp 0x40be59
lea ecx, [ebp - 0x210]
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40be50
sub ecx, esi
push ecx
lea eax, [ebp - 0x210]
mov ecx, edx
push eax
call fcn.00402f80
call fcn.00408320
push 0x400
mov ebx, eax
lea eax, [ebp - 0xc18]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x34]
add esp, 0x24
cmp dword [esi + 0x14], 0x10
jb 0x40be90
mov esi, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test esi, esi
je 0x40beb8
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push eax
lea eax, [ebp - 0xc18]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 0x400
lea eax, [ebp - 0x2418]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x64]
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x40bed9
mov esi, dword [esi]
test esi, esi
je 0x40befb
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push eax
lea eax, [ebp - 0x2418]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 0x400
lea eax, [ebp - 0x2018]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2018]
push eax
push str._36_
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1418]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1418]
push eax
push str.6341j
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1818]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1818]
push eax
push 0x420144
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1c18]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c18]
push eax
push str.34_5j
push ecx
call fcn.00409af0
add esp, 8
mov dword [ebp - 0x2430], 0xfde9
lea eax, [ebp - 0xc18]
lea ecx, [ebp - 0x245c]
push eax
lea eax, [ebp - 0x1018]
push eax
call fcn.00406e80
lea ecx, [ebp - 0x245c]
call fcn.00407050
mov esi, eax
test esi, esi
je 0x40c003
mov edx, dword [ebp - 0x2430]
lea ecx, [ebp - 0x1418]
call fcn.00407ab0
mov dword [esi + 4], eax
lea ecx, [ebp - 0x1818]
mov edx, dword [ebp - 0x2430]
call fcn.00407ab0
mov dword [esi + 8], eax
mov edi, dword [ebp - 0x241c]
test edi, edi
je 0x40c042
lea ecx, [ebp - 0x245c]
call fcn.00407050
mov esi, eax
test esi, esi
je 0x40c042
mov edx, dword [ebp - 0x2430]
lea ecx, [ebp - 0x1c18]
call fcn.00407ab0
mov dword [esi + 4], eax
mov ecx, edi
mov edx, dword [ebp - 0x2430]
call fcn.00407ab0
mov dword [esi + 8], eax
mov edi, dword [ebp - 0x2424]
lea eax, [ebp - 0x2018]
push edi
push dword [ebp - 0x2464]
lea ecx, [ebp - 0x245c]
push eax
call fcn.00407180
lea eax, [ebp - 0x2420]
push eax
lea eax, [ebp - 0x242c]
push eax
lea eax, [ebp - 0x2468]
push eax
lea eax, [ebp - 0x2428]
push eax
lea eax, [ebp - 0x2418]
push eax
lea ecx, [ebp - 0x245c]
call fcn.00407320
mov eax, dword [ebp - 0x2428]
test eax, eax
je 0x40c0a2
push eax
call fcn.0041a7e7
add esp, 4
mov eax, dword [ebp - 0x242c]
test eax, eax
je 0x40c0b5
push eax
call fcn.0041a7e7
add esp, 4
mov eax, dword [ebp - 0x245c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x40c0d2
push eax
call esi
mov dword [ebp - 0x245c], 0
mov eax, dword [ebp - 0x2458]
test eax, eax
je 0x40c0e9
push eax
call esi
mov dword [ebp - 0x2458], 0
push edi
call dword [0x428f64]
mov eax, dword [ebp - 0x245c]
xor ebx, ebx
cmp dword [ebp - 0x2420], 0xc8
sete bl
test eax, eax
je 0x40c116
push eax
call esi
mov dword [ebp - 0x245c], 0
mov eax, dword [ebp - 0x2458]
test eax, eax
je 0x40c12d
push eax
call esi
mov dword [ebp - 0x2458], 0
lea ecx, [ebp - 0x245c]
call fcn.00406f50
lea eax, [ebp - 0x2454]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x40c149
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov eax, dword [ebp - 0x241c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40c16e
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.0041a772
mov esp, ebp
pop ebp
ret