Function at 0x5316b0
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 0x5b100c
mov eax, dword fs:[0]
push eax
mov eax, 0x9b50
call fcn.0055cc70
mov eax, dword [0x639354]
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 0x531cce
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x531cce
mov eax, dword fs:[0x2c]
mov ecx, dword [0x643da0]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x643a94]
cmp eax, dword [ecx + 4]
jg 0x531cee
cmp byte [0x643a90], 0
push 0
push 0
push 0
je 0x531829
push 0
jmp 0x53182b
push 1
push esi
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [edi], eax
test eax, eax
je 0x531cce
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 0x5318a2
push str.https
push eax
call fcn.0056b422
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 0x531cce
push 0x5000
lea eax, [ebp - 0x9acc]
push 0
push eax
call fcn.00560a80
push dword [ebp - 0x9b30]
lea eax, [ebp - 0x9acc]
push 0x2800
push eax
call fcn.0056f8ec
mov edi, dword [ebp - 0x9b0c]
add esp, 0x18
test edi, edi
je 0x531944
cmp word [edi], 0
je 0x531944
push 0x5ba518
lea eax, [ebp - 0x9acc]
push 0x2800
push eax
call fcn.0056f877
push edi
lea eax, [ebp - 0x9acc]
push 0x2800
push eax
call fcn.0056f877
add esp, 0x18
mov eax, dword [ebp - 0x9b18]
lea ecx, [ebp - 0x9b04]
mov dword [ebp - 0x9b04], 0x5d913c
mov dword [ebp - 0x9b00], 0
push dword [ebp - 0x9b08]
mov eax, dword [eax]
test esi, esi
je 0x531977
push 0x84a83000
jmp 0x53197c
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 0x531cce
test esi, esi
je 0x5319e3
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 0x531cce
mov esi, dword [ebp - 0x9b20]
test esi, esi
je 0x531a67
cmp word [esi], 0
je 0x531a67
push 0x800
lea eax, [ebp - 0xacc]
push 0
push eax
call fcn.00560a80
push esi
push str.Cookie:__s_r_n
lea eax, [ebp - 0xacc]
push 0x400
push eax
call fcn.00460920
lea eax, [ebp - 0xacc]
push 0x400
push eax
call fcn.0056b163
add esp, 0x24
push 0x20000000
push eax
lea eax, [ebp - 0xacc]
push eax
push dword [ebx]
call edi
test eax, eax
je 0x531cce
push 0x800
lea eax, [ebp - 0x12cc]
push 0
push eax
call fcn.00560a80
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.00460920
lea eax, [ebp - 0x12cc]
push 0x400
push eax
call fcn.0056b163
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 0x531cce
push 0x208
lea eax, [ebp - 0x2cc]
push 0
push eax
call fcn.00560a80
push dword [ebp + 0x20]
lea eax, [ebp - 0x2cc]
push str.Content_Length:__lu_r_n
push 0x104
push eax
call fcn.00460920
lea eax, [ebp - 0x2cc]
push 0x104
push eax
call fcn.0056b163
add esp, 0x24
push 0x20000000
push eax
lea eax, [ebp - 0x2cc]
push eax
push dword [ebx]
call esi
test eax, eax
je 0x531cce
mov eax, dword [ebp + 0x38]
mov esi, dword [eax]
mov esi, dword [esi]
cmp byte [esi + 0xd], 0
jne 0x531c56
lea ecx, [ecx]
lea edi, [esi + 0x10]
push edi
lea ecx, [ebp - 0x9afc]
call fcn.0043f520
lea eax, [edi + 0x18]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebp - 0x9ae4]
call fcn.0043f520
push 0x800
lea eax, [ebp - 0x1acc]
mov dword [ebp - 4], 0xffffffff
push 0
push eax
call fcn.00560a80
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.00460920
lea eax, [ebp - 0x1acc]
push 0x400
push eax
call fcn.0056b163
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 0x531cc9
call fcn.00440f40
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x531c34
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x531c30
lea ecx, [ecx]
cmp esi, dword [eax + 8]
jne 0x531c30
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x531c20
mov esi, eax
jmp 0x531c4c
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x531c4c
mov edi, edi
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x531c40
cmp byte [esi + 0xd], 0
je 0x531b50
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 0x531cce
push dword [ebx]
mov ecx, dword [ebp - 0x9b08]
call fcn.00531640
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 0x531cc2
cmp dword [ebp - 0xc4], 0x12c
jae 0x531cce
mov eax, 1
jmp 0x531cd0
call fcn.00440f40
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.0055c3a9
mov esp, ebp
pop ebp
ret 0x34
push 0x643a94
call fcn.0055c868
add esp, 4
cmp dword [0x643a94], 0xffffffff
jne 0x531816
mov dword [ebp - 4], 0
call fcn.00468ff0
push 0x643a94
mov byte [0x643a90], al
mov dword [ebp - 4], 0xffffffff
call fcn.0055c81e
add esp, 4
jmp 0x531816