Function at 0x1400303d0
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 [0x1400990a0]
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 0x140030442
mov r15, qword [r8]
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [r15 + rbx], 0
jne 0x140030450
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 0x140030883
mov rdx, r13
cmp qword [r13 + 0x18], 8
jb 0x1400304a9
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 0x140030878
mov r8, rsi
cmp qword [rsi + 0x18], 8
jb 0x1400304d6
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 0x140030868
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.140007cf0
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.140007cf0
nop
mov rdx, qword [r14 + 8]
cmp rdx, qword [r14 + 0x10]
je 0x1400305af
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 0x1400305bc
lea r8, [rbp - 0x60]
mov rcx, r14
call fcn.140038550
nop
lea rcx, [rbp - 0x60]
call fcn.140025bd0
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.140007cf0
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.140007cf0
nop
mov rdx, qword [r14 + 8]
cmp rdx, qword [r14 + 0x10]
je 0x14003066b
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 0x140030678
lea r8, [rbp - 0x60]
mov rcx, r14
call fcn.140038550
nop
lea rcx, [rbp - 0x60]
call fcn.140025bd0
mov rdi, qword [r14]
mov r12, qword [r14 + 8]
cmp rdi, r12
je 0x140030707
nop dword [rax]
lea r8, [0x14008bba4]
mov rdx, rdi
lea rcx, [rbp - 0x60]
call fcn.140008da0
nop
lea r8, [rdi + 0x20]
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.140008e10
nop
lea rcx, [rbp - 0x60]
call fcn.140006c30
lea rcx, [rbp - 0x20]
call fcn.140006c00
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 0x1400306f5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.WinHttpAddRequestHeaders_error:__d_n
call fcn.14002f8b0
lea rcx, [rbp - 0x20]
call fcn.140006c30
add rdi, 0x40
cmp rdi, r12
jne 0x140030690
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 0x14003085a
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov edi, eax
test eax, eax
je 0x14003085a
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 0x140030846
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x14003085a
lea ecx, [rax + 1]
call fcn.140040a6c
mov rbx, rax
mov r8d, dword [rsp + 0x40]
inc r8d
xor edx, edx
mov rcx, rax
call fcn.140043310
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 0x1400307f4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error__u_in_WinHttpReadData._n
call fcn.14002f8b0
jmp 0x140030832
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140006fe0
nop
mov r8, rax
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp - 0x60]
call fcn.140027e40
mov rdx, rax
mov rcx, qword [rsp + 0x58]
call fcn.140006f10
lea rcx, [rbp - 0x60]
call fcn.140006eb0
nop
lea rcx, [rbp - 0x20]
call fcn.140006eb0
mov rcx, rbx
call fcn.1400407d0
cmp dword [rsp + 0x40], 0
jbe 0x14003085a
jmp 0x140030780
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.14002f8b0
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.140006eb0
nop
mov rcx, r13
call fcn.140006c30
nop
mov rcx, rsi
call fcn.140006c30
nop
mov rcx, r12
call fcn.140006eb0
nop
mov rcx, r14
call fcn.140027430
movzx eax, bl
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.1400407b0
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret