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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x58
mov dword [rbp + 0x38], 0
lea r15, [0x14013ca80]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
jne 0x1400b2ec5
lea r8, [rbp - 0x28]
lea rdx, str.SoftwareMicrosoftDebuggingTools
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x1400b2e21
mov dword [rbp + 0x40], 0x208
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Windbg
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea r8, str.DbgHelp.dll
mov edx, 0x104
mov rcx, r15
call fcn.1400cf5e4
jmp 0x1400b2e37
mov r8d, 0x104
mov rdx, r15
lea rcx, str._ProgramFiles_Debugging_Tools_for_Windows__x64_dbghelp.dll
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
jne 0x1400b2ec5
lea r8, str.C:Debuggersdbghelp.dll
mov edx, 0x104
mov rcx, r15
call fcn.1400ce79c
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
jne 0x1400b2ec5
mov rdx, r15
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea r8, str.dbghelp.dll
mov edx, 0x104
mov rcx, r15
call fcn.1400cf5e4
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
jne 0x1400b2ec5
lea rcx, [0x1400f71f0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
jne 0x1400b2ec5
lea rcx, str.imagehlp.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
lea rdx, str._PATH_
lea rcx, [rbp + 0x48]
call fcn.140070a60
nop
mov edx, 0x5c
mov rcx, r15
call fcn.1400ba6f8
test rax, rax
je 0x1400b2f21
sub rax, r15
sar rax, 1
mov rcx, rax
neg rcx
sbb r9, r9
and r9d, 2
lea rdx, [rax + rax]
lea r8, [0x1400f6914]
mov rcx, r15
call fcn.1400b06f0
mov rdi, rax
mov qword [rbp - 0x20], rax
mov r14d, 1
mov rbx, qword [rbp - 0x20]
jmp 0x1400b2f45
mov rcx, r15
call fcn.1400b0640
mov rdx, rax
mov rcx, r15
call fcn.1400b0780
mov rbx, rax
mov qword [rbp - 0x20], rax
mov r14d, 2
mov rdi, qword [rbp - 0x20]
mov rcx, rax
mov dword [rbp + 0x38], r14d
mov qword [rbp + 0x50], rax
test rax, rax
je 0x1400b2f5b
call fcn.1400b04e0
nop
test r14b, 2
je 0x1400b2f77
and r14d, 0xfffffffd
mov dword [rbp + 0x38], r14d
test rbx, rbx
je 0x1400b2f77
mov rcx, rbx
call fcn.1400b0810
nop
test r14b, 1
je 0x1400b2f8b
test rdi, rdi
je 0x1400b2f8b
mov rcx, rdi
call fcn.1400b0810
nop
lea rcx, [0x140107b88]
call fcn.1400b0640
mov rdx, rax
lea rcx, [0x140107b88]
call fcn.1400b0780
mov qword [rbp + 0x38], rax
lea r8, [rbp + 0x38]
lea rdx, [rbp - 0x18]
lea rcx, [rbp + 0x48]
call fcn.1400b0290
nop
lea r8, [rbp + 0x50]
lea rdx, [rbp - 0x20]
mov rcx, rax
call fcn.1400b0290
mov rbx, rax
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x1400b2fdd
call fcn.1400b0810
mov rcx, qword [rbx]
mov qword [rbp + 0x48], rcx
test rcx, rcx
je 0x1400b2fef
call fcn.1400b04e0
nop
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400b2ffe
call fcn.1400b0810
nop
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1400b300d
call fcn.1400b0810
nop
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x1400b301c
call fcn.1400b0810
nop
lea rcx, [rbp + 0x48]
call fcn.1400b0200
mov rdx, rax
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x1400b3045
call fcn.1400b0810
nop
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x1400b3054
call fcn.1400b0810
nop
mov r8d, 0x104
mov rdx, r15
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rcx, r15
call fcn.1400b4000
mov rax, qword [0x140143c70]
mov qword [0x140143cd0], rax
add rsp, 0x58
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret