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

Disassembly:
push ebp
lea ebp, [esp - 0x40a4]
mov eax, 0x40a4
call fcn.00434200
push 0xffffffffffffffff
push 0x449c56
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x45f684]
xor eax, ebp
mov dword [ebp + 0x40a0], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor ebx, ebx
mov dword [ebp - 4], ebx
push ebx
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x1c], 1
mov byte [ebp - 4], 2
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea ecx, [ebp + 0x4000]
push str.Agent_ld
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
test byte [ebp - 0x24], 4
push ebx
push ebx
push ebx
jne 0x40ad0b
push 4
lea edx, [ebp + 0x4000]
push edx
jmp 0x40ad13
push ebx
lea eax, [ebp + 0x4000]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x40ad75
mov byte [ebp - 4], bl
mov eax, dword [ebp + 0x40ac]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad45
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x40b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad6e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40b002
lea ecx, [ebp - 0x48]
call fcn.0041ebae
push ebx
mov byte [ebp - 4], 3
mov ecx, 8
mov esi, str.Accept:___r_n_r_n
lea edi, [ebp + 0x4080]
rep movsd dword es:[edi], dword [esi]
push 0x84000100
lea ecx, [ebp + 0x4080]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, dword [ebp + 0x40ac]
push eax
mov eax, dword [ebp - 0x14]
lea edx, [ebp + 0x4080]
push edx
push edi
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
cmp esi, ebx
jne 0x40ae24
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041ec82
lea eax, [edi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40adf0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x40b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad6e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40b002
push ebx
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x18]
push edx
push 0x20000005
push esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x20], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x40ae4a
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x38]
call fcn.0041ebae
push ebx
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0x40b0]
push 0x9001
push eax
lea ecx, [ebp - 0x38]
call fcn.0041ef5a
cmp eax, ebx
jne 0x40aee0
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.0041ec82
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041ec82
lea eax, [edi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aea6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x40b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad6e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40b002
lea ecx, [ebp - 0x28]
push ecx
push 0x3fff
lea edx, [ebp]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
lea ecx, [ebp - 0x38]
jne 0x40af63
mov byte [ebp - 4], 3
call fcn.0041ec82
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041ec82
lea eax, [edi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40af2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x40b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad6e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40b002
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x40af9a
call fcn.0041eb4c
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.0041ec82
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041ec82
mov dword [ebp - 4], 1
jmp 0x40afb7
push eax
lea edx, [ebp]
push edx
call fcn.0041e8fc
jmp 0x40aee0
lea eax, [edi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40afd6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x40b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40afff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x40a0]
xor ecx, ebp
call fcn.0042eae0
add ebp, 0x40a4
mov esp, ebp
pop ebp
ret