Function at 0x40a3d0
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.00431ba0
push 0xffffffffffffffff
push 0x4467f6
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x45b684]
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 0x40a45b
push 4
lea edx, [ebp + 0x4000]
push edx
jmp 0x40a463
push ebx
lea eax, [ebp + 0x4000]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x40a4c5
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 0x40a495
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 0x40a4be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a752
lea ecx, [ebp - 0x48]
call fcn.0041c7cc
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 0x40a574
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041c8a0
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 0x40a540
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 0x40a4be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a752
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 0x40a59a
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x38]
call fcn.0041c7cc
push ebx
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0x40b0]
push 0x9001
push eax
lea ecx, [ebp - 0x38]
call fcn.0041cb78
cmp eax, ebx
jne 0x40a630
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.0041c8a0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041c8a0
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 0x40a5f6
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 0x40a4be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a752
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 0x40a6b3
mov byte [ebp - 4], 3
call fcn.0041c8a0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041c8a0
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 0x40a67f
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 0x40a4be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a752
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x40a6ea
call fcn.0041c76a
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.0041c8a0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.0041c8a0
mov dword [ebp - 4], 1
jmp 0x40a707
push eax
lea edx, [ebp]
push edx
call fcn.0041c51a
jmp 0x40a630
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 0x40a726
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 0x40a74f
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.0042c712
add ebp, 0x40a4
mov esp, ebp
pop ebp
ret