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

Disassembly:
mov eax, 0x19074
call fcn.004af200
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x508c90]
mov edx, dword [0x508c94]
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [0x508c98]
push ebp
push esi
push edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x40]
xor ebp, ebp
mov ebx, 4
rep stosd dword es:[edi], eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x38], edx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x24], 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.004add1e
add esp, 0xc
lea edx, [esp + 0x2c]
push ebp
push edx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov al, byte [esp + 0x2c]
push ebp
test bl, al
push ebp
mov dword [esp + 0x18], ebp
push ebp
jne 0x416255
lea eax, [esp + 0x4c]
push 1
push eax
jmp 0x41625b
lea ecx, [esp + 0x4c]
push ebp
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
mov dword [esp + 0x1c], eax
cmp esi, ebp
jne 0x416279
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x19074
ret
push ebp
lea edx, [esp + 0x34]
push 0x84000100
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x19090]
push eax
lea eax, [esp + 0x3c]
push eax
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
cmp ebx, ebp
jne 0x4162b2
mov dword [esp + 0x10], 0xffffffff
jmp 0x416459
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea edx, [esp + 0x14]
push ebp
push edx
push ebp
push 0x13
push ebx
call edi
mov eax, dword [esp + 0x14]
inc eax
push eax
call fcn.004d35be
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x20], esi
jne 0x4162e9
mov dword [esp + 0x10], 0xffffffff
jmp 0x416459
lea ecx, [esp + 0x14]
push 0
push ecx
push esi
push 0x13
push ebx
call edi
test eax, eax
jne 0x416307
mov dword [esp + 0x10], 0xffffffff
jmp 0x416459
push esi
call fcn.004af15e
add esp, 4
cmp eax, 0xc8
je 0x416324
mov dword [esp + 0x10], 0xffffffff
jmp 0x416459
lea edx, [esp + 0x28]
push 0
lea eax, [esp + 0x1c]
push edx
push eax
push 0x20000005
push ebx
call edi
test eax, eax
jne 0x416349
mov dword [esp + 0x10], 0xffffffff
jmp 0x416459
mov esi, dword [esp + 0x1908c]
push esi
call fcn.00415ea0
mov ecx, dword [esp + 0x1c]
add esp, 4
cmp ecx, eax
jne 0x416377
mov edx, dword [esp + 0x19090]
mov dword [esp + 0x10], 0xfffffffe
mov dword [edx], ecx
jmp 0x416459
push 0x508c9c
push esi
call fcn.004af260
mov esi, eax
add esp, 8
test esi, esi
jne 0x416398
mov dword [esp + 0x10], 0xffffffff
jmp 0x41644c
mov ecx, 0x6401
xor eax, eax
lea edi, [esp + 0x80]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x80]
push eax
push 0x19000
push ecx
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x416427
mov eax, dword [esp + 0x14]
test eax, eax
je 0x416431
push 0
push ebp
push esi
call fcn.004ae593
mov eax, dword [esp + 0x20]
push esi
push eax
lea edx, [esp + 0x94]
push 1
push edx
add ebp, eax
call fcn.004ae335
mov edx, dword [esp + 0x40]
mov ecx, 0x6401
add edx, eax
xor eax, eax
lea edi, [esp + 0x9c]
add esp, 0x1c
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x80]
push eax
push 0x19000
push ecx
push ebx
mov dword [esp + 0x34], edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4163c5
mov dword [esp + 0x10], 0xffffffff
jmp 0x41644c
mov eax, dword [esp + 0x18]
cmp ebp, eax
je 0x416443
mov dword [esp + 0x10], 0xffffffff
jmp 0x41644c
mov edx, dword [esp + 0x19090]
mov dword [edx], eax
test esi, esi
je 0x416459
push esi
call fcn.004ae2b8
add esp, 4
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x416466
push ebx
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x41647e
push eax
call fcn.004d35e7
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x19074
ret