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

Disassembly:
mov eax, 0x1907c
call fcn.004420a0
push ebx
push ebp
push esi
xor esi, esi
push edi
lea eax, [esp + 0x2c]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x48]
rep stosd dword es:[edi], eax
call dword [0x46c27c]
push eax
lea ecx, [esp + 0x4c]
push str.Agent_ld
push ecx
call fcn.0044186a
mov al, byte [esp + 0x38]
add esp, 0xc
test al, 4
push esi
push esi
push esi
jne 0x416592
lea edx, [esp + 0x54]
push 1
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
mov dword [esp + 0x14], ebp
jmp 0x4165a4
lea eax, [esp + 0x54]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x14], eax
mov ebp, eax
cmp ebp, esi
jne 0x4165b6
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1907c
ret
mov ecx, dword [str.Accept:___r_n_r_n]
mov edi, dword [esp + 0x19094]
mov edx, dword [0x47f53c]
mov eax, dword [0x47f540]
mov dword [esp + 0x38], ecx
mov ecx, dword [0x47f544]
push 0x47f534
push edi
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
call fcn.004421ed
mov ebx, eax
add esp, 8
cmp ebx, esi
jne 0x416606
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1907c
ret
push esi
lea edx, [esp + 0x3c]
push 0x84000100
push edx
call dword [0x46c228]
mov ecx, dword [esp + 0x19098]
push eax
lea eax, [esp + 0x44]
push eax
push ecx
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, esi
mov dword [esp + 0x20], eax
jne 0x416652
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call fcn.004420cf
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1907c
ret
lea edx, [esp + 0x30]
push esi
lea ecx, [esp + 0x14]
push edx
push ecx
push 0x20000005
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x44], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x416685
mov dword [esp + 0x10], esi
mov dl, byte [esp + 0x1f]
sub esp, 0x10
mov ebp, esp
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x38], esp
mov byte [ebp], dl
xor edx, edx
mov dword [ebp + 4], edx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
cmp edi, 0xfffffffd
mov dword [esp + 0x38], edi
jbe 0x4166bc
call fcn.00451e5b
xor edx, edx
mov ecx, dword [ebp + 4]
cmp ecx, edx
je 0x4166e1
mov al, byte [ecx - 1]
test al, al
je 0x4166e1
cmp al, 0xff
je 0x4166e1
cmp edi, edx
jne 0x416705
dec al
push edx
mov byte [ecx - 1], al
mov ecx, ebp
call fcn.00405c50
jmp 0x416739
cmp edi, edx
jne 0x4166f0
push 1
mov ecx, ebp
call fcn.00405c50
jmp 0x416739
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x4166fc
cmp eax, edi
jae 0x41670d
push 1
mov ecx, ebp
call fcn.00405c50
push edi
mov ecx, ebp
call fcn.00409280
mov esi, dword [esp + 0x190a4]
mov ecx, edi
mov edi, dword [ebp + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x38]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov esi, dword [esp + 0x44]
mov dword [ebp + 8], eax
mov byte [eax + ecx], 0
call fcn.00416450
mov ecx, dword [esp + 0x20]
add esp, 0x10
cmp ecx, eax
jne 0x416774
push ebx
call fcn.004420cf
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 4
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1907c
ret
mov ebp, dword [esp + 0x20]
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x88]
push ecx
push 0x19000
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x416807
mov eax, dword [esp + 0x18]
test eax, eax
je 0x41681e
push 0
push esi
push ebx
call fcn.0044245e
mov eax, dword [esp + 0x24]
push ebx
add esi, eax
push eax
lea eax, [esp + 0x9c]
push 1
push eax
call fcn.00442200
mov edi, dword [esp + 0x40]
mov ecx, 0x6401
add edi, eax
xor eax, eax
mov dword [esp + 0x40], edi
lea edi, [esp + 0xa4]
rep stosd dword es:[edi], eax
add esp, 0x1c
lea ecx, [esp + 0x18]
lea edx, [esp + 0x88]
push ecx
push 0x19000
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4167a5
push ebx
call fcn.004420cf
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1907c
ret
push ebx
call fcn.004420cf
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 4
push ebp
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
mov edi, dword [esp + 0x10]
xor eax, eax
cmp esi, edi
pop edi
setne al
dec eax
and eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1907c
ret