Function at 0x415540
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.004b04f0
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x509de0]
mov edx, dword [0x509de4]
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [0x509de8]
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.004aeeec
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 0x4155d5
lea eax, [esp + 0x4c]
push 1
push eax
jmp 0x4155db
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 0x4155f9
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 0x415632
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157d9
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.004d46ce
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x20], esi
jne 0x415669
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157d9
lea ecx, [esp + 0x14]
push 0
push ecx
push esi
push 0x13
push ebx
call edi
test eax, eax
jne 0x415687
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157d9
push esi
call fcn.004b044e
add esp, 4
cmp eax, 0xc8
je 0x4156a4
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157d9
lea edx, [esp + 0x28]
push 0
lea eax, [esp + 0x1c]
push edx
push eax
push 0x20000005
push ebx
call edi
test eax, eax
jne 0x4156c9
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157d9
mov esi, dword [esp + 0x1908c]
push esi
call fcn.00415220
mov ecx, dword [esp + 0x1c]
add esp, 4
cmp ecx, eax
jne 0x4156f7
mov edx, dword [esp + 0x19090]
mov dword [esp + 0x10], 0xfffffffe
mov dword [edx], ecx
jmp 0x4157d9
push 0x509dec
push esi
call fcn.004aeed9
mov esi, eax
add esp, 8
test esi, esi
jne 0x415718
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157cc
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 0x4157a7
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4157b1
push 0
push ebp
push esi
call fcn.004af8c6
mov eax, dword [esp + 0x20]
push esi
push eax
lea edx, [esp + 0x94]
push 1
push edx
add ebp, eax
call fcn.004af668
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 0x415745
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157cc
mov eax, dword [esp + 0x18]
cmp ebp, eax
je 0x4157c3
mov dword [esp + 0x10], 0xffffffff
jmp 0x4157cc
mov edx, dword [esp + 0x19090]
mov dword [edx], eax
test esi, esi
je 0x4157d9
push esi
call fcn.004aedef
add esp, 4
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x4157e6
push ebx
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4157fe
push eax
call fcn.004d46f7
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x19074
ret