Function at 0x47c710
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 0x519018
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x55b2f8]
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 0x47c981
call fcn.004a47e0
push eax
push 0
call fcn.004ac350
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 0x47c956
test esi, esi
je 0x47c78b
mov dword [esi], ebx
push dword [ebp + 8]
push 0
call fcn.004ac350
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 0x47c930
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x47c853
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x47c7dc
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 0x47c82a
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x47c814
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 0x47c93b
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 2
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x47c93b
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 0x47c93b
cmp dword [ebp + 0xc], 0
jne 0x47c91d
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 0x47c8d1
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x47c908
push eax
call fcn.004d8b4b
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 0x47c8e4
add esi, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test edi, edi
je 0x47c8b7
push edi
call fcn.004d8b08
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 0x47c873
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 0xc
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x47c93b
mov esi, 0xc
mov byte [ebp - 4], 1
test edi, edi
je 0x47c922
push edi
call fcn.004d8b08
add esp, 4
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x47c93b
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 0x47c93b
mov esi, 3
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edi, dword [ebp - 0x1c]
jmp 0x47c93b
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 0x47c959
push eax
call fcn.004d8b08
add esp, 4
jmp 0x47c959
or esi, 0xffffffff
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x47c96d
push edi
call fcn.004d8b08
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