Function at 0x402370
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
xor ecx, ecx
sub esp, 0x448
mov dword [ebp - 4], edi
lea eax, [ebp - 0x41c]
mov dword [ebp - 0xc], ebx
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0x41c], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WININET.DLL_InternetGetConnectedState
sub esp, 8
xor edx, edx
test eax, eax
jne 0x4023c0
mov ebx, dword [ebp - 0xc]
mov eax, edx
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x421], 0
xor ebx, ebx
xor esi, esi
mov dword [esp], edi
call sub.msvcrt.dll_remove
mov dword [esp + 4], ebx
xor edx, edx
xor eax, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp], str.fortis
call sub.WININET.DLL_InternetOpenA
sub esp, 0x14
test eax, eax
mov ebx, eax
je 0x4024e6
xor esi, esi
mov eax, 1
xor edx, edx
mov dword [esp + 0x1c], eax
mov ecx, 3
xor eax, eax
mov dword [esp + 0x18], esi
mov esi, 0x50
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov ecx, dword [ebp + 8]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call sub.WININET.DLL_InternetConnectA
mov dword [ebp - 0x428], eax
sub esp, 0x20
test eax, eax
je 0x4024db
mov eax, 1
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x1c], eax
mov esi, 0x400000
xor eax, eax
mov dword [esp + 0x14], ecx
mov ecx, 0x4081ec
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov esi, dword [ebp + 0xc]
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
mov edx, dword [ebp - 0x428]
mov dword [esp], edx
call sub.WININET.DLL_HttpOpenRequestA
sub esp, 0x20
test eax, eax
mov esi, eax
je 0x4024ca
mov dword [esp], esi
xor edx, edx
xor eax, eax
mov dword [esp + 0x10], edx
xor ecx, ecx
xor edx, edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
jne 0x4024fc
mov dword [esp], esi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov edi, dword [ebp - 0x428]
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov dword [esp], ebx
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
movzx edx, byte [ebp - 0x421]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
mov eax, edx
pop ebp
ret
mov byte [ebp - 0x421], 1
mov ecx, 0x4081f0
mov dword [esp], edi
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fopen
mov edi, eax
jmp 0x402550
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x402584
xor edx, edx
mov byte [eax + ebp - 0x418], dl
mov edx, 1
mov dword [esp + 0xc], edi
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x418]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_fwrite
test edi, edi
je 0x4024bf
mov dword [esp], esi
lea ecx, [ebp - 0x420]
mov edx, 0x3ff
mov dword [esp + 0xc], ecx
lea eax, [ebp - 0x418]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
jne 0x402518
test edi, edi
je 0x4024bf
mov dword [esp], edi
call sub.msvcrt.dll_fclose
jmp 0x4024bf