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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4c962b
push eax
mov eax, 0x10070
mov dword fs:[0], esp
call fcn.004a0690
push ebx
push ebp
push esi
push edi
xor ebx, ebx
lea eax, [esp + 0x2c]
push ebx
push eax
mov dword [esp + 0x10090], 1
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea ecx, [esp + 0x44]
push str.Agent_ld
push ecx
call fcn.004a0634
mov al, byte [esp + 0x38]
add esp, 0xc
test al, 4
push ebx
push ebx
push ebx
jne 0x4071f6
lea edx, [esp + 0x4c]
push 4
push edx
jmp 0x4071fc
lea eax, [esp + 0x4c]
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
cmp ebp, ebx
je 0x407342
mov ecx, dword [str.Accept:___r_n_r_n]
mov edx, dword [0x5054d8]
mov eax, dword [0x5054dc]
mov dword [esp + 0x30], ecx
mov ecx, dword [0x5054e0]
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x38], eax
call fcn.004b7ff9
mov esi, dword [esp + 0x10090]
push ebx
lea edx, [esp + 0x34]
push 0x84000100
push edx
mov byte [esp + 0x10094], 2
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x3c]
push eax
push esi
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
jne 0x40727c
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x407331
mov ecx, dword [esp + 0x10094]
push ebx
push 0x1001
push ecx
lea ecx, [esp + 0x24]
call fcn.004b810b
test eax, eax
je 0x407331
lea edx, [esp + 0x28]
push ebx
lea eax, [esp + 0x18]
push edx
push eax
push 0x20000005
push esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x4072c6
mov dword [esp + 0x14], ebx
mov ecx, 0x4000
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x80]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x10]
push ecx
push 0x4000
push edx
push esi
call edi
test eax, eax
je 0x407328
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x407371
push eax
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x20]
call fcn.004b8262
lea ecx, [esp + 0x10]
lea edx, [esp + 0x80]
push ecx
push 0x4000
push edx
push esi
call edi
test eax, eax
jne 0x4072f5
lea ecx, [esp + 0x18]
call fcn.004b8326
lea ecx, [esp + 0x18]
mov byte [esp + 0x10088], 1
call fcn.004b804e
lea ecx, [esp + 0x10090]
mov byte [esp + 0x10088], bl
call fcn.004b79fc
lea ecx, [esp + 0x10094]
mov dword [esp + 0x10088], 0xffffffff
call fcn.004b79fc
or eax, 0xffffffff
jmp 0x4073c3
lea ecx, [esp + 0x18]
call fcn.004b8326
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebp
call esi
lea ecx, [esp + 0x18]
mov byte [esp + 0x10088], 1
call fcn.004b804e
lea ecx, [esp + 0x10090]
mov byte [esp + 0x10088], bl
call fcn.004b79fc
lea ecx, [esp + 0x10094]
mov dword [esp + 0x10088], 0xffffffff
call fcn.004b79fc
xor eax, eax
mov ecx, dword [esp + 0x10080]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1007c
ret 8