Function at 0x40d530
Capabilities:
Check internet connectivity via wininet
Create http request
Get http content length
Read data from internet
Receive data
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x1906c
call fcn.0043b020
push ebx
push ebp
push esi
xor esi, esi
push edi
lea eax, [esp + 0x20]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [esp + 0x3c]
push str.Agent_ld
push ecx
call fcn.0043ac7e
mov al, byte [esp + 0x2c]
add esp, 0xc
mov ebx, 4
push esi
push esi
test bl, al
push esi
jne 0x40d597
lea edx, [esp + 0x44]
push 1
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x40d5a9
lea eax, [esp + 0x44]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x18], eax
mov edi, eax
cmp edi, esi
jne 0x40d5bb
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1906c
ret
mov edx, dword [0x4877b0]
mov ecx, dword [str.Accept:___r_n_r_n]
mov eax, dword [0x4877b4]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [0x4877b8]
push esi
lea edx, [esp + 0x2c]
push 0x84000100
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x19088]
push eax
lea eax, [esp + 0x34]
push eax
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebp, eax
cmp ebp, esi
jne 0x40d623
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1906c
ret
lea edx, [esp + 0x24]
push esi
lea eax, [esp + 0x14]
push edx
push eax
push 0x20000005
push ebp
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x38], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40d64e
mov dword [esp + 0x10], esi
mov ebx, dword [esp + 0x19084]
push ebx
call fcn.0040d4d0
mov ecx, dword [esp + 0x14]
add esp, 4
cmp ecx, eax
jne 0x40d680
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call esi
push edi
call esi
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1906c
ret
push 0x4877a8
push ebx
call fcn.0043b006
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40d6a2
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1906c
ret
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x78]
lea edx, [esp + 0x78]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push 0x19000
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40d728
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d73f
push 0
push esi
push ebx
call fcn.0043af1c
mov eax, dword [esp + 0x20]
push ebx
add esi, eax
push eax
lea eax, [esp + 0x8c]
push 1
push eax
call fcn.0043ade3
mov edi, dword [esp + 0x38]
mov ecx, 0x6401
add edi, eax
xor eax, eax
mov dword [esp + 0x38], edi
lea edi, [esp + 0x94]
rep stosd dword es:[edi], eax
add esp, 0x1c
lea ecx, [esp + 0x14]
lea edx, [esp + 0x78]
push ecx
push 0x19000
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40d6c9
push ebx
call fcn.0043ad66
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1906c
ret
push ebx
call fcn.0043ad66
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 4
push ebp
call edi
mov eax, dword [esp + 0x18]
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, 0x1906c
ret