Function at 0x40d400
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Parse url
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41faa0
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1d1c
call fcn.0041a2b0
mov eax, dword [0x42807c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x18]
push 0x400
push eax
lea eax, [ebp - 0x14a4]
push eax
mov dword [ebp - 0x1cd0], ebx
mov dword [ebp - 0x1ce0], esi
mov dword [ebp - 0x1ce4], edi
mov dword [ebp - 0x1cd8], ecx
mov dword [ebp - 0x1ccc], edx
call fcn.00410519
add esp, 0xc
push 0x3c
lea ecx, [ebp - 0x1d2c]
push 0
push ecx
mov dword [ebp - 0x1cdc], 0
call fcn.00412f10
lea edx, [ebp - 0xa9c]
mov dword [ebp - 0x1d28], edx
add esp, 0xc
lea eax, [ebp - 0xca4]
mov dword [ebp - 0x1d1c], eax
lea edx, [ebp - 0x1cc4]
mov dword [ebp - 0x1d08], edx
lea eax, [ebp - 0x1abc]
lea edx, [ebp - 0x1d2c]
push edx
mov dword [ebp - 0x1d00], eax
mov eax, 0x104
push 0
lea ecx, [ebp - 0x16ac]
mov dword [ebp - 0x1d0c], eax
mov dword [ebp - 0x1cfc], eax
mov dword [ebp - 0x1d24], eax
mov dword [ebp - 0x1d04], eax
mov dword [ebp - 0x1d18], eax
mov dword [ebp - 0x1cf4], eax
mov dword [ebp - 0x1d10], ecx
push 0
lea eax, [ebp - 0x14a4]
lea ecx, [ebp - 0x18b4]
push eax
mov dword [ebp - 0x1d2c], 0x3c
mov dword [ebp - 0x1cf8], ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x40d930
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x40d930
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x6a4]
test eax, eax
je 0x40d57e
lea edx, [eax + 4]
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x1cc8], ecx
jmp 0x40d560
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d560
sub eax, dword [ebp - 0x1cc8]
sar eax, 1
je 0x40d57e
push 0
push 0
push edx
push 3
jmp 0x40d586
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [edi], eax
test eax, eax
je 0x40d930
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionExW]
push 0
push 4
lea edx, [ebp - 0x1cc8]
push edx
push 2
push eax
mov dword [ebp - 0x1cc8], 0x7530
call esi
mov ecx, dword [edi]
push 0
push 4
lea eax, [ebp - 0x1cc8]
push eax
push 5
push ecx
call esi
mov eax, dword [edi]
push 0
push 4
lea edx, [ebp - 0x1cc8]
push edx
push 6
push eax
call esi
mov ecx, dword [ebp - 0x1d08]
mov edx, dword [ebp - 0x1d10]
mov eax, dword [ebp - 0x1d14]
push ebx
push 0
push 3
push ecx
mov ecx, dword [ebp - 0x1d1c]
push edx
mov edx, dword [edi]
push eax
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, dword [ebp - 0x1cd8]
mov dword [esi], eax
test eax, eax
je 0x40d930
xor eax, eax
push 0x7fe
push eax
lea ecx, [ebp - 0x892]
push ecx
mov word [ebp - 0x894], ax
call fcn.00412f10
mov edx, dword [ebp - 0x1d00]
push edx
lea eax, [ebp - 0x894]
push 0x400
push eax
call fcn.0040fdc6
mov ecx, dword [ebp - 0x1cf8]
push ecx
lea edx, [ebp - 0x894]
push 0x400
push edx
call fcn.0040fd51
mov edx, dword [esi]
add esp, 0x24
push ebx
push 0x84280000
lea eax, [ebp - 0x1cf0]
push eax
push 0
push 0
lea ecx, [ebp - 0x894]
push ecx
mov eax, 0x425ce4
push eax
push edx
mov dword [ebp - 0x1cf0], 0x425cec
mov dword [ebp - 0x1cec], 0
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, dword [ebp - 0x1ccc]
mov dword [esi], eax
test eax, eax
je 0x40d930
mov ebx, dword [ebx + 0x6a4]
test ebx, ebx
je 0x40d7e5
lea eax, [ebx + 0x20c]
mov ecx, eax
lea edx, [ecx + 2]
mov dword [ebp - 0x1cc8], edx
lea ecx, [ecx]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40d6d0
sub ecx, dword [ebp - 0x1cc8]
sar ecx, 1
je 0x40d7e5
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d6f0
sub eax, edx
sar eax, 1
lea edx, [eax + 1]
lea eax, [ebx + 0x414]
mov dword [ebp - 0x1cc8], edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d711
sub eax, esi
sar eax, 1
lea edi, [eax + 1]
xor ecx, ecx
mov eax, edx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040ed47
mov esi, eax
xor ecx, ecx
add esp, 4
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040ed47
mov edx, dword [ebp - 0x1cd0]
mov ebx, eax
mov eax, dword [ebp - 0x1cc8]
lea ecx, [eax + eax]
mov eax, dword [edx + 0x6a4]
add esp, 4
push ecx
add eax, 0x20c
push eax
push esi
call fcn.00418db0
mov edx, dword [ebp - 0x1cd0]
mov eax, dword [edx + 0x6a4]
lea ecx, [edi + edi]
push ecx
add eax, 0x414
push eax
push ebx
call fcn.00418db0
mov ecx, dword [ebp - 0x1cc8]
mov edx, dword [ebp - 0x1ccc]
mov eax, dword [edx]
add esp, 0x18
push ecx
push esi
push 0x2b
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov ecx, dword [ebp - 0x1ccc]
mov edx, dword [ecx]
push edi
push ebx
push 0x2c
push edx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push esi
call fcn.0040f211
push ebx
call fcn.0040f211
mov edi, dword [ebp - 0x1ce4]
mov esi, dword [ebp - 0x1ccc]
add esp, 8
mov eax, dword [esi]
push 0x80000000
push 0xd
push str.Accept:___r_n
push eax
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
je 0x40d930
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jne 0x40d813
xor eax, eax
cmp eax, ebx
jbe 0x40d8b9
xor ecx, ecx
push 0x7e
push ecx
lea edx, [ebp - 0x92]
push edx
mov word [ebp - 0x94], cx
call fcn.00412f10
xor eax, eax
add esp, 0xc
lea edx, [ebp - 0x94]
cmp eax, ebx
jbe 0x40d874
push eax
push ebx
push str.Range:_bytes_d__d
call fcn.0040eaa0
add esp, 0xc
jmp 0x40d882
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040ed5d
mov esp, ebp
pop ebp
ret 0x14
push ebx
push str.Range:_bytes_d_
call fcn.0040eaa0
add esp, 8
lea eax, [ebp - 0x94]
lea edx, [eax + 2]
jmp 0x40d890
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d890
mov ecx, dword [esi]
sub eax, edx
push 0x10000000
sar eax, 1
push eax
lea eax, [ebp - 0x94]
push eax
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
je 0x40d930
mov edx, dword [esi]
push 0
push 0
push 0
push 0
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x40d930
mov eax, dword [esi]
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea ecx, [ebp - 0x1cc8]
push ecx
lea edx, [ebp - 0x1cd4]
push edx
lea ecx, [ebp - 0x94]
push ecx
push 0x20000013
push eax
mov dword [ebp - 0x1cd4], 0x80
mov dword [ebp - 0x1cc8], 0
call ebx
test eax, eax
je 0x40d926
mov eax, dword [ebp - 0x94]
cmp eax, 0x12d
je 0x40d93b
cmp eax, 0x12e
je 0x40d93b
cmp eax, 0x12c
jae 0x40d930
mov dword [ebp - 0x1cdc], 1
mov eax, dword [ebp - 0x1cdc]
jmp 0x40d856
lea edx, [ebp - 0x1cd4]
push edx
mov edx, dword [esi]
lea eax, [ebp - 0x1ce8]
push eax
lea ecx, [ebp - 0x14a4]
push ecx
push 0x21
push edx
mov dword [ebp - 0x1ce8], 0x800
mov dword [ebp - 0x1cd4], 0
call ebx
mov ebx, dword [ebp - 0x1cd8]
push edi
mov eax, esi
call fcn.0040d9a0
mov ebx, dword [ebp - 0x1cd0]
mov esi, dword [ebp - 0x1ce0]
mov dword [ebp - 4], 0xffffffff
jmp 0x40d475