Function at 0x5207d0
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Make an http request with a cookie
Parse url
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a5c47
mov eax, dword fs:[0]
push eax
mov eax, 0x9b50
call fcn.00546790
mov eax, dword [0x62819c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x9b08], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x9b1c], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x9b0c], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x9b14], ecx
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x9b10], ecx
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0x9b20], ecx
mov ecx, dword [ebp + 0x30]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x9b18], ecx
lea ecx, [ebp - 0x22cc]
mov ebx, dword [ebp + 0x34]
mov edi, dword [ebp + 0x2c]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x9b58], ecx
lea ecx, [ebp - 0x2acc]
mov dword [ebp - 0x9b4c], ecx
lea ecx, [ebp - 0x32cc]
mov dword [ebp - 0x9b40], ecx
lea ecx, [ebp - 0x3acc]
mov dword [ebp - 0x9b38], ecx
lea ecx, [ebp - 0x42cc]
mov dword [ebp - 0x9b30], ecx
lea ecx, [ebp - 0x4acc]
mov dword [ebp - 0x9b28], ecx
lea ecx, [ebp - 0x9b5c]
push ecx
push 0
push 0
push eax
mov dword [ebp - 0x9b50], 0
mov dword [ebp - 0x9b44], 0
mov dword [ebp - 0x9b5c], 0x3c
mov dword [ebp - 0x9b3c], 0x400
mov dword [ebp - 0x9b2c], 0x400
mov dword [ebp - 0x9b54], 0x400
mov dword [ebp - 0x9b34], 0x400
mov dword [ebp - 0x9b48], 0x400
mov dword [ebp - 0x9b24], 0x400
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x520dee
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x520dee
mov eax, dword fs:[0x2c]
mov ecx, dword [0x633954]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x6335a4]
cmp eax, dword [ecx + 4]
jg 0x520e0e
cmp byte [0x6335a0], 0
push 0
push 0
push 0
je 0x520949
push 0
jmp 0x52094b
push 1
push esi
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [edi], eax
test eax, eax
je 0x520dee
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionExW]
lea ecx, [ebp - 0x9b00]
push 0
push 4
push ecx
push 2
push eax
mov dword [ebp - 0x9b00], 0xbb8
call esi
push 0
push 4
lea eax, [ebp - 0x9b00]
push eax
push 5
push dword [edi]
call esi
push 0
push 4
lea eax, [ebp - 0x9b00]
push eax
push 6
push dword [edi]
call esi
mov eax, dword [ebp - 0x9b58]
xor esi, esi
test eax, eax
je 0x5209c2
push str.https
push eax
call fcn.00555852
add esp, 8
mov ecx, 1
test eax, eax
cmove esi, ecx
push dword [ebp - 0x9b08]
push 0
push 3
push dword [ebp - 0x9b38]
push dword [ebp - 0x9b40]
push dword [ebp - 0x9b44]
push dword [ebp - 0x9b4c]
push dword [edi]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ecx, dword [ebp - 0x9b18]
mov dword [ecx], eax
test eax, eax
je 0x520dee
push 0x5000
lea eax, [ebp - 0x9acc]
push 0
push eax
call fcn.0054b380
push dword [ebp - 0x9b30]
lea eax, [ebp - 0x9acc]
push 0x2800
push eax
call fcn.00559d1c
mov edi, dword [ebp - 0x9b0c]
add esp, 0x18
test edi, edi
je 0x520a64
cmp word [edi], 0
je 0x520a64
push 0x5ae840
lea eax, [ebp - 0x9acc]
push 0x2800
push eax
call fcn.00559ca7
push edi
lea eax, [ebp - 0x9acc]
push 0x2800
push eax
call fcn.00559ca7
add esp, 0x18
mov eax, dword [ebp - 0x9b18]
lea ecx, [ebp - 0x9b04]
mov dword [ebp - 0x9b04], 0x5c9410
mov dword [ebp - 0x9b00], 0
push dword [ebp - 0x9b08]
mov eax, dword [eax]
test esi, esi
je 0x520a97
push 0x84a83000
jmp 0x520a9c
push 0x84280000
push ecx
push 0
push 0
lea ecx, [ebp - 0x9acc]
push ecx
push dword [ebp - 0x9b1c]
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebx], eax
test eax, eax
je 0x520dee
test esi, esi
je 0x520b03
lea ecx, [ebp - 0x9b0c]
mov dword [ebp - 0x9b0c], 4
push ecx
lea ecx, [ebp - 0x9b00]
push ecx
push 0x1f
push eax
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0x9b00], 0x180
lea eax, [ebp - 0x9b00]
push 4
push eax
push 0x1f
push dword [ebx]
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov eax, dword [ebx]
mov edi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push 0x80000000
push 0xd
push str.Accept:___r_n
push eax
call edi
test eax, eax
je 0x520dee
mov esi, dword [ebp - 0x9b20]
test esi, esi
je 0x520b87
cmp word [esi], 0
je 0x520b87
push 0x800
lea eax, [ebp - 0xacc]
push 0
push eax
call fcn.0054b380
push esi
push str.Cookie:__s_r_n
lea eax, [ebp - 0xacc]
push 0x400
push eax
call fcn.0045d960
lea eax, [ebp - 0xacc]
push 0x400
push eax
call fcn.00555593
add esp, 0x24
push 0x20000000
push eax
lea eax, [ebp - 0xacc]
push eax
push dword [ebx]
call edi
test eax, eax
je 0x520dee
push 0x800
lea eax, [ebp - 0x12cc]
push 0
push eax
call fcn.0054b380
mov ecx, 0xc
lea edi, [ebp - 0x44]
mov esi, str.application_octet_stream
lea eax, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x9b10]
test ecx, ecx
cmovne eax, ecx
push eax
push str.Content_Type:__s_r_n
lea eax, [ebp - 0x12cc]
movsw word es:[edi], word [esi]
push 0x400
push eax
call fcn.0045d960
lea eax, [ebp - 0x12cc]
push 0x400
push eax
call fcn.00555593
mov esi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
add esp, 0x24
push 0x20000000
push eax
lea eax, [ebp - 0x12cc]
push eax
push dword [ebx]
call esi
test eax, eax
je 0x520dee
push 0x208
lea eax, [ebp - 0x2cc]
push 0
push eax
call fcn.0054b380
push dword [ebp + 0x20]
lea eax, [ebp - 0x2cc]
push str.Content_Length:__lu_r_n
push 0x104
push eax
call fcn.0045d960
lea eax, [ebp - 0x2cc]
push 0x104
push eax
call fcn.00555593
add esp, 0x24
push 0x20000000
push eax
lea eax, [ebp - 0x2cc]
push eax
push dword [ebx]
call esi
test eax, eax
je 0x520dee
mov eax, dword [ebp + 0x38]
mov esi, dword [eax]
mov esi, dword [esi]
cmp byte [esi + 0xd], 0
jne 0x520d76
lea ecx, [ecx]
lea edi, [esi + 0x10]
push edi
lea ecx, [ebp - 0x9afc]
call fcn.0043e510
lea eax, [edi + 0x18]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebp - 0x9ae4]
call fcn.0043e510
push 0x800
lea eax, [ebp - 0x1acc]
mov dword [ebp - 4], 0xffffffff
push 0
push eax
call fcn.0054b380
cmp dword [ebp - 0x9ad0], 8
lea ecx, [ebp - 0x9ae4]
lea eax, [ebp - 0x9afc]
cmovae ecx, dword [ebp - 0x9ae4]
cmp dword [ebp - 0x9ae8], 8
push ecx
cmovae eax, dword [ebp - 0x9afc]
push eax
push str._s:__s_r_n
lea eax, [ebp - 0x1acc]
push 0x400
push eax
call fcn.0045d960
lea eax, [ebp - 0x1acc]
push 0x400
push eax
call fcn.00555593
add esp, 0x28
push 0x20000000
push eax
lea eax, [ebp - 0x1acc]
push eax
push dword [ebx]
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
lea ecx, [ebp - 0x9afc]
test eax, eax
je 0x520de9
call fcn.0043ffb0
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x520d54
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x520d50
lea ecx, [ecx]
cmp esi, dword [eax + 8]
jne 0x520d50
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x520d40
mov esi, eax
jmp 0x520d6c
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x520d6c
mov edi, edi
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x520d60
cmp byte [esi + 0xd], 0
je 0x520c70
push dword [ebp + 0x20]
push dword [ebp - 0x9b14]
push 0
push 0
push dword [ebx]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x520dee
push dword [ebx]
mov ecx, dword [ebp - 0x9b08]
call fcn.00520760
lea eax, [ebp - 0x9b14]
mov dword [ebp - 0x9b10], 0x80
push eax
lea eax, [ebp - 0x9b10]
mov dword [ebp - 0x9b14], 0
push eax
lea eax, [ebp - 0xc4]
push eax
push 0x20000013
push dword [ebx]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x520de2
cmp dword [ebp - 0xc4], 0x12c
jae 0x520dee
mov eax, 1
jmp 0x520df0
call fcn.0043ffb0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00545ec7
mov esp, ebp
pop ebp
ret 0x34
push 0x6335a4
call fcn.00546388
add esp, 4
cmp dword [0x6335a4], 0xffffffff
jne 0x520936
mov dword [ebp - 4], 0
call fcn.00521bb0
push 0x6335a4
mov byte [0x6335a0], al
mov dword [ebp - 4], 0xffffffff
call fcn.0054633e
add esp, 4
jmp 0x520936