Function at 0x1400021f8
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Set http header

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1460]
mov eax, 0x1560
call fcn.140014a90
sub rsp, rax
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x15b8], rbx
mov rax, qword [0x140022008]
xor rax, rsp
mov qword [rbp + 0x1450], rax
mov r12, r8
mov rbx, rdx
mov rsi, rcx
xor r13d, r13d
mov edi, r13d
lea r14d, [r13 + 0x68]
mov r8d, r14d
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.1400064d0
mov dword [rsp + 0x60], r14d
lea rax, [rbp - 0x30]
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x70], 0xa
lea rax, [rbp - 0x1c]
mov qword [rsp + 0x78], rax
mov r15d, 0x100
mov dword [rbp - 0x80], r15d
lea rax, [rbp + 0x1e4]
mov qword [rbp - 0x58], rax
mov dword [rbp - 0x50], 0x824
lea r9, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x1400025c7
movzx eax, word [rbp - 0x7c]
mov word [rbp + 0x122c], ax
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 1]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rsi, rax
test rax, rax
jne 0x1400022eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x1400025cd
xor r9d, r9d
movzx r8d, word [rbp + 0x122c]
lea rdx, [rbp - 0x1c]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
jne 0x140002318
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x1400025b4
lea rax, [0x14001e370]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], r13
mov dword [rsp + 0x30], r15d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, str.HTTP_1.1
lea r8, [rbp + 0x1e4]
lea rdx, [0x14001e390]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
jne 0x140002370
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x1400025a5
mov qword [rbp + 0x1248], 7
mov qword [rbp + 0x1240], r13
mov word [rbp + 0x1230], r13w
mov r8b, 1
mov edx, 0x3e8
lea rcx, [rbp + 0x1230]
call fcn.1400017a0
test al, al
je 0x1400023c4
mov qword [rbp + 0x1240], r13
lea rax, [rbp + 0x1230]
cmp qword [rbp + 0x1248], 8
cmovae rax, qword [rbp + 0x1230]
mov word [rax], r13w
lea rdx, [rbp + 0x1230]
lea rcx, [0x14001e520]
call fcn.140001220
lea rdx, [rbp + 0x1230]
cmp qword [rbp + 0x1248], 8
cmovae rdx, qword [rbp + 0x1230]
mov r9d, 0xa0000000
or r8d, 0xffffffff
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov r9d, eax
lea rcx, [rbp + 0x1230]
cmp qword [rbp + 0x1248], 8
cmovae rcx, qword [rbp + 0x1230]
lea r8, [rbp + 0x1230]
cmovae r8, qword [rbp + 0x1230]
mov rdx, qword [rbp + 0x1240]
lea rax, [r8 + rdx*2]
mov rdx, r13
mov r8, rax
sub r8, rcx
inc r8
shr r8, 1
cmp rcx, rax
cmova r8, r13
test r8, r8
je 0x140002460
mov word [rcx], r13w
lea rcx, [rcx + 2]
inc rdx
cmp rdx, r8
jne 0x140002450
test r9d, r9d
jne 0x140002483
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x1230]
call fcn.1400014b4
jmp 0x140002596
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x1230]
call fcn.1400014b4
mov r15d, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1400024de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x2f00
jne 0x1400024d3
inc r15d
cmp r15d, 3
jbe 0x140002497
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140002594
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1400024d3
mov dword [rsp + 0x40], 0x10
mov qword [rsp + 0x28], r13
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x1230]
xor r8d, r8d
lea edx, [r8 + 0x13]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140002596
xor edx, edx
lea r8d, [rdx + 0xa]
lea rcx, [rbp + 0x1230]
call fcn.140009970
mov r15d, eax
mov dword [rsp + 0x40], 0x200
mov qword [rsp + 0x28], r13
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x1250]
xor r8d, r8d
lea edx, [r8 + 5]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140002596
xor edx, edx
lea r8d, [rdx + 0xa]
lea rcx, [rbp + 0x1250]
call fcn.140009970
cmp r15d, 0xc8
jne 0x140002596
test r12, r12
je 0x140002596
mov r8d, eax
mov rdx, r12
mov rcx, rbx
call fcn.1400025f8
mov edi, eax
cmp rbx, 0xffffffffffffffff
je 0x1400025a5
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp r14, 0xffffffffffffffff
je 0x1400025b4
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp rsi, 0xffffffffffffffff
je 0x1400025c3
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, edi
jmp 0x1400025cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x1450]
xor rcx, rsp
call fcn.140003b50
mov rbx, qword [rsp + 0x15b8]
add rsp, 0x1560
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret