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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x38]
sub rsp, 0x138
mov rax, qword [0x1400850b0]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r14, r9
mov r12, r8
mov qword [rsp + 0x60], r8
mov rsi, rdx
mov qword [rsp + 0x70], rdx
mov r13, rcx
mov qword [rbp - 0x78], rcx
mov qword [rbp - 0x70], rdx
mov qword [rbp - 0x68], r8
mov qword [rbp - 0x80], r9
mov rax, qword [rbp + 0xa0]
mov qword [rsp + 0x58], rax
mov rax, qword [rbp + 0xa8]
mov qword [rsp + 0x50], rax
mov r15, r8
cmp qword [r8 + 0x18], 0x10
jb 0x140028892
mov r15, qword [r8]
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [r15 + rbx], 0
jne 0x1400288a0
xor eax, eax
mov qword [rbp], rax
mov qword [rbp + 0x10], rax
mov qword [rbp + 0x18], 0xf
mov byte [rbp], al
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x48], eax
mov edi, eax
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x78], rax
test rax, rax
je 0x140028cd3
mov rdx, r13
cmp qword [r13 + 0x18], 8
jb 0x1400288f9
mov rdx, qword [r13]
mov r8d, 0x1bb
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x68], rax
test rax, rax
je 0x140028cc8
mov r8, rsi
cmp qword [rsi + 0x18], 8
jb 0x140028926
mov r8, qword [rsi]
mov dword [rsp + 0x30], 0x800000
xor ecx, ecx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rcx
xor r9d, r9d
lea rdx, str.POST
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
je 0x140028cb8
mov qword [rbp - 0x60], rdi
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], 7
mov word [rbp - 0x60], di
mov r8d, 6
lea rdx, str.Expect
lea rcx, [rbp - 0x60]
call fcn.140007930
nop
mov qword [rbp - 0x40], rdi
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], 7
mov word [rbp - 0x40], di
mov r8d, 0xc
lea rdx, str.100_continue
lea rcx, [rbp - 0x40]
call fcn.140007930
nop
mov rdx, qword [r14 + 8]
cmp rdx, qword [r14 + 0x10]
je 0x1400289ff
movaps xmm0, xmmword [rbp - 0x60]
movups xmmword [rdx], xmm0
movaps xmm1, xmmword [rbp - 0x50]
movups xmmword [rdx + 0x10], xmm1
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], 7
mov word [rbp - 0x60], di
movaps xmm0, xmmword [rbp - 0x40]
movups xmmword [rdx + 0x20], xmm0
movaps xmm1, xmmword [rbp - 0x30]
movups xmmword [rdx + 0x30], xmm1
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], 7
mov word [rbp - 0x40], di
add qword [r14 + 8], 0x40
jmp 0x140028a0c
lea r8, [rbp - 0x60]
mov rcx, r14
call fcn.14002e970
nop
lea rcx, [rbp - 0x60]
call fcn.1400231f0
mov qword [rbp - 0x60], rdi
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], 7
mov word [rbp - 0x60], di
mov r8d, 0xc
lea rdx, str.Content_Type
lea rcx, [rbp - 0x60]
call fcn.140007930
nop
mov qword [rbp - 0x40], rdi
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], 7
mov word [rbp - 0x40], di
mov r8d, 0x10
lea rdx, str.application_json
lea rcx, [rbp - 0x40]
call fcn.140007930
nop
mov rdx, qword [r14 + 8]
cmp rdx, qword [r14 + 0x10]
je 0x140028abb
movaps xmm0, xmmword [rbp - 0x60]
movups xmmword [rdx], xmm0
movaps xmm1, xmmword [rbp - 0x50]
movups xmmword [rdx + 0x10], xmm1
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], 7
mov word [rbp - 0x60], di
movaps xmm0, xmmword [rbp - 0x40]
movups xmmword [rdx + 0x20], xmm0
movaps xmm1, xmmword [rbp - 0x30]
movups xmmword [rdx + 0x30], xmm1
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], 7
mov word [rbp - 0x40], di
add qword [r14 + 8], 0x40
jmp 0x140028ac8
lea r8, [rbp - 0x60]
mov rcx, r14
call fcn.14002e970
nop
lea rcx, [rbp - 0x60]
call fcn.1400231f0
mov rdi, qword [r14]
mov r12, qword [r14 + 8]
cmp rdi, r12
je 0x140028b57
nop dword [rax]
lea r8, [0x140079214]
mov rdx, rdi
lea rcx, [rbp - 0x60]
call fcn.140008890
nop
lea r8, [rdi + 0x20]
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.140008900
nop
lea rcx, [rbp - 0x60]
call fcn.1400067f0
lea rcx, [rbp - 0x20]
call fcn.1400067e0
mov r9d, 0x20000000
mov r8d, dword [rbp - 0x10]
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x140028b45
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.WinHttpAddRequestHeaders_error:__d_n
call fcn.140027d40
lea rcx, [rbp - 0x20]
call fcn.1400067f0
add rdi, 0x40
cmp rdi, r12
jne 0x140028ae0
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
mov r9, r15
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov edi, eax
test eax, eax
je 0x140028caa
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov edi, eax
test eax, eax
je 0x140028caa
mov dword [rsp + 0x44], 4
mov qword [rsp + 0x28], r12
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
nop dword [rax]
nop dword [rax + rax]
mov dword [rsp + 0x40], r12d
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140028c96
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140028caa
lea ecx, [rax + 1]
call fcn.140031f2c
mov rbx, rax
mov r8d, dword [rsp + 0x40]
inc r8d
xor edx, edx
mov rcx, rax
call fcn.1400347d0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x40]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x140028c44
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error__u_in_WinHttpReadData._n
call fcn.140027d40
jmp 0x140028c82
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140006ba0
nop
mov r8, rax
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp - 0x60]
call fcn.140026b20
mov rdx, rax
mov rcx, qword [rsp + 0x58]
call fcn.140006ad0
lea rcx, [rbp - 0x60]
call fcn.140006a70
nop
lea rcx, [rbp - 0x20]
call fcn.140006a70
mov rcx, rbx
call fcn.140031c90
cmp dword [rsp + 0x40], 0
jbe 0x140028caa
jmp 0x140028bd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.140027d40
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r12, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rsi, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
setne bl
lea rcx, [rbp]
call fcn.140006a70
nop
mov rcx, r13
call fcn.1400067f0
nop
mov rcx, rsi
call fcn.1400067f0
nop
mov rcx, r12
call fcn.140006a70
nop
mov rcx, r14
call fcn.140026140
movzx eax, bl
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140031c70
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret