Function at 0x140006750
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x140024020]
xor rax, rsp
mov qword [rbp - 8], rax
xor r12b, r12b
xor r13d, r13d
mov qword [rbp - 0x48], r13
mov qword [rbp - 0x38], r13
mov esi, 7
mov qword [rbp - 0x30], rsi
mov word [rbp - 0x48], r13w
cmp dword [0x1400254c8], r13d
je 0x1400067a9
xor bl, bl
jmp 0x140006a21
lea rax, [0x140025498]
mov qword [rbp - 0x50], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [0x1400254c0], rax
mov qword [rbp - 0x38], r13
lea rax, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rax, qword [rbp - 0x48]
mov word [rax], r13w
xor r8d, r8d
xor edx, edx
lea rcx, str.COREHOST_TRACEFILE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r14d, eax
mov rbx, 0xffffffffffffffff
lea r15d, [rbx + 5]
test eax, eax
jne 0x140006842
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x1400068d2
test eax, eax
jle 0x140006827
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
lea rdx, str.COREHOST_TRACEFILE
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.140006e10
jmp 0x1400068d2
mov eax, 2
mul r14
cmovo rax, rbx
mov rcx, rax
call fcn.1400139dc
mov rdi, rax
mov r8d, r14d
mov rdx, rax
lea rcx, str.COREHOST_TRACEFILE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x14000680a
mov r8, rbx
inc r8
cmp word [rdi + r8*2], 0
jne 0x140006873
mov rdx, rdi
lea rcx, [rbp - 0x48]
call fcn.1400051b0
mov rcx, rdi
call fcn.140013710
lea rcx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rcx, qword [rbp - 0x48]
lea rdx, [0x14001d4d8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov rdi, rax
test rax, rax
je 0x1400068cf
xor r9d, r9d
mov r8d, r15d
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_setvbuf]
mov qword [0x1400254c0], rdi
jmp 0x1400068d2
mov r12b, 1
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x10], rsi
mov qword [rbp - 0x18], r13
mov word [rbp - 0x28], r13w
xor r8d, r8d
xor edx, edx
lea rcx, str.COREHOST_TRACE_VERBOSITY
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r14d, eax
test eax, eax
je 0x14000692a
mov eax, 2
mul r14
cmovo rax, rbx
mov rcx, rax
call fcn.1400139dc
mov rdi, rax
mov r8d, r14d
mov rdx, rax
lea rcx, str.COREHOST_TRACE_VERBOSITY
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x140006960
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x140006998
test eax, eax
jle 0x140006943
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
lea rdx, str.COREHOST_TRACE_VERBOSITY
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.140006e10
jmp 0x140006998
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x140006960
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp - 0x28]
call fcn.1400051b0
mov rcx, rdi
call fcn.140013710
lea rcx, [rbp - 0x28]
cmp qword [rbp - 0x10], 8
cmovae rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov r15d, eax
mov dword [0x1400254c8], r15d
mov rdx, qword [rbp - 0x10]
cmp rdx, 8
jb 0x1400069e2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400069dd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400069dd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140013710
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], rsi
mov word [rbp - 0x28], r13w
lea rcx, [0x140025498]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r12b, r12b
je 0x140006a1b
lea rdx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rdx, qword [rbp - 0x48]
lea rcx, str.Unable_to_open_COREHOST_TRACEFILE_s_for_writing
call fcn.140006bb0
mov bl, 1
mov rsi, qword [rbp - 0x30]
cmp rsi, 8
jb 0x140006a60
lea rdx, [rsi*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006a5b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006a5b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140013710
movzx eax, bl
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400136f0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret