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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4e2140
push eax
mov eax, 0x19074
mov dword fs:[0], esp
call fcn.004b04f0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x518908
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], ebp
call fcn.004d49fb
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x509de0]
mov edx, dword [0x509de4]
mov dword [esp + 0x30], eax
mov eax, dword [0x509de8]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x40]
mov ebx, 4
mov dword [esp + 0x1908c], 1
rep stosd dword es:[edi], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [esp + 0x44]
push str.Agent_ld
push ecx
call fcn.004aeeec
add esp, 0xc
lea edx, [esp + 0x24]
push ebp
push edx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov al, byte [esp + 0x24]
push ebp
test bl, al
push ebp
push ebp
jne 0x41533f
lea eax, [esp + 0x4c]
push 1
push eax
jmp 0x415345
lea ecx, [esp + 0x4c]
push ebp
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [esp + 0x1c], eax
cmp edi, ebp
je 0x4154a3
push ebp
lea edx, [esp + 0x34]
push 0x84000100
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x190a0]
push eax
lea eax, [esp + 0x3c]
push eax
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
je 0x41548f
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea edx, [esp + 0x14]
push 0
push edx
push 0
push 0x13
push esi
call edi
mov eax, dword [esp + 0x14]
inc eax
push eax
call fcn.004d46ce
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x415484
lea ecx, [esp + 0x14]
push 0
push ecx
push ebp
push 0x13
push esi
call edi
test eax, eax
je 0x415484
push ebp
call fcn.004b044e
add esp, 4
cmp eax, 0xc8
jne 0x415484
lea edx, [esp + 0x28]
push 0
lea eax, [esp + 0x24]
push edx
push eax
push 0x20000005
push esi
call edi
test eax, eax
jne 0x4153fa
mov dword [esp + 0x20], eax
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x80]
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x80]
push ecx
push 0x19000
push edx
push esi
call ebx
test eax, eax
je 0x415484
mov eax, dword [esp + 0x14]
test eax, eax
je 0x415484
lea eax, [esp + 0x80]
lea ecx, [esp + 0x10]
push eax
call fcn.004d4d69
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1909c]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x18], eax
ja 0x415484
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x80]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push 0x19000
push edx
push esi
call ebx
test eax, eax
jne 0x415429
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebp, ebp
je 0x4154a3
push ebp
call fcn.004d46f7
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x4154ef
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004d4702
lea eax, [esp + 0x1c]
push eax
call fcn.00415b20
add esp, 8
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x19090], 2
call fcn.004d4ac6
lea ecx, [esp + 0x18]
mov byte [esp + 0x1908c], 1
call fcn.004d498d
mov esi, dword [esp + 0x19094]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.004d4702
mov dword [esp + 0x2c], 1
lea ecx, [esp + 0x10]
mov byte [esp + 0x1908c], 0
call fcn.004d498d
mov ecx, dword [esp + 0x19084]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x19080
ret