Function at 0x140001354
Capabilities:
Connect to http server
Create http request
Query remote server for available data
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xa8
mov rax, qword [0x140059010]
xor rax, rsp
mov qword [rbp - 9], rax
mov r13, qword [rbp + 0x7f]
xor ebx, ebx
mov qword [rbp - 0x29], rdx
mov r15d, ebx
lea rdx, [rbp - 0x41]
mov qword [rbp - 0x21], r9
mov rdi, r8
mov qword [rbp - 0x59], r8
call fcn.14000118c
mov r12d, ebx
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor r8d, r8d
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rsi, rax
test rax, rax
je 0x14000156e
mov dword [rbp - 0x15], 0x7530
mov dword [rbp - 0x51], 2
mov dword [rbp - 0x4d], 6
mov dword [rbp - 0x49], 5
mov edx, dword [rbp + rbx*4 - 0x51]
lea r8, [rbp - 0x15]
mov r9d, 4
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetSetOptionW]
inc rbx
cmp rbx, 3
jb 0x1400013dc
movzx r8d, word [rbp - 0x2d]
xor ebx, ebx
mov rdx, qword [rbp - 0x41]
xor r9d, r9d
mov qword [rsp + 0x38], rbx
mov rcx, rsi
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WININET.dll_InternetConnectW]
mov r14, rax
test rax, rax
je 0x140001560
cmp byte [rbp - 0x2b], 2
mov ecx, 0x80403000
mov r8, qword [rbp - 0x39]
mov eax, 0x80803000
mov rdx, qword [rbp - 0x29]
cmove ecx, eax
mov qword [rsp + 0x38], rbx
xor r9d, r9d
mov dword [rsp + 0x30], ecx
mov dword [rbp - 0x15], ecx
mov rcx, r14
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WININET.dll_HttpOpenRequestW]
mov rbx, rax
test rax, rax
je 0x140001555
and dword [rbp - 0x15], 0
lea r9, [rbp - 0x11]
lea r8, [rbp - 0x15]
mov dword [rbp - 0x11], 4
mov edx, 0x1f
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetQueryOptionW]
test eax, eax
je 0x1400014bf
or dword [rbp - 0x15], 0x3180
lea r8, [rbp - 0x15]
mov r9d, 4
mov rcx, rbx
lea edx, [r9 + 0x1b]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
mov r9, qword [rbp - 0x21]
mov rax, rdi
neg rax
mov rdx, rdi
mov eax, dword [rbp + 0x77]
mov rcx, rbx
sbb r8d, r8d
mov dword [rsp + 0x20], eax
call qword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x14000154c
xor edi, edi
and dword [rbp - 0x19], 0
lea rdx, [rbp - 0x19]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x140001538
mov edx, edi
mov rax, 0xffffffffffffffff
add edx, dword [rbp - 0x19]
mov rcx, r15
cmovb rdx, rax
call fcn.140021828
mov r8d, dword [rbp - 0x19]
lea r9, [rbp - 0x19]
mov edx, edi
mov rcx, rbx
add rdx, rax
mov r15, rax
call qword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [rbp - 0x19]
add edi, eax
jmp 0x14000153b
mov eax, dword [rbp - 0x19]
test eax, eax
jne 0x1400014e5
test r13, r13
je 0x140001548
mov dword [r13], edi
mov rdi, qword [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor ebx, ebx
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
test r15, r15
jne 0x14000157f
cmp r12d, 1
je 0x14000157f
mov r12d, 1
jmp 0x14000139f
mov rcx, qword [rbp - 0x41]
call fcn.140021830
mov rcx, qword [rbp - 0x39]
call fcn.140021830
mov rax, r15
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.14001a680
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret