Function at 0x14003ce90
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x30
call fcn.1400473e0
sub rsp, rax
movzx eax, word [0x140066c50]
xor ebp, ebp
mov rdi, rcx
movzx ecx, byte [0x140066c51]
mov esi, edx
test r8d, r8d
je 0x14003cfc2
test rdi, rdi
je 0x14003d02f
cmp byte [rdi], al
jne 0x14003cee1
cmp byte [rdi + 1], cl
je 0x14003cfc2
shr esi, 0xf
mov r8d, 0x180
and esi, 1
mov qword [rsp + 0x40], r14
mov edx, esi
mov rcx, rdi
xor edx, 1
shl edx, 0xf
add edx, 0x301
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
mov r14d, eax
test eax, eax
js 0x14003cf48
lea rax, [0x14004d9f4]
test esi, esi
lea rdx, [0x14006bcb8]
mov ecx, r14d
cmovne rdx, rax
call qword [sym.imp.api_ms_win_crt_math_l1_1_0.dll__fdopen]
mov rbp, rax
test rax, rax
je 0x14003cf48
shl esi, 4
mov rcx, rax
lea edx, [rsi + 1]
call sub.libcrypto_1_1_x64.dll_BIO_new_fp
test rax, rax
jne 0x14003cfa8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rbx, rax
call fcn.14003ab70
mov rcx, qword [0x1400827b8]
lea rdx, str._s:_Cant_open___s__for_writing___s_n
mov r8, rax
mov qword [rsp + 0x20], rbx
mov r9, rdi
call sub.libcrypto_1_1_x64.dll_BIO_printf
mov rcx, qword [0x1400827b8]
call sub.libcrypto_1_1_x64.dll_ERR_print_errors
test rbp, rbp
je 0x14003cf98
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14003cfa6
test r14d, r14d
js 0x14003cfa6
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
xor eax, eax
mov r14, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
test rdi, rdi
je 0x14003d02f
cmp byte [rdi], al
jne 0x14003cfd0
cmp byte [rdi + 1], cl
je 0x14003d02f
lea rax, [0x14004d9f4]
bt esi, 0xf
lea rdx, [0x14006bcb8]
mov rcx, rdi
cmovb rdx, rax
call sub.libcrypto_1_1_x64.dll_BIO_new_file
mov rbx, rax
test rax, rax
jne 0x14003d0ea
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, qword [0x1400827b8]
lea r9, str.writing
mov r8, rdi
mov qword [rsp + 0x20], rax
lea rdx, str.Cant_open__s_for__s___s_n
call sub.libcrypto_1_1_x64.dll_BIO_printf
jmp 0x14003d0db
mov ebx, esi
mov ecx, 1
shr ebx, 0xb
and ebx, 0x10
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
mov edx, ebx
call sub.libcrypto_1_1_x64.dll_BIO_new_fp
mov rbx, rax
bt esi, 0xf
jae 0x14003d0ab
lea rcx, str.HARNESS_OSSL_PREFIX
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rax, rax
je 0x14003d0ab
mov rax, qword [0x140083bd0]
test rax, rax
jne 0x14003d082
call fcn.1400450c0
mov qword [0x140083bd0], rax
mov rcx, rax
call sub.libcrypto_1_1_x64.dll_BIO_new
mov rcx, rax
mov rdx, rbx
call sub.libcrypto_1_1_x64.dll_BIO_push
mov r9, rdi
xor r8d, r8d
mov edx, 0x8000
mov rcx, rax
mov rbx, rax
call sub.libcrypto_1_1_x64.dll_BIO_ctrl
test rbx, rbx
jne 0x14003d0ea
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, qword [0x1400827b8]
lea r8, str.stdout
mov r9, rax
lea rdx, str.Cant_open__s___s_n
call sub.libcrypto_1_1_x64.dll_BIO_printf
mov rcx, qword [0x1400827b8]
call sub.libcrypto_1_1_x64.dll_ERR_print_errors
mov rbx, rbp
mov rax, rbx
jmp 0x14003cfad