Function at 0x140013e70
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Set http header

Disassembly:
push r15
xor eax, eax
mov r10, rdx
xor edx, edx
push r14
push r13
push r12
push rbp
mov ebp, r9d
xor r9d, r9d
push rdi
push rsi
mov rsi, r8
xor r8d, r8d
push rbx
mov rbx, rcx
mov ecx, 8
mov rdi, rbx
sub rsp, 0xc8
rep stosd dword [rdi], eax
xor edi, edi
mov r13, qword [rsp + 0x150]
mov rcx, r10
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
test rax, rax
jne 0x140013eca
mov dword [rbx], 1
jmp 0x1400141a7
movzx r8d, bp
mov rdx, qword [rsi]
mov rdi, rax
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rbp, rax
test rax, rax
jne 0x140013efc
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [rbx], 2
jmp 0x1400141a7
mov rax, qword [rsp + 0x138]
xor esi, esi
xor r11d, r11d
xor r9d, r9d
mov qword [rsp + 0x28], rsi
mov rcx, rbp
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x30], r11d
mov r8, qword [rax]
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
jne 0x140013f56
mov rsi, qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call rsi
mov rcx, rdi
call rsi
mov dword [rbx], 3
jmp 0x1400141a7
xor r10d, r10d
lea rax, [rsp + 0x80]
xor r9d, r9d
mov dword [rbx], r10d
lea rdx, [0x14005a1fa]
mov rcx, rax
lea r15, [0x14005a1fc]
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x70], r9
mov qword [rsp + 0x78], r9
mov dword [rsp + 0x58], r10d
mov qword [rsp + 0x40], rax
call fcn.140025ab0
mov r14, qword [r13 + 8]
mov r12, qword [r13]
lea r13, [rsp + 0xa0]
cmp r14, r12
je 0x140013fe1
mov rdx, r12
mov r8, r15
mov rcx, r13
add r12, 0x20
call fcn.1400271c0
mov r8, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0xa0]
call fcn.140023b60
mov rcx, r13
call fcn.140022c50
jmp 0x140013fa6
or r8d, 0xffffffff
mov rdx, qword [rsp + 0x80]
mov r9d, 0xa0000000
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x48], rax
jne 0x14001402b
mov rcx, rsi
mov rsi, qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call rsi
mov rcx, rbp
call rsi
mov rcx, rdi
call rsi
mov dword [rbx], 4
jmp 0x140014193
mov rax, qword [rsp + 0x148]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov r9, qword [rax]
mov rax, qword [rax + 8]
mov qword [rsp + 0x30], r8
xor r8d, r8d
sub rax, r9
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140014162
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x14001415a
xor ecx, ecx
lea rax, [rsp + 0x5c]
xor r8d, r8d
mov edx, 0x20000013
mov qword [rsp + 0x28], rcx
lea r9, [rsp + 0x58]
mov rcx, rsi
mov dword [rsp + 0x5c], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140014152
xor edx, edx
mov r15, qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
lea r14, [rsp + 0x60]
mov dword [rsp + 0x64], edx
xor eax, eax
mov rdx, r14
mov rcx, rsi
mov dword [rsp + 0x60], eax
call r15
test eax, eax
jne 0x1400140dd
mov dword [rbx], 8
jmp 0x140014168
mov edx, dword [rsp + 0x60]
lea r12, [rsp + 0xa0]
mov rcx, r12
call fcn.14001f130
mov r13, qword [rsp + 0xa0]
mov r8d, dword [rsp + 0x60]
mov rcx, rsi
lea r9, [rsp + 0x64]
mov rdx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x140014123
mov dword [rbx], 9
mov rcx, r12
call fcn.14001f190
jmp 0x140014168
mov r9, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0x70]
mov r8, r13
mov rcx, qword [rsp + 0x48]
call fcn.14001eec0
mov rcx, r12
call fcn.14001f190
cmp dword [rsp + 0x60], 0
jne 0x1400140bf
jmp 0x140014168
mov dword [rbx], 7
jmp 0x140014168
mov dword [rbx], 6
jmp 0x140014168
mov dword [rbx], 5
mov rcx, rsi
mov rsi, qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call rsi
mov rcx, rbp
call rsi
mov rcx, rdi
call rsi
mov eax, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x48]
lea rcx, [rbx + 8]
mov dword [rbx + 4], eax
call fcn.14001f1a0
mov rcx, qword [rsp + 0x40]
call fcn.140022c50
mov rcx, qword [rsp + 0x48]
call fcn.14001f190
add rsp, 0xc8
mov rax, rbx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret