Function at 0x4043a1
Capabilities:
Check internet connectivity via wininet
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10078
call fcn.0041e910
mov eax, dword [0x43c5a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x74], eax
xor edi, edi
push edi
lea eax, [ebp - 0x6c]
push eax
mov dword [ebp - 0x68], esi
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
jne 0x4043ed
push 0x436e0c
call fcn.00414015
or dword [esi], 0xffffffff
jmp 0x4045c8
push 0x436e40
call fcn.00414015
cmp dword [ebx + 0x14], 0x10
pop ecx
jb 0x404402
mov eax, dword [ebx]
jmp 0x404404
mov eax, ebx
push edi
push 1
push eax
call dword [sym.imp.WININET.dll_InternetCheckConnectionA]
test eax, eax
jne 0x404419
push 0x436e50
jmp 0x4043e0
push 0x436e84
call fcn.00414015
push 0x40
lea eax, [ebp - 0x54]
push edi
push eax
call fcn.004179f0
push edi
lea eax, [ebp - 0x54]
push str.Agent_ld
push eax
call fcn.00412508
add esp, 0x1c
test byte [ebp - 0x6c], 4
push edi
push edi
lea eax, [ebp - 0x54]
push edi
jne 0x404451
push 4
jmp 0x404452
push edi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x40446a
push 0x436ea0
jmp 0x4043e0
push 0x436ed0
call fcn.00414015
cmp dword [ebx + 0x14], 0x10
mov esi, str.Accept:___r_n_r_n
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
movsd dword es:[edi], dword [esi]
jb 0x40448b
mov esi, dword [ebx]
jmp 0x40448d
mov esi, ebx
push 0
push 0x84000100
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [ebp - 0x5c]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [ebp - 0x78], esi
test esi, esi
jne 0x4044de
cmp dword [ebx + 0x14], 0x10
jb 0x4044bf
mov ebx, dword [ebx]
push ebx
push 0x436ef0
call fcn.00414015
pop ecx
pop ecx
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x68]
or dword [eax], 0xffffffff
jmp 0x4045c9
cmp dword [ebx + 0x14], 0x10
jb 0x4044e6
mov ebx, dword [ebx]
push ebx
push 0x436f04
call fcn.00414015
mov eax, dword [ebp - 0x74]
pop ecx
cmp dword [eax + 0x14], 0x10
pop ecx
jb 0x4044fe
mov eax, dword [eax]
push 0x436c80
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0041379a
add esp, 0xc
xor ebx, ebx
push ebx
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x64]
push eax
push 0x20000005
push esi
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x70], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x404563
call fcn.00414957
mov esi, eax
call fcn.00414957
push dword [esi]
mov edi, eax
call fcn.00414651
push eax
push dword [edi]
push 0x436dd0
call fcn.00414015
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x5c]
add esp, 0x10
mov dword [ebp - 0x64], ebx
push 0x436dfc
call fcn.00414015
mov dword [esp], 0x10000
lea eax, [ebp - 0x10078]
push ebx
push eax
call fcn.004179f0
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
add esp, 0xc
jmp 0x4045a9
cmp dword [ebp - 0x60], 0
push dword [ebp - 0x58]
je 0x4045dd
push dword [ebp - 0x60]
lea eax, [ebp - 0x10078]
push 1
push eax
call fcn.004143df
add esp, 0x10
lea eax, [ebp - 0x60]
push eax
push 0x4000
lea eax, [ebp - 0x10078]
push eax
push esi
call ebx
test eax, eax
jne 0x40458c
push dword [ebp - 0x58]
call fcn.00413f89
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004124f9
leave
ret 0xc
call fcn.00413f89
pop ecx
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
xor eax, eax
jmp 0x4045cc