Function at 0x140001850
Capabilities:
Get common file path
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x7c8]
sub rsp, 0x8a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x790], rax
mov rbx, rcx
lea rdx, [rbp - 0x40]
xor ecx, ecx
mov r8d, 0x384
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, eax
lea r8, [rbx + 0xc0]
lea rcx, [rbp - 0x40]
mov r12d, eax
call fcn.14000121c
lea r14, [r12 + r12]
mov edi, r12d
lea rsi, [rbp - 0x40]
add rsi, r14
sub rsi, 2
mov r13, rdi
dec rdi
sub r14, 2
cmp word [rsi], 0x5c
jne 0x1400018bf
mov r8, rdi
lea rdx, [rbp - 0x40]
mov rcx, rbx
call fcn.140002ec8
lea rdx, [rbp - 0x3e]
add rdx, r14
lea r15, [rbx + 0x80]
or r14, 0xffffffffffffffff
mov r8, r14
xor eax, eax
inc r8
cmp word [rdx + r8*2], ax
jne 0x1400018f9
mov rcx, r15
call fcn.140002ec8
lea rdx, str.Au.Editor.exe
mov rcx, r15
call fcn.14000145c
test al, al
je 0x140001922
mov al, 1
jmp 0x140001933
lea rdx, str.Au.Task.exe
mov rcx, r15
call fcn.14000145c
add al, al
mov byte [rbx + 0xe1], al
lea r15, [rbx + 0xa0]
cmp byte [0x140020a40], 0
lea rcx, [rbp - 0x40]
mov r8, r15
je 0x14000196e
mov rdx, r13
call fcn.14000121c
lea rdx, [0x140020a40]
mov r8, r14
inc r8
cmp byte [rdx + r8], 0
jne 0x140001962
jmp 0x140001985
lea rdx, [r12 - 4]
call fcn.14000121c
mov r8d, 4
lea rdx, str..dll
mov rcx, r15
call fcn.1400032a4
xor r15d, r15d
lea rcx, [rbp - 0x40]
mov byte [rbx + 0xe0], r15b
movups xmm0, xmmword [str.coreclr.dll]
movzx eax, word [0x14001ccd0]
movups xmmword [rbp + rdi*2 - 0x40], xmm0
movsd xmm0, qword [0x14001ccc8]
movsd qword [rbp + rdi*2 - 0x30], xmm0
mov word [rbp + rdi*2 - 0x28], ax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 4
not al
test al, 1
jne 0x140001d0a
lea rdi, str.dotnetcoreclr.dll
mov rcx, rdi
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rsi], ax
lea rsi, [rsi + 2]
test ax, ax
jne 0x1400019de
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 4
not al
test al, 1
jne 0x140001d0a
mov r12d, 0x3e8
cmp byte [rbx + 0xe1], r15b
jne 0x140001ac3
lea rdx, [rbp - 0x40]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
lea ecx, [rsi - 0x17]
cmp ecx, 0x39e
ja 0x140001ac3
lea rcx, [rbp + rsi*2 - 0x66]
lea rdx, str.Roslyn.exeProgram
call fcn.14000ab68
test eax, eax
jne 0x140001ac3
movups xmm0, xmmword [str.coreclr.dll]
lea eax, [rsi - 0x13]
lea rsi, [rax + rax]
movzx eax, word [0x14001ccd0]
movups xmmword [rbp + rsi - 0x40], xmm0
lea rcx, [rbp - 0x40]
movsd xmm0, qword [0x14001ccc8]
movsd qword [rbp + rsi - 0x30], xmm0
mov word [rbp + rsi - 0x28], ax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 4
not al
test al, 1
jne 0x140001d0a
sub rsi, rdi
lea rcx, [rbp - 0x40]
add rcx, rsi
movzx eax, word [rdi]
mov word [rcx + rdi], ax
lea rdi, [rdi + 2]
test ax, ax
jne 0x140001a9c
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 4
not al
test al, 1
jne 0x140001d0a
mov edi, r15d
or r13d, 0xffffffff
test edi, edi
jne 0x140001b23
mov dword [rsp + 0x34], r15d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x140001af4
mov al, 1
cmp dword [rsp + 0x34], r15d
jne 0x140001af7
mov al, r15b
test al, al
lea rdx, str.DOTNET_ROOT_x86_
lea rcx, str.DOTNET_ROOT
mov r8d, r12d
cmovne rcx, rdx
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, eax
mov dword [rsp + 0x30], eax
jmp 0x140001c32
cmp edi, 1
jne 0x140001bfb
movaps xmm0, xmmword [str.SOFTWAREdotnetSetupInstalledVersionsx64]
lea rax, [rsp + 0x38]
movaps xmm1, xmmword [0x14001cd50]
lea rdx, [rsp + 0x60]
movaps xmmword [rsp + 0x60], xmm0
mov r9d, 0x20219
movaps xmm0, xmmword [0x14001cd60]
xor r8d, r8d
movaps xmmword [rbp - 0x80], xmm0
mov rcx, 0xffffffff80000002
movaps xmm0, xmmword [0x14001cd80]
movaps xmmword [rbp - 0x60], xmm0
movsd xmm0, qword [0x14001cd90]
movaps xmmword [rsp + 0x70], xmm1
movaps xmm1, xmmword [0x14001cd70]
movsd qword [rbp - 0x50], xmm0
movaps xmmword [rbp - 0x70], xmm1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140001ba7
mov dword [rsp + 0x30], r15d
inc edi
jmp 0x140001aca
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, str.InstallLocation
lea rax, [rbp - 0x40]
mov dword [rsp + 0x30], r12d
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x140001be0
mov eax, r15d
jmp 0x140001be6
mov eax, dword [rsp + 0x30]
shr eax, 1
mov rcx, qword [rsp + 0x38]
mov dword [rsp + 0x30], eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [rsp + 0x30]
jmp 0x140001c27
mov r8d, r12d
lea rdx, [rbp - 0x40]
lea rcx, str._ProgramFiles_dotnet
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [rbp - 0x40], 0x25
mov ecx, eax
mov dword [rsp + 0x30], eax
jne 0x140001c23
mov ecx, r15d
mov dword [rsp + 0x30], ecx
test edi, edi
jle 0x140001c32
test ecx, ecx
je 0x140001c32
add ecx, r13d
mov dword [rsp + 0x30], ecx
cmp ecx, 1
jbe 0x140001cfb
lea edx, [rcx - 1]
cmp word [rbp + rdx*2 - 0x40], 0x5c
jne 0x140001c4c
mov ecx, edx
mov dword [rsp + 0x30], edx
lea eax, [rcx - 2]
cmp eax, 0x381
ja 0x140001cfb
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, r13d
je 0x140001c6f
test al, 0x10
mov al, 1
jne 0x140001c72
mov al, r15b
test al, al
je 0x140001cfb
mov edx, dword [rsp + 0x30]
lea rsi, [rbx + 0x20]
mov r8, rsi
mov byte [rsp + 0x20], r15b
lea r9, [rsp + 0x40]
lea rcx, [rbp - 0x40]
call fcn.1400014ac
test al, al
je 0x140001cfb
mov edx, dword [rsp + 0x30]
lea r8, [rbx + 0x40]
lea r9, [rsp + 0x40]
mov byte [rsp + 0x20], 1
lea rcx, [rbp - 0x40]
call fcn.1400014ac
test al, al
je 0x140001cfb
cmp qword [rsi + 0x18], 7
mov rdx, rsi
jbe 0x140001cc8
mov rdx, qword [rsi]
mov r8, qword [rsi + 0x10]
lea r14, [rbx + 0x60]
mov rcx, r14
lea r9, str.coreclr.dll
call fcn.14000116c
cmp qword [r14 + 0x18], 7
jbe 0x140001ce9
mov r14, qword [r14]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 4
not al
test al, 1
jne 0x140001d66
inc edi
cmp edi, 2
jle 0x140001aca
xor al, al
jmp 0x140001d68
mov byte [rbx + 0xe0], 1
lea rax, [rbp - 0x40]
inc r14
cmp word [rax + r14*2], r15w
jne 0x140001d15
mov r8, r14
lea rcx, [rbx + 0x60]
lea rdx, [rbp - 0x40]
call fcn.140002ec8
mov r8, qword [rbx + 0x70]
lea rdi, [rbx + 0x20]
sub r8, 0xc
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.140002ec8
lea rcx, [rbx + 0x40]
cmp rcx, rdi
je 0x140001d66
cmp qword [rdi + 0x18], 7
mov rdx, rdi
jbe 0x140001d5d
mov rdx, qword [rdi]
mov r8, qword [rdi + 0x10]
call fcn.140002ec8
mov al, 1
mov rcx, qword [rbp + 0x790]
xor rcx, rsp
call fcn.1400037f0
lea r11, [rsp + 0x8a0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret