Function at 0x4c0a80
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 0x5139fe
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5522f8]
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 0x4c0cf1
call fcn.004ec4b0
push eax
push 0
call fcn.004f5d20
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 0x4c0cc6
test esi, esi
je 0x4c0afb
mov dword [esi], ebx
push dword [ebp + 8]
push 0
call fcn.004f5d20
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 0x4c0ca0
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4c0bc3
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4c0b4c
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 0x4c0b9a
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4c0b84
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 0x4c0cab
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 2
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4c0cab
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 0x4c0cab
cmp dword [ebp + 0xc], 0
jne 0x4c0c8d
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 0x4c0c41
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4c0c78
push eax
call fcn.004276a9
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 0x4c0c54
add esi, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test edi, edi
je 0x4c0c27
push edi
call fcn.00427666
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 0x4c0be3
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 0xc
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4c0cab
mov esi, 0xc
mov byte [ebp - 4], 1
test edi, edi
je 0x4c0c92
push edi
call fcn.00427666
add esp, 4
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4c0cab
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 0x4c0cab
mov esi, 3
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x4c0cab
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 0x4c0cc9
push eax
call fcn.00427666
add esp, 4
jmp 0x4c0cc9
or esi, 0xffffffff
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x4c0cdd
push edi
call fcn.00427666
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