Function at 0x1400022e0
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.140014cf0
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.140006720
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 0x1400026af
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 0x1400023d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x1400026b5
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 0x140002400
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x14000269c
lea rax, [0x14001e378]
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, [0x14001e398]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
jne 0x140002458
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x14000268d
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 0x1400024ac
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, [0x14001e4e0]
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 0x140002548
mov word [rcx], r13w
lea rcx, [rcx + 2]
inc rdx
cmp rdx, r8
jne 0x140002538
test r9d, r9d
jne 0x14000256b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x1230]
call fcn.1400014b4
jmp 0x14000267e
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 0x1400025c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x2f00
jne 0x1400025bb
inc r15d
cmp r15d, 3
jbe 0x14000257f
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14000267c
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1400025bb
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 0x14000267e
xor edx, edx
lea r8d, [rdx + 0xa]
lea rcx, [rbp + 0x1230]
call fcn.140009bd0
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 0x14000267e
xor edx, edx
lea r8d, [rdx + 0xa]
lea rcx, [rbp + 0x1250]
call fcn.140009bd0
cmp r15d, 0xc8
jne 0x14000267e
test r12, r12
je 0x14000267e
mov r8d, eax
mov rdx, r12
mov rcx, rbx
call fcn.1400026e0
mov edi, eax
cmp rbx, 0xffffffffffffffff
je 0x14000268d
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp r14, 0xffffffffffffffff
je 0x14000269c
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp rsi, 0xffffffffffffffff
je 0x1400026ab
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, edi
jmp 0x1400026b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x1450]
xor rcx, rsp
call fcn.140003e10
mov rbx, qword [rsp + 0x15b8]
add rsp, 0x1560
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret