Function at 0x4035b0
Capabilities:
Check http status code
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
sub esp, 0x80
mov eax, dword [0x42e294]
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x403863
mov ecx, dword [str.Accept:___r_n_r_n]
mov dword [ebp - 0x20], ecx
mov edx, dword [0x427788]
mov dword [ebp - 0x1c], edx
mov eax, dword [0x42778c]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x427790]
mov dword [ebp - 0x14], ecx
push 0x40
push 0
lea edx, [ebp - 0x60]
push edx
call fcn.00412a10
add esp, 0xc
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
push str.Agent_ld
lea eax, [ebp - 0x60]
push eax
call fcn.0041269a
add esp, 0xc
mov ecx, dword [ebp - 0xc]
and ecx, 4
jne 0x403641
push 0
push 0
push 0
push 4
lea edx, [ebp - 0x60]
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x64], eax
jmp 0x403656
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x403663
xor eax, eax
jmp 0x403865
push 0
push 0x84000100
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
jne 0x4036a1
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
mov dword [ebp - 0x68], 4
push 0
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x70]
push ecx
push 0x20000013
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x4036e0
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x64]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
cmp dword [ebp - 0x70], 0xc8
jb 0x4036f2
cmp dword [ebp - 0x70], 0x12b
jbe 0x40370d
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
mov dword [ebp - 0x68], 4
push 0
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x74]
push edx
push 0x20000005
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40374c
mov ecx, dword [ebp - 0x6c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
push 0x4277a0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00412683
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x403781
mov ecx, dword [ebp - 0x6c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
push 0x2800
call fcn.00411d20
add esp, 4
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4037c4
mov ecx, dword [ebp - 8]
push ecx
call fcn.00412543
add esp, 4
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
cmp dword [ebp - 0x74], 0
je 0x40382a
lea ecx, [ebp - 0x78]
push ecx
push 0x2800
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x403809
mov ecx, dword [ebp - 8]
push ecx
call fcn.00412543
add esp, 4
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x403865
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x78]
push edx
push 1
mov eax, dword [ebp - 4]
push eax
call fcn.00412fd1
add esp, 0x10
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp - 0x78]
mov dword [ebp - 0x74], ecx
jmp 0x4037c4
mov edx, dword [ebp - 4]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
push eax
call fcn.00412e64
add esp, 4
mov ecx, dword [ebp - 8]
push ecx
call fcn.00412543
add esp, 4
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, 1
jmp 0x403865
xor eax, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041234d
mov esp, ebp
pop ebp
ret 8