Function at 0x403990
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov dword [ebp - 8], esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
test esi, esi
movzx ebx, byte [ebp + 0x10]
je 0x4039b0
mov byte [esi], 0
xor edx, edx
xor edi, edi
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.WININET.DLL_InternetGetConnectedState
sub esp, 8
xor edx, edx
test eax, eax
jne 0x4039e4
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 edi, edi
mov dword [esp], 0x536150
call fcn.00407a20
mov dword [esp], 0x2e
call fcn.00408770
mov dword [esp], eax
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov dword [esp + 8], edi
mov dword [esp + 0xc], edx
mov dword [esp + 4], ecx
call sub.WININET.DLL_InternetOpenA
sub esp, 0x14
test eax, eax
mov edi, eax
je 0x403b87
xor ecx, ecx
mov eax, 1
mov edx, 3
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x14], edx
mov edx, 0x50
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov eax, dword [ebp + 8]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.WININET.DLL_InternetConnectA
mov dword [ebp - 0x428], eax
sub esp, 0x20
test eax, eax
je 0x403b7c
mov eax, 1
mov ecx, 0x400000
xor edx, edx
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], ecx
xor ecx, ecx
test bl, bl
mov dword [esp + 0x10], eax
mov eax, 0x505560
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ecx
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
jne 0x403ab6
mov eax, 0x505565
mov dword [esp + 4], eax
mov ebx, dword [ebp - 0x428]
mov dword [esp], ebx
call sub.WININET.DLL_HttpOpenRequestA
sub esp, 0x20
test eax, eax
mov ebx, eax
je 0x403b6b
mov dword [esp], ebx
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
je 0x403b60
mov byte [ebp - 0x421], 1
jmp 0x403b56
mov dword [esp], ebx
lea edx, [ebp - 0x420]
mov eax, 0x3ff
mov dword [esp + 0xc], edx
lea ecx, [ebp - 0x418]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
je 0x403b60
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x403b60
xor edx, edx
lea ecx, [ebp - 0x418]
mov byte [eax + ebp - 0x418], dl
mov dword [esp + 4], ecx
mov dword [esp], esi
call sub.msvcrt.dll_strcat
test esi, esi
jne 0x403b05
lea esi, [esi]
mov dword [esp], ebx
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov esi, dword [ebp - 0x428]
mov dword [esp], esi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov dword [esp], 0x536150
call fcn.004079f0
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