Function at 0x4bd1d0
Capabilities:
Check internet connectivity via wininet
Create http request
Query remote server for available data
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a74e
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5472f8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], edx
mov esi, ecx
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x4bd441
call fcn.004e8630
push eax
push 0
call fcn.004f1eb0
mov edi, eax
add esp, 8
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x4bd416
test esi, esi
je 0x4bd24b
mov dword [esi], ebx
push dword [ebp + 8]
push 0
call fcn.004f1eb0
add esp, 8
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 1
push 0
push 0x80000000
push 0
push 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov ebx, eax
test ebx, ebx
je 0x4bd3f0
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4bd313
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4bd29c
push 0
push 0
push 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
push edi
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4bd2ea
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4bd2d4
xor ecx, ecx
mov esi, 3
cmp eax, edi
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmove esi, ecx
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 2
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2ef1
mov ecx, 0xc
mov esi, 2
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmove esi, ecx
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
cmp dword [ebp + 0xc], 0
jne 0x4bd3dd
xor esi, esi
lea eax, [ebp - 0x10]
push esi
push esi
push eax
push ebx
mov dword [ebp - 0x10], esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x4bd391
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4bd3c8
push eax
call fcn.00424b6b
mov edi, eax
add esp, 4
mov dword [ebp - 0x28], edi
mov byte [ebp - 4], 2
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x10]
push edi
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4bd3a4
add esi, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test edi, edi
je 0x4bd377
push edi
call fcn.00424b28
add esp, 4
push 0
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
jne 0x4bd333
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 0xc
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
mov esi, 0xc
mov byte [ebp - 4], 1
test edi, edi
je 0x4bd3e2
push edi
call fcn.00424b28
add esp, 4
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
mov eax, dword [ebp - 0x14]
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [eax], esi
xor esi, esi
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
mov esi, 3
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4bd3fb
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 1
push dword [ebp - 0x20]
call ebx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4bd419
push eax
call fcn.00424b28
add esp, 4
jmp 0x4bd419
or esi, 0xffffffff
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x4bd42d
push edi
call fcn.00424b28
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret