Function at 0x140022348
Capabilities:
Initialize winhttp library
Prepare http request
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 qword [rsp + 0x50], 0xfffffffffffffffe
mov rax, qword [0x140050900]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r14, r9
mov r12, r8
mov r15, rdx
mov rdi, rcx
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov r13, qword [rbp + 0xa0]
mov qword [rsp + 0x70], r13
mov rbx, qword [rbp + 0xa8]
mov rsi, qword [rbp + 0xb0]
mov rax, qword [rbp + 0xb8]
mov qword [rsp + 0x48], rax
mov rcx, r9
cmp qword [r9 + 0x18], 8
jb 0x1400223c6
mov rcx, qword [r9]
mov rax, qword [r9 + 0x10]
lea r8, [rcx + rax*2]
mov rdx, r14
jb 0x1400223d6
mov rdx, qword [r9]
lea rcx, [rsp + 0x78]
call fcn.14001e788
nop
mov eax, dword [rbp - 0x78]
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x40], 0xaa0
mov r8, r14
cmp qword [r14 + 0x18], 8
jb 0x1400223fd
mov r8, qword [r14]
lea rdx, str.Request_Body:__s
xor ecx, ecx
call fcn.140009844
lea rcx, [rdi + 8]
cmp qword [rcx + 0x18], 8
jb 0x140022419
mov rcx, qword [rcx]
and dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rbx], rax
test rax, rax
jne 0x1400224e5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Error_sending_http_request_WinHttpOpen_hr__0x_08X
mov ecx, ebx
call fcn.140009844
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400224a9
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224a4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400224a4
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
int3
call fcn.14002c338
and qword [rbp - 0x78], 0
mov byte [rsp + 0x78], 0
mov qword [rbp - 0x70], 0xf
mov rcx, r15
call fcn.14000a110
nop
mov rcx, r12
call fcn.14000a110
nop
mov rcx, r14
call fcn.14000a110
nop
mov rcx, r13
call fcn.14000a110
mov eax, ebx
jmp 0x140022a4a
mov r8d, dword [rsp + 0x40]
lea rdx, str.Session_set_with_protocal:__d
xor ecx, ecx
call fcn.140009844
mov r9d, 4
lea r8, [rsp + 0x40]
lea edx, [r9 + 0x50]
mov rcx, qword [rbx]
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x14002258a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Failed_to_set_WINHTTP_OPTION_SECURE_PROTOCOLS_in_WinHttpSetOption_hr__0x_08X
mov ecx, ebx
call fcn.140009844
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400224a9
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224a4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400224a4
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
nop
mov r9d, dword [rdi + 0x7c]
mov r8d, dword [rdi + 0x78]
lea rdx, str.Session_opened_with_connection_timeout:__ld_and_send_timeout:__ld
xor ecx, ecx
call fcn.140009844
mov eax, dword [rdi + 0x80]
mov dword [rsp + 0x20], eax
mov r9d, dword [rdi + 0x7c]
mov r8d, dword [rdi + 0x78]
mov edx, dword [rdi + 0x84]
mov rcx, qword [rbx]
call qword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
jne 0x14002263b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Error_sending_http_request_WinHttpSetTimeouts_hr__0x_08X
mov ecx, ebx
call fcn.140009844
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400224a9
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224a4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400224a4
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
nop
mov rdx, r15
cmp qword [r15 + 0x18], 8
jb 0x140022648
mov rdx, qword [r15]
xor r9d, r9d
movzx r8d, word [rdi + 0x28]
mov rcx, qword [rbx]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsi], rax
test rax, rax
jne 0x1400226d7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Error_sending_http_request_WinHttpConnect_hr__0x_08X
mov ecx, ebx
call fcn.140009844
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400224a9
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400224a4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400224a4
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
nop
mov r8, r15
cmp qword [r15 + 0x18], 8
jb 0x1400226e4
mov r8, qword [r15]
movzx r9d, word [rdi + 0x28]
lea rdx, str.Session_connected_to__s_port__d
xor ecx, ecx
call fcn.140009844
mov r8, r12
cmp qword [r12 + 0x18], 8
jb 0x140022706
mov r8, qword [r12]
mov rdx, r13
cmp qword [r13 + 0x18], 8
jb 0x140022714
mov rdx, qword [r13]
mov dword [rsp + 0x30], 0x800000
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, qword [rsi]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rcx, qword [rsp + 0x48]
mov qword [rcx], rax
xor esi, esi
test rax, rax
jne 0x1400227c0
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Error_sending_http_request_WinHttpOpenRequest_hr__0x_08X
mov ecx, ebx
call fcn.140009844
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400227b2
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400227ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400227ad
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
int3
call fcn.14002c338
mov qword [rbp - 0x78], rsi
mov byte [rsp + 0x78], sil
jmp 0x1400224b3
mov rdi, qword [rdi + 0x38]
mov rbx, qword [rdi]
jmp 0x140022887
lea rdx, [rbx + 0x10]
lea rcx, [rbp - 0x40]
call fcn.14000a220
nop
lea rdx, [rbx + 0x30]
lea rcx, [rbp - 0x20]
call fcn.14000a220
nop
lea r8, [0x14003ddf4]
lea rdx, [rbp - 0x40]
lea rcx, [rbp]
call fcn.14001474c
nop
lea rdx, [rbp - 0x20]
mov rcx, rax
call fcn.140010a44
xor esi, esi
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x58], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
lea rcx, [rbp]
call fcn.14000a110
lea rdx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rdx, qword [rbp - 0x68]
mov r9d, 0x20000000
or r8d, 0xffffffff
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x140022943
lea rcx, [rbp - 0x68]
call fcn.14000a110
nop
lea rcx, [rbp - 0x20]
call fcn.14000a110
lea rcx, [rbp - 0x40]
call fcn.14000a110
mov rbx, qword [rbx]
cmp rbx, rdi
jne 0x1400227cc
lea r9, [rsp + 0x78]
cmp qword [rbp - 0x70], 0x10
cmovae r9, qword [rsp + 0x78]
mov qword [rsp + 0x30], rsi
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
or r8d, 0xffffffff
xor edx, edx
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1400229d5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Error_sending_http_request_WinHttpSendRequest_hr__0x_08X
mov ecx, ebx
call fcn.140009844
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400227b2
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400227ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400227ad
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov ebx, 0x80004005
test ecx, ecx
cmovs ebx, ecx
mov r8d, ebx
lea rdx, str.Error_sending_http_request_WinHttpAddRequestHeaders_hr__0x_08X
mov ecx, ebx
call fcn.140009844
lea rcx, [rbp - 0x68]
call fcn.14000a110
nop
lea rcx, [rbp - 0x20]
call fcn.14000a110
lea rcx, [rbp - 0x40]
call fcn.14000a110
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x1400227b2
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400227ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400227ad
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
int3
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x140022a14
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022a0f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140022a0f
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
int3
call fcn.14002c338
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], 0xf
mov byte [rsp + 0x78], sil
mov rcx, r15
call fcn.14000a110
nop
mov rcx, r12
call fcn.14000a110
nop
mov rcx, r14
call fcn.14000a110
nop
mov rcx, r13
call fcn.14000a110
xor eax, eax
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.14002c310
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret