Function at 0x16490
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x00034020]
xor rax, rsp
mov qword [rbp + 0x60], rax
xor r14d, r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x40], 7
mov qword [rsp + 0x38], r14
mov word [rsp + 0x28], r14w
xor r8d, r8d
xor edx, edx
lea rcx, str.COREHOST_TRACE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x1652b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x1668e
test eax, eax
jle 0x16510
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
lea rdx, str.COREHOST_TRACE
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.00016e60
jmp 0x1668e
mov eax, 2
mul rsi
mov rbx, 0xffffffffffffffff
cmovo rax, rbx
mov rcx, rax
call fcn.00023dcc
mov rdi, rax
mov r8d, esi
mov rdx, rax
lea rcx, str.COREHOST_TRACE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x164f3
mov r8, rbx
inc r8
cmp word [rdi + r8*2], 0
jne 0x16563
mov rdx, rdi
lea rcx, [rsp + 0x28]
call fcn.00015160
mov rcx, rdi
call fcn.00023b00
lea rcx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rcx, qword [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
test eax, eax
jle 0x1668e
call fcn.00016700
test al, al
je 0x1668e
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov qword [rsp + 0x20], rax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x68], xmm0
movups xmmword [rsp + 0x78], xmm0
mov dword [rbp - 0x78], eax
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__gmtime64_s]
lea r9, [rsp + 0x68]
lea r8, str._c_GMT
mov edx, 0x64
lea rcx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll_wcsftime]
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], 7
lea rax, [rbp - 0x70]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x16610
mov r8, rbx
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x48]
call fcn.00015160
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
lea rcx, str.Tracing_enabled____s
call fcn.00016b20
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x1668e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x16688
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x16688
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00023b00
nop
mov rdx, qword [rsp + 0x40]
cmp rdx, 8
jb 0x166d3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x166ce
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x166ce
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00023b00
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.00023ae0
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret