Function at 0x40b6e0
Capabilities:
Check internet connectivity via wininet
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e814
mov eax, dword fs:[0]
push eax
mov eax, 0x108c
call fcn.0046e020
mov eax, dword [0x49d4b0]
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, ecx
mov dword [ebp - 0x1094], 0
push 0
lea eax, [ebp - 0x1090]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov dword [ebp - 0x1024], 0xf
mov dword [ebp - 0x1028], 0
mov byte [ebp - 0x1038], 0
mov dword [ebp - 0x103c], 0xf
mov dword [ebp - 0x1040], 0
mov byte [ebp - 0x1050], 0
push 5
push str.Error
lea ecx, [ebp - 0x1038]
mov byte [ebp - 4], 2
call fcn.004070e0
test byte [ebp - 0x1090], 4
push 0
push 0
push 0
jne 0x40b793
push 4
jmp 0x40b795
push 0
push str.User_Agent:_Mozilla_4.0__compatible__MSIE_7.0__Windows_NT_6.1__IEClient__Trident_7.0__SLCC2__.NET_CLR_2.0.50727__.NET_CLR_3.5.30729__.NET_CLR_3.0.30729__.NET4.0C__.NET4.0E_
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
test ebx, ebx
je 0x40b981
movdqu xmm0, xmmword [str.Accept:___r_n_r_n]
lea ecx, [ebp - 0x20]
lea edx, [ecx + 1]
movdqu xmmword [ebp - 0x20], xmm0
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b7c0
push 0
push 0x84000100
sub ecx, edx
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 0x10
push ecx
cmovae eax, dword [ebp + 8]
lea ecx, [ebp - 0x20]
push ecx
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
jne 0x40b7fa
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x40b981
xor eax, eax
mov dword [ebp - 0x1084], 0
mov dword [ebp - 0x108c], 4
mov dword [ebp - 0x106c], 7
mov dword [ebp - 0x1070], 0
mov word [ebp - 0x1080], ax
push eax
lea eax, [ebp - 0x108c]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x1084]
push eax
push 0x20000005
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
neg eax
push 0x1000
sbb eax, eax
and dword [ebp - 0x1084], eax
lea eax, [ebp - 0x1020]
push 0
push eax
call fcn.00464360
add esp, 0xc
lea eax, [ebp - 0x1088]
push eax
push 0x400
lea eax, [ebp - 0x1020]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40b975
lea esp, [esp]
cmp dword [ebp - 0x1088], 0
je 0x40ba22
cmp byte [ebp - 0x1020], 0
mov dword [ebp - 0x1054], 0xf
mov dword [ebp - 0x1058], 0
mov byte [ebp - 0x1068], 0
jne 0x40b8c5
xor ecx, ecx
jmp 0x40b8d9
lea ecx, [ebp - 0x1020]
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b8d0
sub ecx, edx
push ecx
lea eax, [ebp - 0x1020]
push eax
lea ecx, [ebp - 0x1068]
call fcn.004070e0
mov byte [ebp - 4], 4
cmp byte [ebp - 0x1020], 0
jne 0x40b8fd
xor ecx, ecx
jmp 0x40b90f
lea ecx, [ebp - 0x1020]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b906
sub ecx, edx
push ecx
lea eax, [ebp - 0x1020]
push eax
lea ecx, [ebp - 0x1050]
call fcn.004070e0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x1054], 0x10
jb 0x40b93d
push dword [ebp - 0x1068]
call fcn.0045f8c1
add esp, 4
push 0x1000
lea eax, [ebp - 0x1020]
push 0
push eax
call fcn.00464360
add esp, 0xc
lea eax, [ebp - 0x1088]
push eax
push 0x400
lea eax, [ebp - 0x1020]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40b890
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
lea eax, [ebp - 0x1038]
push eax
mov ecx, edi
call fcn.004072f0
cmp dword [ebp - 0x103c], 0x10
jb 0x40b9a6
push dword [ebp - 0x1050]
call fcn.0045f8c1
add esp, 4
cmp dword [ebp - 0x1024], 0x10
mov byte [ebp - 0x1050], 0
mov dword [ebp - 0x1040], 0
mov dword [ebp - 0x103c], 0xf
jb 0x40b9d8
push dword [ebp - 0x1038]
call fcn.0045f8c1
add esp, 4
cmp dword [ebp + 0x1c], 0x10
mov byte [ebp - 0x1038], 0
mov dword [ebp - 0x1028], 0
mov dword [ebp - 0x1024], 0xf
jb 0x40ba04
push dword [ebp + 8]
call fcn.0045f8c1
add esp, 4
mov eax, edi
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.0045f8b2
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
lea eax, [ebp - 0x1050]
jmp 0x40b987