Function at 0x403650
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 eax, 0x422ea8
mov ebp, esp
push edi
lea ecx, [ebp - 0x18]
lea edi, [ebp - 0x45c]
push esi
xor esi, esi
push ebx
sub esp, 0x49c
mov ebx, 0x41f030
movzx edx, byte [ebp + 0x10]
mov dword [ebp - 0x444], ebx
xor ebx, ebx
mov dword [ebp - 0x440], eax
mov byte [ebp - 0x469], dl
mov edx, 0x403a13
mov dword [ebp - 0x438], edx
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 0x434], esp
mov dword [esp], edi
call fcn.00421aa0
mov dword [ebp - 0x460], esi
lea eax, [ebp - 0x460]
mov ecx, 0xffffffff
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x458], ecx
call sub.WININET.DLL_InternetGetConnectedState
sub esp, 8
xor edx, edx
test eax, eax
mov dword [ebp - 0x468], edx
je 0x403970
mov dword [esp], 0x2e
xor edx, edx
mov eax, 0xffffffff
mov dword [ebp - 0x470], edx
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x458], eax
xor esi, esi
call fcn.00407a40
mov dword [esp], eax
xor ecx, ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], esi
call sub.WININET.DLL_InternetOpenA
mov dword [ebp - 0x474], eax
sub esp, 0x14
test eax, eax
je 0x403964
xor esi, esi
mov edi, 1
xor eax, eax
mov dword [esp + 0x1c], edi
mov edi, dword [ebp + 8]
mov edx, 3
mov dword [esp + 0x18], esi
mov esi, dword [ebp - 0x474]
xor ebx, ebx
mov dword [esp + 0x14], edx
mov ecx, 0x50
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.WININET.DLL_InternetConnectA
mov dword [ebp - 0x478], eax
sub esp, 0x20
test eax, eax
je 0x403948
xor eax, eax
xor edx, edx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
xor ebx, ebx
cmp byte [ebp - 0x469], 0
mov edi, 1
mov esi, 0x400000
mov dword [esp + 0x1c], edi
mov eax, str.POST
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
jne 0x4037bf
mov eax, 0x4244b5
mov dword [esp + 4], eax
mov ebx, dword [ebp - 0x478]
mov ecx, 0xffffffff
mov dword [ebp - 0x458], ecx
mov dword [esp], ebx
call sub.WININET.DLL_HttpOpenRequestA
mov dword [ebp - 0x47c], eax
sub esp, 0x20
test eax, eax
je 0x40392c
mov dword [esp], eax
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x10], ecx
xor edi, edi
xor esi, esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], edx
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
je 0x403910
lea edi, [ebp - 0x28]
mov dword [esp], edi
call fcn.004086c0
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x40398c
mov edi, dword [ebp - 0x47c]
lea edx, [ebp - 0x464]
mov ebx, 0x3ff
mov dword [esp + 0xc], edx
lea eax, [ebp - 0x428]
mov esi, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
mov dword [ebp - 0x458], esi
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
je 0x4038b8
mov eax, dword [ebp - 0x464]
test eax, eax
je 0x4038b8
xor ecx, ecx
lea ebx, [ebp - 0x428]
mov edi, 1
mov byte [eax + ebp - 0x428], cl
mov edx, dword [ebp - 0x464]
lea eax, [ebp - 0x28]
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [ebp - 0x458], edi
call fcn.00408730
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x464]
add dword [ecx], esi
jmp 0x40382e
mov eax, dword [ebp - 0x24]
test eax, eax
jle 0x403a4e
inc eax
mov esi, 1
mov dword [esp], eax
mov dword [ebp - 0x458], esi
call fcn.0041f830
mov dword [ebp - 0x470], eax
mov edi, dword [ebp - 0x470]
mov eax, dword [ebp - 0x28]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
lea edx, [ebp - 0x28]
mov ebx, 0xffffffff
mov dword [esp], edx
mov dword [ebp - 0x458], ebx
call fcn.00408710
nop
lea esi, [esi]
mov esi, dword [ebp - 0x47c]
mov ecx, 0xffffffff
mov dword [ebp - 0x458], ecx
mov dword [esp], esi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x478]
mov edi, 0xffffffff
mov dword [ebp - 0x458], edi
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov edx, dword [ebp - 0x474]
mov ebx, 0xffffffff
mov dword [ebp - 0x458], ebx
mov dword [esp], edx
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov ecx, dword [ebp - 0x470]
mov dword [ebp - 0x468], ecx
lea eax, [ebp - 0x45c]
mov dword [esp], eax
call fcn.00421b80
mov eax, dword [ebp - 0x468]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x47c]
lea edi, [ebp - 0x464]
mov esi, 0x3ff
mov dword [esp + 0xc], edi
lea edx, [ebp - 0x428]
mov eax, 1
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], ebx
mov dword [ebp - 0x458], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
je 0x4038b8
mov eax, dword [ebp - 0x464]
test eax, eax
je 0x4038b8
xor ecx, ecx
lea ebx, [ebp - 0x428]
mov byte [eax + ebp - 0x428], cl
mov edx, dword [ebp - 0x464]
lea eax, [ebp - 0x28]
mov dword [esp + 4], ebx
mov ecx, 1
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [ebp - 0x458], ecx
call fcn.00408730
jmp 0x40398c
mov dword [esp], 8
mov ebx, 1
mov dword [ebp - 0x458], ebx
call fcn.0041f830
mov dword [ebp - 0x470], eax
mov byte [eax], 0
jmp 0x4038f2