Function at 0x140006558
Capabilities:
Query or enumerate registry value
Set console window title

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp + 0x17], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov r15, rcx
mov rdi, qword [rdx + 0x18]
xor r12d, r12d
mov r14d, r12d
mov ebx, r12d
lea r13d, [r12 + 1]
lea rsi, [0x140016ce0]
test rdi, rdi
je 0x1400065ab
test dword [rdx + 0x3c], 0x800
jne 0x140006789
mov dword [rbp + 0x6f], r12d
call fcn.1400074f0
lea rsi, str.ConsoleHostShortcutTargetX86
lea rcx, str.ConsoleHostShortcutTarget
test eax, eax
cmove rsi, rcx
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov r9d, 0x10000006
mov r8, rsi
lea rdx, str.SOFTWAREMicrosoftPowerShell3
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
nop dword [rax + rax]
test eax, eax
jne 0x14000675b
mov ecx, dword [rbp + 0x6f]
shr rcx, 1
add rcx, r13
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140003a28
mov r14, rax
mov r8d, dword [rbp + 0x6f]
add r8, 2
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r12
mov r9d, 0x10000006
mov r8, rsi
lea rdx, str.SOFTWAREMicrosoftPowerShell3
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
nop dword [rax + rax]
test eax, eax
jne 0x140006681
mov rdi, r14
jmp 0x14000671e
call fcn.1400074f0
test eax, eax
je 0x1400066d5
lea rcx, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell_x86_.lnk
call fcn.140007424
test al, al
je 0x1400066a3
lea rdi, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell_x86_.lnk
jmp 0x14000671e
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAdministrative_ToolsWindows_PowerShell__x86_.lnk
call fcn.140007424
test al, al
je 0x1400066bc
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAdministrative_ToolsWindows_PowerShell__x86_.lnk
jmp 0x14000671e
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell__x86_.lnk
call fcn.140007424
test al, al
je 0x140006721
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell__x86_.lnk
jmp 0x14000671e
lea rcx, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell.lnk
call fcn.140007424
test al, al
je 0x1400066ee
lea rdi, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell.lnk
jmp 0x14000671e
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsSystem_ToolsWindows_PowerShell.lnk
call fcn.140007424
test al, al
je 0x140006707
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsSystem_ToolsWindows_PowerShell.lnk
jmp 0x14000671e
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell.lnk
call fcn.140007424
test al, al
je 0x140006721
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell.lnk
mov ebx, r13d
mov qword [rbp + 0x7f], r12
lea rdx, [rbp + 0x7f]
mov ecx, 0x6d
call fcn.140007d8c
test eax, eax
js 0x140006b2f
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
lea r8, [rbp + 0x7f]
mov edx, 0x7ffffffe
mov rcx, rdi
call fcn.140007ef8
mov rdx, qword [rbp + 0x7f]
inc rdx
mov r8, rdi
lea rsi, [0x140016ce0]
mov rcx, rsi
call fcn.140007e6c
test ebx, ebx
jne 0x1400067ac
lea r8, [rbp + 0x7f]
mov edx, 0x7ffffffe
mov rcx, rdi
call fcn.140007ef8
mov rdx, qword [rbp + 0x7f]
inc rdx
mov r8, rdi
mov rcx, rsi
call fcn.140007e6c
mov qword [rbp + 0xf], r12
mov qword [rbp - 1], r12
lea rax, [rbp - 1]
mov qword [rsp + 0x20], rax
lea r9, [0x14000f158]
mov r8d, r13d
xor edx, edx
lea rcx, [0x14000e860]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x140006b1a
mov rcx, qword [rbp - 1]
mov rax, qword [rcx]
lea r8, [rbp + 0xf]
lea rdx, [0x14000e890]
mov rax, qword [rax]
call qword [0x14000dd78]
mov ebx, eax
test eax, eax
js 0x140006b1a
mov rcx, qword [rbp + 0xf]
mov rax, qword [rcx]
mov r8d, 2
mov rdx, rsi
mov rax, qword [rax + 0x28]
call qword [0x14000dd78]
mov dword [rbp + 0x77], r12d
test eax, eax
js 0x140006859
mov rcx, qword [rbp - 1]
mov rax, qword [rcx]
lea r9, [rbp + 0x77]
mov r8d, 0x104
mov rdx, rsi
mov rax, qword [rax + 0x80]
call qword [0x14000dd78]
mov ebx, eax
test eax, eax
jns 0x140006884
jmp 0x140006b1a
lea r8, [rbp + 0x7f]
mov edx, 0x7ffffffe
lea rcx, str._windir_System32WindowsPowerShell_v1.0powershell.exe
call fcn.140007ef8
mov rdx, qword [rbp + 0x7f]
inc rdx
lea r8, str._windir_System32WindowsPowerShell_v1.0powershell.exe
mov rcx, rsi
call fcn.140007e6c
mov qword [rbp - 9], r12
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
lea r9, [0x14000f138]
xor edx, edx
lea r8d, [rdx + 3]
lea rcx, [0x14000e880]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x140006b10
mov qword [rbp - 0x19], r12
mov qword [rbp + 0x7f], r12
mov qword [rbp - 0x11], r12
lea rdx, [rbp + 0x7f]
mov ecx, 0x76
call fcn.140007d8c
mov ebx, eax
test eax, eax
js 0x140006b06
lea rdx, [rbp - 0x11]
mov ecx, 0x77
call fcn.140007d8c
lea rax, [rbp - 0x19]
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x30], r13b
mov eax, dword [rbp + 0x77]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
mov rdx, rdi
mov rcx, qword [rbp + 0x7f]
call fcn.140006e1c
mov ebx, eax
mov rcx, r14
call qword [sym.imp.msvcrt.dll____V_YAXPEAX_Z]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
test ebx, ebx
js 0x140006b06
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x19]
mov rax, qword [rax + 0x28]
call qword [0x14000dd78]
mov ebx, eax
test eax, eax
js 0x140006b06
call fcn.140006c2c
test eax, eax
je 0x140006ac1
lea rdx, [rbp + 0x7f]
mov ecx, 0x7a
call fcn.140007d8c
mov ebx, eax
test eax, eax
js 0x140006b06
lea rdx, [rbp - 0x11]
mov ecx, 0x7b
call fcn.140007d8c
xor edx, edx
lea rcx, [rbp - 0x19]
call qword [sym.imp.ATL.DLL_AtlComPtrAssign]
nop dword [rax + rax]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x30], r13b
mov dword [rsp + 0x28], r12d
lea rdi, str._systemroot__system32windowspowershell_v1.0powershell_ise.exe
mov qword [rsp + 0x20], rdi
mov rdx, rdi
mov rcx, qword [rbp + 0x7f]
call fcn.140006e1c
mov ebx, eax
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
test ebx, ebx
js 0x140006b06
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x19]
mov rax, qword [rax + 0x28]
call qword [0x14000dd78]
mov ebx, eax
test eax, eax
js 0x140006b06
lea rdx, [rbp + 0x7f]
mov ecx, 0x65
call fcn.140007d8c
mov ebx, eax
test eax, eax
js 0x140006b06
lea rdx, [rbp - 0x11]
mov ecx, 0x6f
call fcn.140007d8c
xor edx, edx
lea rcx, [rbp - 0x19]
call qword [sym.imp.ATL.DLL_AtlComPtrAssign]
nop dword [rax + rax]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x30], r12b
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rdi
mov rdx, rdi
mov rcx, qword [rbp + 0x7f]
call fcn.140006e1c
mov ebx, eax
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
test ebx, ebx
js 0x140006b06
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x19]
mov rax, qword [rax + 0x28]
call qword [0x14000dd78]
mov ebx, eax
test eax, eax
js 0x140006b06
mov qword [rbp + 7], r12
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
lea r8, [rbp + 7]
lea rdx, [0x14000f198]
mov rax, qword [rax]
call qword [0x14000dd78]
mov ebx, eax
test eax, eax
js 0x140006afc
mov rax, qword [r15]
mov rdx, qword [rbp + 7]
mov rcx, r15
mov rax, qword [rax + 0x38]
call qword [0x14000dd78]
mov ebx, eax
lea rcx, [rbp + 7]
call fcn.1400036e4
nop
lea rcx, [rbp - 0x19]
call fcn.1400036e4
nop
lea rcx, [rbp - 9]
call fcn.1400036e4
nop
lea rcx, [rbp - 1]
call fcn.1400036e4
nop
lea rcx, [rbp + 0xf]
call fcn.1400036e4
mov eax, ebx
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret