Function at 0x4b0310
Capabilities:
Check if file exists
Connect to http server
Get http content length
Get http response content encoding
Query remote server for available data
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c22f8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push esi
push edi
mov eax, dword [0x5603e8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, edi
call fcn.004afa10
mov edx, dword [ebp - 0x18]
mov dword [ebp - 4], 0
test edx, edx
jne 0x4b0370
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], eax
test eax, eax
je 0x4b038a
push ecx
push edx
push 0
push edi
call eax
mov edx, dword [edi]
mov eax, dword [edx + 8]
push 0
push 0x560308
push 0x5600a4
push 0
mov ecx, edi
mov byte [ebp - 4], 1
call eax
push eax
call sub.MSVCR100.dll___RTDynamicCast
add esp, 0x14
mov esi, eax
push esi
mov ecx, edi
call fcn.004b0230
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 2
test eax, eax
jne 0x4b03ca
mov ecx, edi
call fcn.004afca0
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x4b03e1
mov edx, dword [ebp - 0x50]
push edx
push eax
mov eax, dword [ebp - 0x4c]
push 1
push eax
call ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push 0
push 0
mov dword [ebp + 0x24], eax
mov eax, dword [edx + 0x14]
push 3
mov edi, ecx
mov ebx, ecx
call eax
mov edx, dword [edi]
push eax
mov eax, dword [edx + 0x10]
mov ecx, edi
call eax
mov edx, dword [ebx]
push eax
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
movzx ecx, ax
push ecx
mov ecx, ebx
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp + 0x24]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
mov dword [ebp - 0x34], edi
xor ebx, ebx
mov byte [ebp - 4], 3
cmp edi, ebx
jne 0x4b0441
mov edx, dword [ebp - 0x14]
push str.InternetConnect_Failed.
push edx
call fcn.004af360
cmp esi, ebx
je 0x4b04b2
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
cmp eax, 1
je 0x4b04b2
mov eax, dword [esi + 0xc]
mov eax, dword [eax - 0xc]
cmp eax, ebx
je 0x4b0482
mov edx, dword [esi]
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
push eax
push 0x2b
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x4b0482
mov ecx, dword [ebp - 0x14]
push str.InternetSetOption_INTERNET_OPTION_PROXY_USERNAME__Failed.
push ecx
call fcn.004af360
mov edx, dword [esi + 0x10]
mov eax, dword [edx - 0xc]
cmp eax, ebx
je 0x4b04b2
push eax
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov ecx, esi
call edx
push eax
push 0x2c
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x4b04b2
mov eax, dword [ebp - 0x14]
push str.InternetSetOption_INTERNET_OPTION_PROXY_PASSWORD__Failed.
push eax
call fcn.004af360
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp + 0x20]
push ecx
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x20], ebx
mov dword [ebp + 0x20], ebx
call fcn.004ae190
mov esi, eax
test esi, 0x4000000
je 0x4b04fd
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryW]
test eax, eax
jne 0x4b04fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4b04fd
mov edx, dword [ebp - 0x14]
push str.DeleteUrlCacheEntry_Failed.
push edx
call fcn.004af360
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
xor ecx, ecx
cmp eax, 4
mov eax, dword [ebp - 0x48]
setne cl
dec ecx
and ecx, 0x800000
or ecx, 0x200
or esi, ecx
cmp eax, ebx
je 0x4b052e
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x4c]
push edx
push edi
push 2
push ecx
call eax
mov ecx, dword [ebp - 0x18]
lea edx, [ebp + 0x24]
push edx
call fcn.004af1b0
mov eax, dword [eax]
push ebx
push esi
push ebx
push ebx
push ebx
push eax
mov eax, dword [ebp + 0xc]
push eax
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4b0573
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
cmp eax, ebx
jne 0x4b0588
mov ecx, dword [ebp - 0x14]
push str.HttpOpenRequest_Failed.
push ecx
call fcn.004af360
cmp dword [ebp - 0x20], ebx
je 0x4b05ae
push 4
lea edx, [ebp - 0x20]
push edx
push 0x1f
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x4b05ae
mov eax, dword [ebp - 0x14]
push str.InternetSetOption__INTERNET_OPTION_SECURITY_FLAGS___Failed.
push eax
call fcn.004af360
mov eax, dword [ebp + 0x10]
mov esi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
cmp eax, ebx
je 0x4b05e0
cmp word [eax], bx
je 0x4b05e0
mov ecx, dword [ebp - 0x10]
push 0x20000000
push 0xffffffffffffffff
push eax
push ecx
call esi
test eax, eax
jne 0x4b05e0
mov edx, dword [ebp - 0x14]
push str.HttpAddRequestHeaders_Failed.
push edx
call fcn.004af360
mov ebx, dword [ebp + 0x20]
and ebx, 1
jne 0x4b065c
call fcn.004b0ad0
test eax, eax
je 0x4b061c
mov ecx, dword [ebp - 0x10]
push 4
lea eax, [ebp + 8]
push eax
push 0x41
push ecx
mov dword [ebp + 8], 1
call dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x4b065c
mov edx, dword [ebp - 0x14]
push str.InternetSetOption__INTERNET_OPTION_HTTP_DECODING___Failed.
push edx
call fcn.004af360
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], eax
jmp 0x4b0630
mov ecx, dword [ebp - 0x10]
push 0xa0000000
push 0xffffffffffffffff
push str.Accept_Encoding:_identity__q1.0____q0
push ecx
call esi
test eax, eax
je 0x4b06ba
push str.identity__q1.0____q0
push 0x8000001a
lea ecx, [ebp - 0x3c]
call fcn.004b00b0
test eax, eax
je 0x4b0630
mov edx, dword [ebp - 0x10]
push edx
push 3
lea ecx, [ebp - 0x50]
call fcn.004ae0b0
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp - 0x10]
push esi
lea ecx, [ebp - 0x2c]
push edi
lea eax, [ebp - 0x50]
mov dword [ebp - 0x38], ecx
push edx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
call fcn.004ae0e0
test eax, eax
jne 0x4b06e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f0c
jne 0x4b06d7
mov eax, dword [ebp - 0x10]
push eax
push 5
lea ecx, [ebp - 0x50]
call fcn.004ae0b0
test eax, eax
jne 0x4b06c5
push 0x2f0c
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4b06d7
push str.HttpAddRequestHeaders__Accept_Encoding:_identity__q1.0___Failed.
push edi
call fcn.004af360
mov ecx, dword [ebp - 0x10]
push esi
push edi
push ecx
lea ecx, [ebp - 0x3c]
call fcn.004ae0e0
test eax, eax
jne 0x4b06e5
mov edx, dword [ebp - 0x14]
push str.HttpSendRequest_Failed.
push edx
call fcn.004af360
xor esi, esi
cmp ebx, esi
jne 0x4b0745
call fcn.004b0ad0
test eax, eax
jne 0x4b0745
mov ecx, dword [ebp - 0x10]
push esi
lea eax, [ebp + 8]
push eax
push esi
push 0x1d
push ecx
mov dword [ebp + 8], esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2f76
je 0x4b0745
cmp eax, 0x7a
je 0x4b072c
mov edx, dword [ebp - 0x14]
push str.HttpQueryInfo__HTTP_QUERY_CONTENT_ENCODING___Failed.
push edx
call fcn.004af360
push 0x2f8f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x14]
push str.Content_Encoding_Field_should_not_be_included_in_the_response_header.
push eax
call fcn.004af360
mov edx, dword [0x5603cc]
mov eax, dword [edx + 0xc]
mov ecx, 0x5603cc
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov ecx, dword [ebp - 0x10]
push ecx
push 6
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 5
call fcn.004ae0b0
mov ebx, dword [ebp - 0x14]
test eax, eax
jne 0x4b0795
mov eax, dword [ebp - 0x10]
push esi
lea edx, [ebp + 8]
push edx
push 0x16
push eax
mov ecx, ebx
call fcn.004afb40
test eax, eax
jne 0x4b0795
push str.HttpQueryInfo_HTTPQUERY_RAW_HEADERS_CRLF__Failed.
push ebx
call fcn.004af360
mov eax, dword [ebp - 0x10]
push esi
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x24]
push edx
push 0x20000005
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4b07d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
je 0x4b07d3
push str.HttpQueryInfo__HTTPQUERY_CONTENT_LEGNTH__HTTP_QUERY_FLAG_NUMBER___Failed.
push ebx
call fcn.004af360
mov eax, 0x100000
cmp dword [ebp - 0x24], eax
mov dword [ebp + 0x20], eax
lea eax, [ebp + 0x20]
ja 0x4b07e6
lea eax, [ebp - 0x24]
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x68]
call fcn.004ae8a0
mov eax, dword [ebp - 0x10]
mov edi, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
push esi
push esi
lea edx, [ebp - 0x1c]
push edx
push eax
mov byte [ebp - 4], 6
call edi
test eax, eax
je 0x4b08a5
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4b08a5
lea ecx, [ebp + 0x20]
push ecx
push eax
lea ecx, [ebp - 0x68]
call fcn.004ae500
mov esi, eax
test esi, esi
je 0x4b08d4
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x1c]
cmp edx, dword [ebp + 0x20]
jb 0x4b083f
lea eax, [ebp + 0x20]
mov edx, dword [eax]
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x30]
push ecx
push edx
push esi
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4b08df
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], ecx
test eax, eax
je 0x4b087b
mov edx, dword [ebp - 0x50]
push edx
mov edx, dword [ebp - 0x4c]
lea ecx, [ebp - 0x44]
push ecx
push 7
push edx
call eax
jmp 0x4b087d
xor eax, eax
mov ecx, dword [ebp - 0x64]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x30]
push 0
add dword [ecx + 8], eax
add dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x10]
push 0
lea eax, [ebp - 0x1c]
push eax
push ecx
call edi
test eax, eax
jne 0x4b080f
mov ecx, dword [ebp - 0x10]
push 0
lea edx, [ebp - 0x28]
push edx
lea eax, [ebx + 0xc]
push eax
push 0x20000013
push ecx
mov dword [ebp - 0x28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4b08ea
push str.HttpQueryInfo__HTTP_QUERY_STATUS_CODE__HTTP_QUERY_FLAG_NUMBER___Failed.
push ebx
call fcn.004af360
push str.CChunkStream::GetBufferAppendLength_Failed.
push ebx
call fcn.004af360
push str.InternetReadFile_Failed.
push ebx
call fcn.004af360
lea edx, [ebp - 0x68]
push edx
lea ecx, [ebx + 0x10]
call fcn.004ae830
lea eax, [ebp + 8]
lea ecx, [ebx + 8]
push eax
call fcn.0049a040
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x68], vtable.HttpIOImpl::CChunkStream.0
call fcn.004ae640
lea ecx, [ebp + 8]
mov dword [ebp - 0x68], vtable.HttpIOImpl::CHttpIOImplBase_void_.0
call fcn.0046f800
lea ecx, [ebp - 0x10]
call fcn.004ae090
lea ecx, [ebp - 0x34]
call fcn.004ae090
lea ecx, [ebp - 0x2c]
call fcn.004ae090
lea ecx, [ebp - 0x50]
call fcn.004ae480
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x4b0957
mov edx, dword [ecx]
mov eax, dword [edx + 0x30]
push 1
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20