Function at 0x401d50
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, 0x420
mov eax, dword [0x42a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov esi, edx
push ebx
lea edx, [ebp - 0x420]
push edx
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x41c], ecx
mov dword [ebp - 0x420], ebx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
jne 0x401da5
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412e08
mov esp, ebp
pop ebp
ret
mov eax, dword [0x42bf94]
push ebx
mov dword [ebp - 0x408], ebx
push ebx
cmp eax, ebx
je 0x401dca
push eax
push 3
push esi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [ebp - 0x414], ebx
jmp 0x401ddb
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x414], eax
mov ebx, eax
test ebx, ebx
je 0x401f98
push 1
push 0
push 3
push 0
push 0
push 0x50
push edi
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
mov dword [ebp - 0x418], esi
test esi, esi
je 0x401f91
cmp byte [ebp + 0x10], 0
mov eax, str.POST
jne 0x401e17
mov eax, 0x425590
mov ecx, dword [ebp - 0x40c]
push 1
push 0x400000
push 0
push 0
push 0
push ecx
push eax
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
mov dword [ebp - 0x40c], edi
test edi, edi
je 0x401f8a
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x401f83
call fcn.00403b80
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea edx, [ebp - 0x408]
push edx
mov esi, eax
push 0x3ff
lea eax, [ebp - 0x404]
push eax
push edi
mov dword [ebp - 0x410], esi
call ebx
test eax, eax
je 0x401eef
jmp 0x401e90
mov edi, dword [ebp - 0x408]
test edi, edi
je 0x401ee9
lea ecx, [ebp - 0x404]
push ecx
mov byte [ebp + edi - 0x404], 0
call fcn.00403bd0
mov eax, dword [ebp - 0x41c]
add esp, 4
test eax, eax
je 0x401ec3
mov edx, dword [ebp - 0x408]
add dword [eax], edx
mov edx, dword [ebp - 0x40c]
lea eax, [ebp - 0x408]
push eax
push 0x3ff
lea ecx, [ebp - 0x404]
push ecx
push edx
call ebx
mov esi, dword [ebp - 0x410]
test eax, eax
jne 0x401e90
mov edi, dword [ebp - 0x40c]
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x401f41
lea esi, [ebx + 1]
lea esp, [esp]
push esi
call fcn.00413e95
add esp, 4
test eax, eax
je 0x401f00
xor ecx, ecx
mov dword [ebp - 0x408], eax
test ebx, ebx
je 0x401f2f
mov edx, dword [ebp - 0x410]
mov edi, dword [edx + 4]
mov esi, dword [edx]
mov dl, byte [esi + ecx]
mov byte [eax + ecx], dl
inc ecx
cmp ecx, edi
jb 0x401f24
mov esi, dword [ebp - 0x410]
mov edi, dword [ebp - 0x40c]
mov byte [ebx + eax], 0
jmp 0x401f58
push 8
call fcn.00413e95
add esp, 4
test eax, eax
je 0x401f41
mov dword [ebp - 0x408], eax
mov byte [eax], 0
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x401f6e
push eax
call fcn.00413e5b
add esp, 4
push esi
call fcn.00413e5b
mov ebx, dword [ebp - 0x414]
mov esi, dword [ebp - 0x418]
add esp, 4
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x408]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412e08
mov esp, ebp
pop ebp
ret