Function at 0x10009157
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
or dword [esp + 4], 0xffffffff
push ebx
push esi
push edi
push dword [ebp + 8]
call fcn.10008f4d
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x100093a9
cmp dword [ebx + 0x2c], edi
je 0x10009195
mov esi, dword [ebx + 0x1c]
mov dword [ebx + 0x2c], edi
call fcn.1001272d
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x20], edi
mov dword [ebx + 0x24], edi
mov eax, dword [ebx + 8]
test al, 0x10
je 0x100093a9
test al, 1
jne 0x1000931c
push dword [ebx + 0x28]
inc dword [ebx]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x10009129
push dword [ebp + 8]
mov dword [esp + 0x20], 0x28
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov esi, 0x1000
mov dword [esp + 0x14], eax
call fcn.10012679
mov dword [esp + 0x2c], eax
test eax, eax
je 0x10009266
push 0
push 8
lea eax, [esp + 0x20]
push eax
push dword [ebp + 8]
mov dword [esp + 0x40], 0x1000
call dword [0x1002b1a4]
test eax, eax
jne 0x10009219
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1000925b
lea eax, [ebx + 0x28]
push eax
call fcn.100109a1
jmp 0x100091e3
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1000925d
mov ecx, dword [ebx + 0x20]
mov edi, dword [ebx + 0x1c]
lea esi, [eax + ecx + 0x1000]
call fcn.100126c8
mov edi, eax
test edi, edi
je 0x1000925d
mov eax, dword [ebx + 0x20]
mov dword [ebx + 0x1c], edi
push dword [esp + 0x30]
add eax, edi
push dword [esp + 0x30]
push eax
call sub.ntdll.dll_memcpy
mov eax, dword [esp + 0x3c]
add esp, 0xc
add dword [ebx + 0x20], eax
jmp 0x100091e3
xor edi, edi
mov esi, dword [esp + 0x2c]
call fcn.1001272d
mov eax, dword [esp + 0x14]
inc eax
neg eax
sbb eax, eax
and eax, dword [esp + 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
test edi, edi
je 0x100092fd
cmp dword [ebx], 1
jbe 0x100092fd
mov edi, ebx
call fcn.10008e6f
push dword [ebx + 0xc]
or dword [ebx + 8], 1
call fcn.1000a5c0
test eax, eax
je 0x10009313
lea edi, [ebx + 0x20]
push edi
lea eax, [ebx + 0x1c]
push eax
push dword [ebx + 0xc]
call fcn.1000aa51
or dword [ebx + 8], 0x10
mov esi, 0x1000
call fcn.10012679
mov esi, eax
test esi, esi
je 0x10009313
lea eax, [esp + 0x14]
push eax
push esi
push dword [ebx + 0xc]
mov dword [esp + 0x20], 0x1000
call dword [sym.imp.WININET.dll_GetUrlCacheEntryInfoA]
test eax, eax
je 0x100092f6
push dword [esi + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x100092f6
push dword [ebx + 0x1c]
mov eax, dword [edi]
push dword [esi + 8]
call fcn.10012238
call fcn.1001272d
jmp 0x10009313
mov eax, dword [ebp + 0x14]
and dword [esp + 0x10], 0
and dword [eax], 0
push 0x2ee4
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
call fcn.10009089
xor edi, edi
test byte [ebx + 8], 1
je 0x100093a9
mov eax, dword [ebx + 0x20]
sub eax, dword [ebx + 0x24]
mov ecx, dword [ebp + 0x14]
cmp dword [ebp + 0x10], eax
mov dword [esp + 0x14], eax
cmovbe eax, dword [ebp + 0x10]
mov dword [ecx], eax
cmp eax, edi
je 0x100093a1
mov esi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push eax
push dword [ebp + 0xc]
call esi
test eax, eax
jne 0x100093a1
mov eax, dword [ebp + 0x14]
push dword [eax]
mov eax, dword [ebx + 0x24]
add eax, dword [ebx + 0x1c]
push eax
call esi
test eax, eax
jne 0x100093a1
mov eax, dword [ebx + 0x24]
mov esi, dword [ebp + 0x14]
push dword [esi]
add eax, dword [ebx + 0x1c]
push eax
push dword [ebp + 0xc]
call sub.ntdll.dll_memcpy
mov eax, dword [esi]
add dword [ebx + 0x24], eax
add esp, 0xc
push edi
push edi
push 0x28
push dword [ebp + 0x18]
push dword [ebp + 8]
call fcn.10008f0a
push 4
lea eax, [esp + 0x18]
push eax
push 0x29
push dword [ebp + 0x18]
push dword [ebp + 8]
call fcn.10008f0a
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14