Function at 0x17820
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x00034020]
xor rax, rsp
mov qword [rbp - 8], rax
mov rsi, rcx
mov qword [rbp - 0x50], rcx
xor r15d, r15d
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x30], 7
mov qword [rbp - 0x38], r15
mov word [rbp - 0x48], r15w
xor r8d, r8d
xor edx, edx
lea rcx, str.DOTNET_RUNTIME_ID
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r14d, eax
test eax, eax
je 0x178bd
mov eax, 2
mul r14
mov rbx, 0xffffffffffffffff
cmovo rax, rbx
mov rcx, rax
call fcn.00023dcc
mov rdi, rax
mov r8d, r14d
mov rdx, rax
lea rcx, str.DOTNET_RUNTIME_ID
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x17b00
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x178ec
test eax, eax
jle 0x178d6
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
lea rdx, str.DOTNET_RUNTIME_ID
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.00016e60
lea rcx, [rbp - 0x28]
call fcn.0001f4a0
mov rbx, rax
lea rax, [rbp - 0x48]
cmp rax, rbx
je 0x1796d
mov rdx, qword [rbp - 0x30]
cmp rdx, 8
jb 0x1793d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x17938
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x179a4
call fcn.00023b00
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x30], 7
mov word [rbp - 0x48], r15w
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x38], xmm1
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 7
mov word [rbx], r15w
mov rdx, qword [rbp - 0x10]
cmp rdx, 8
jb 0x179b0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x179ab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x179ab
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00023b00
mov r8, qword [rbp - 0x38]
test r8, r8
jne 0x17a43
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x10], 7
mov r8d, 5
lea rdx, str.win10
lea rcx, [rbp - 0x28]
call fcn.00015160
mov rdx, qword [rbp - 0x30]
cmp rdx, 8
jb 0x17a26
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x17a21
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x17a21
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00023b00
movups xmm0, xmmword [rbp - 0x28]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rbp - 0x18]
movups xmmword [rbp - 0x38], xmm1
mov r8, qword [rbp - 0x38]
test r8, r8
je 0x17b21
mov r9, qword [rbp - 0x30]
mov rax, r9
sub rax, r8
lea rcx, [rbp - 0x48]
cmp rax, 1
jb 0x17a7b
lea rdx, [r8 + 1]
mov qword [rbp - 0x38], rdx
cmp r9, 8
cmovae rcx, qword [rbp - 0x48]
movzx eax, word [0x0002d98c]
mov word [rcx + r8*2], ax
mov word [rcx + rdx*2], r15w
jmp 0x17a95
mov qword [rsp + 0x20], 1
lea r9, [0x0002d98c]
mov edx, 1
call fcn.00015780
mov rcx, qword [rbp - 0x38]
mov rdx, qword [rbp - 0x30]
mov rax, rdx
sub rax, rcx
cmp rax, 3
jb 0x17adb
lea rdi, [rcx + 3]
mov qword [rbp - 0x38], rdi
lea rbx, [rbp - 0x48]
cmp rdx, 8
cmovae rbx, qword [rbp - 0x48]
lea rcx, [rbx + rcx*2]
mov r8d, 6
lea rdx, [0x0002d960]
call fcn.000253a0
mov word [rbx + rdi*2], r15w
jmp 0x17b21
mov qword [rsp + 0x20], 3
lea r9, [0x0002d960]
mov edx, 3
lea rcx, [rbp - 0x48]
call fcn.00015780
jmp 0x17b21
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x17b00
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp - 0x48]
call fcn.00015160
mov rcx, rdi
call fcn.00023b00
movups xmm0, xmmword [rbp - 0x48]
movups xmmword [rsi], xmm0
movups xmm1, xmmword [rbp - 0x38]
movups xmmword [rsi + 0x10], xmm1
mov rax, rsi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.00023ae0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret