Function at 0x40b270
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, 0x1068
call fcn.0042c4d0
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov ebp, ecx
lea eax, [esp + 0x1c]
push ebx
push eax
mov dword [ebp + 0x14], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test byte [esp + 0x1c], 0x20
je 0x40b2c8
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x40b347
mov ecx, dword [ebp + 0xc]
push 1
push 5
push ecx
mov dword [ebp + 0x18], 5
call eax
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1068
ret
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x59]
mov byte [esp + 0x58], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push eax
lea edx, [esp + 0x5c]
push str.Agent_X
push edx
call fcn.0042d14b
mov al, byte [esp + 0x28]
add esp, 0xc
test al, 4
push ebx
push ebx
push ebx
jne 0x40b316
lea eax, [esp + 0x64]
push 4
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
mov dword [esp + 0x20], esi
jmp 0x40b328
lea ecx, [esp + 0x64]
push ebx
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x20], eax
mov esi, eax
cmp esi, ebx
jne 0x40b354
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x40b347
mov edx, dword [ebp + 0xc]
push 2
push 5
push edx
mov dword [ebp + 0x18], 5
call eax
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1068
ret
mov eax, dword [ebp + 4]
mov dword [esp + 0x14], 2
cmp eax, ebx
je 0x40b379
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 0x20]
push ecx
push 1
push edx
mov dword [ebp + 0x18], 1
call eax
add esp, 0xc
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x47874c]
mov dword [esp + 0x34], eax
mov eax, dword [0x478754]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], eax
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x79]
mov byte [esp + 0x78], 0
rep stosd dword es:[edi], eax
mov edx, dword [0x478750]
or ecx, 0xffffffff
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edi, [esp + 0x34]
xor eax, eax
mov dword [esp + 0x3c], edx
push ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0x84000100
push ecx
lea ecx, [esp + 0x40]
push ecx
push ebx
lea ecx, [ebp + 0x20]
call fcn.0044f1bd
push eax
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x30], edi
je 0x40b55c
lea edx, [esp + 0x2c]
push ebx
lea eax, [esp + 0x1c]
push edx
push eax
push 0x20000005
push edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x40], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40b418
mov dword [esp + 0x18], ebx
mov eax, dword [ebp + 4]
mov dword [ebp + 0x18], 2
cmp eax, ebx
je 0x40b43e
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0xc]
push ecx
push 2
push edx
call eax
add esp, 0xc
test eax, eax
je 0x40b577
mov dword [ebp + 0x18], 3
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40b53b
lea eax, [esp + 0x10]
lea ecx, [esp + 0x78]
push eax
push 0x1000
push ecx
push edi
mov dword [esp + 0x20], ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40b545
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40b556
mov ecx, dword [ebp + 0x14]
add ecx, eax
mov eax, dword [ebp + 0x10]
cmp eax, ebx
mov dword [ebp + 0x14], ecx
je 0x40b4e9
push 8
call fcn.0044f2f1
add esp, 4
cmp eax, ebx
je 0x40b4ac
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov ebx, eax
mov edx, dword [esp + 0x10]
mov dword [ebx], edx
mov eax, dword [esp + 0x10]
push eax
call fcn.0044f2f1
mov dword [ebx + 4], eax
mov ecx, dword [esp + 0x14]
mov edx, ecx
lea esi, [esp + 0x7c]
mov edi, eax
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 0x24]
call fcn.0044cf19
mov edi, dword [esp + 0x30]
xor ebx, ebx
cmp dword [ebp + 4], ebx
je 0x40b532
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, dword [esp + 0x24]
mov edx, dword [ebp + 0x14]
sub eax, esi
lea ecx, [esp + 0x78]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x4c], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
push ecx
push 3
push edx
mov dword [esp + 0x54], eax
call dword [ebp + 4]
add esp, 0xc
test eax, eax
je 0x40b53b
cmp dword [ebp + 8], ebx
jne 0x40b45a
mov dword [esp + 0x14], 1
jmp 0x40b577
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x40b577
mov ecx, dword [ebp + 0xc]
push 4
push 5
push ecx
jmp 0x40b572
mov dword [esp + 0x14], ebx
jmp 0x40b577
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x40b577
mov edx, dword [ebp + 0xc]
push 3
push 5
mov dword [ebp + 0x18], 5
push edx
call eax
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov dword [ebp + 0x18], 4
cmp ecx, ebx
je 0x40b58d
mov dword [ebp + 0x18], 5
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x40b5af
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 0xc]
push ecx
push 4
push edx
call eax
add esp, 0xc
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp edi, ebx
je 0x40b5bc
push edi
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
mov dword [ebp + 0x1c], ebx
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1068
ret