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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010c
call fcn.005ca540
mov eax, dword [0x6c6f60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10104], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x1010c], eax
lea eax, [ebp - 0x100fc]
push 0
push eax
mov dword [ebp - 0x100f8], 0
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea eax, [ebp - 0x44]
push str.Agent_ld
push eax
call fcn.0047e710
add esp, 0xc
lea eax, [ebp - 0x44]
test byte [ebp - 0x100fc], 4
push 0
push 0
push 0
jne 0x5c2ee1
push 4
jmp 0x5c2ee3
push 0
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
test ebx, ebx
jne 0x5c2f04
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005c950e
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
lea eax, [ebp - 0x100ec]
push edi
push 4
push eax
push 2
push ebx
mov dword [ebp - 0x100ec], 0x1770
call esi
push 4
lea eax, [ebp - 0x100ec]
push eax
push 6
push ebx
call esi
push 4
lea eax, [ebp - 0x10100]
mov dword [ebp - 0x10100], 1
push eax
push 0x41
push ebx
call esi
mov ecx, 0x27
lea edi, [ebp - 0xe4]
mov esi, str.Accept:___r_nAccept_Language:_zh_cn_r_nAccept_Encoding:_gzip__deflate_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0__MyIE2__.NET_CLR_1.1.4322_
lea eax, [ebp - 0x100e4]
rep movsd dword es:[edi], dword [esi]
push 0x10000
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.005e2ec0
add esp, 0xc
lea eax, [ebp - 0xe4]
push 0
push 0x84000100
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp - 0x10104]
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
jne 0x5c2fc6
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005c950e
mov esp, ebp
pop ebp
ret 8
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea eax, [ebp - 0x100f0]
push 0
push eax
lea eax, [ebp - 0x10108]
mov dword [ebp - 0x100e8], 0
push eax
push 0x20000013
push esi
mov dword [ebp - 0x100f0], 4
call edi
test eax, eax
je 0x5c30c9
cmp dword [ebp - 0x10108], 0xc8
jne 0x5c30c9
push 0
lea eax, [ebp - 0x100f0]
push eax
lea eax, [ebp - 0x100e8]
push eax
push 0x20000005
push esi
call edi
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
neg eax
sbb eax, eax
and dword [ebp - 0x100e8], eax
lea eax, [ebp - 0x100f4]
push eax
push 0x4000
lea eax, [ebp - 0x100e4]
push eax
push esi
call edi
test eax, eax
je 0x5c30a7
cmp dword [ebp - 0x100f4], 0
je 0x5c30d3
cmp byte [ebp - 0x100e4], 0
jne 0x5c3068
xor eax, eax
jmp 0x5c307a
lea eax, [ebp - 0x100e4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5c3071
sub eax, edx
mov ecx, dword [ebp - 0x1010c]
push eax
lea eax, [ebp - 0x100e4]
push eax
call fcn.00491210
lea eax, [ebp - 0x100f4]
push eax
push 0x4000
lea eax, [ebp - 0x100e4]
push eax
push esi
call edi
test eax, eax
jne 0x5c3052
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005c950e
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 0x100f8], 0xffffffff
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x100f8]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.005c950e
mov esp, ebp
pop ebp
ret 8