Function at 0x1400bfc90
Capabilities:
Initialize winhttp library
Prepare http request

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x270]
sub rsp, 0x370
mov qword [rbp], 0xfffffffffffffffe
mov qword [rsp + 0x3a8], rbx
mov rax, qword [0x140302028]
xor rax, rsp
mov qword [rbp + 0x260], rax
mov rsi, r9
mov rdi, r8
mov r14, rdx
mov rbx, rcx
mov qword [rsp + 0x60], rcx
xor r15d, r15d
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r15
xor eax, eax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x58], rax
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rbp - 0x28], xmm0
movups xmm1, xmmword [rsp + 0x50]
movups xmmword [rbp - 0x18], xmm1
mov byte [rbp - 8], 1
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r15 + 1]
lea rcx, str.WinHTTP_AutoProxy_Sample_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x70], rax
test rax, rax
jne 0x1400bfdc1
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.140222360
nop
lea rcx, [rbp + 0x30]
call fcn.140222fc0
test al, al
je 0x1400bfd99
lea rdx, str.WinHttpOpen___failed.
lea rcx, [rbp + 0x30]
call fcn.140219e60
nop
lea rcx, [rbp + 0x30]
call fcn.140219710
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov byte [rbx], al
mov byte [rbx + 0x20], al
jmp 0x1400c01ff
mov rax, rdi
cmp qword [rdi + 0x18], 0x10
jb 0x1400bfdce
mov rax, qword [rdi]
mov qword [rsp + 0x40], rax
mov rax, qword [rdi + 0x10]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 8]
call fcn.140228a50
nop
cmp qword [rax + 0x18], 8
jb 0x1400bfe00
mov rax, qword [rax]
mov r8d, 0x50
xor r9d, r9d
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x68], rax
mov rdx, qword [rbp + 0x20]
cmp rdx, 8
jb 0x1400bfe64
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400bfe5a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400bfe5a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009f0ec
mov rax, qword [rsp + 0x68]
test rax, rax
jne 0x1400bfea6
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.140222360
nop
lea rcx, [rbp + 0x30]
call fcn.140222fc0
test al, al
je 0x1400bfea1
lea rdx, str.WinHttpConnect___failed_for_host:
lea rcx, [rbp + 0x30]
call fcn.140219e60
mov rdx, rdi
mov rcx, rax
call fcn.140219970
nop
jmp 0x1400bfd99
mov rax, rsi
cmp qword [rsi + 0x18], 0x10
jb 0x1400bfeb3
mov rax, qword [rsi]
mov qword [rsp + 0x40], rax
mov rax, qword [rsi + 0x10]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 8]
call fcn.140228a50
nop
cmp qword [rax + 0x18], 8
jb 0x1400bfee5
mov rax, qword [rax]
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov r8, rax
lea rdx, [0x140243590]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x60], rax
mov rdx, qword [rbp + 0x20]
cmp rdx, 8
jb 0x1400bff59
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400bff4f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400bff4f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009f0ec
mov rax, qword [rsp + 0x60]
test rax, rax
jne 0x1400bff9b
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.140222360
nop
lea rcx, [rbp + 0x30]
call fcn.140222fc0
test al, al
je 0x1400bff96
lea rdx, str.WinHttpOpenRequest___failed_for_path:
lea rcx, [rbp + 0x30]
call fcn.140219e60
mov rdx, rsi
mov rcx, rax
call fcn.140219970
nop
jmp 0x1400bfd99
mov dword [rbp - 0x48], 1
mov dword [rbp - 0x44], 3
mov dword [rbp - 0x2c], 1
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov byte [rsp + 0x78], al
mov byte [rbp - 0x68], al
mov rax, r14
cmp qword [r14 + 0x18], 0x10
jb 0x1400bffdb
mov rax, qword [r14]
mov qword [rsp + 0x40], rax
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 8]
call fcn.140228a50
nop
cmp qword [rax + 0x18], 8
jb 0x1400c000d
mov rax, qword [rax]
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x48]
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
mov edi, eax
mov rdx, qword [rbp + 0x20]
cmp rdx, 8
jb 0x1400c0069
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400c0063
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400c0063
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009f0ec
nop
test edi, edi
je 0x1400c01d5
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.140222360
nop
lea rcx, [rbp + 0x30]
call fcn.140222fc0
test al, al
je 0x1400c009e
lea rdx, str.Using_PAC_file_to_detect_proxy_settings.
lea rcx, [rbp + 0x30]
call fcn.140219e60
nop
lea rcx, [rbp + 0x30]
call fcn.140219710
mov r9d, 0x18
lea r8, [rbp - 0x60]
lea edx, [r9 + 0xe]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x1400c018c
mov rcx, qword [rbp - 0x58]
mov qword [rsp + 0x40], rcx
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400c00e0
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 8]
call fcn.1402288b0
mov rdi, rax
cmp byte [rbp - 0x68], 0
je 0x1400c011f
lea rcx, [rsp + 0x78]
call fcn.1400742f0
mov byte [rbp - 0x68], 0
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x78], xmm0
movups xmm0, xmmword [rdi]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rdi + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rdi], 0
mov byte [rbp - 0x68], 1
lea rcx, [rbp + 8]
call fcn.1400742f0
mov byte [rbx], 0
mov byte [rbx + 0x20], 0
movzx eax, byte [rbp - 0x68]
test al, al
je 0x1400c0188
movups xmm0, xmmword [rsp + 0x78]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rbp - 0x78]
movups xmmword [rbx + 0x10], xmm1
movdqa xmm0, xmmword [0x140239670]
movdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], 0
mov byte [rbx + 0x20], 1
test al, al
jmp 0x1400c01f2
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.140222360
nop
lea rcx, [rbp + 0x30]
call fcn.140222fc0
test al, al
je 0x1400c01cc
lea rdx, str.Failed_to_get_proxy_settings_using_WinHttpSetOption__._Error_Code:
lea rcx, [rbp + 0x30]
call fcn.140219e60
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rdi
call fcn.140219d50
nop
lea rcx, [rbp + 0x30]
call fcn.140219710
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov byte [rbx + 0x20], al
mov byte [rbx], al
cmp byte [rbp - 0x68], al
je 0x1400c01ff
lea rcx, [rsp + 0x78]
call fcn.1400742f0
nop
lea rcx, [rbp - 0x28]
call fcn.1400befc0
mov rax, rbx
mov rcx, qword [rbp + 0x260]
xor rcx, rsp
call fcn.14009f440
mov rbx, qword [rsp + 0x3a8]
add rsp, 0x370
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret