Function at 0x140005504
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, [0x140015c20]
test rdi, rdi
je 0x140005557
test dword [rdx + 0x3c], 0x800
jne 0x14000571d
mov dword [rbp + 0x6f], r12d
call fcn.140006350
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]
test eax, eax
jne 0x1400056ef
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.140002ef0
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]
test eax, eax
jne 0x140005621
mov rdi, r14
jmp 0x1400056be
call fcn.140006350
test eax, eax
je 0x140005675
lea rcx, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell_x86_.lnk
call fcn.140006284
test al, al
je 0x140005643
lea rdi, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell_x86_.lnk
jmp 0x1400056be
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAdministrative_ToolsWindows_PowerShell__x86_.lnk
call fcn.140006284
test al, al
je 0x14000565c
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAdministrative_ToolsWindows_PowerShell__x86_.lnk
jmp 0x1400056be
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell__x86_.lnk
call fcn.140006284
test al, al
je 0x1400056c1
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell__x86_.lnk
jmp 0x1400056be
lea rcx, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell.lnk
call fcn.140006284
test al, al
je 0x14000568e
lea rdi, str._AppData_MicrosoftWindowsStart_MenuProgramsWindows_PowerShellWindows_PowerShell.lnk
jmp 0x1400056be
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsSystem_ToolsWindows_PowerShell.lnk
call fcn.140006284
test al, al
je 0x1400056a7
lea rdi, str._ProgramData_MicrosoftWindowsStart_MenuProgramsSystem_ToolsWindows_PowerShell.lnk
jmp 0x1400056be
lea rcx, str._ProgramData_MicrosoftWindowsStart_MenuProgramsAccessoriesWindows_PowerShellWindows_PowerShell.lnk
call fcn.140006284
test al, al
je 0x1400056c1
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.140006bc4
test eax, eax
js 0x140005a80
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
lea r8, [rbp + 0x7f]
mov edx, 0x7ffffffe
mov rcx, rdi
call fcn.140006cfc
mov rdx, qword [rbp + 0x7f]
inc rdx
mov r8, rdi
lea rsi, [0x140015c20]
mov rcx, rsi
call fcn.140006c78
test ebx, ebx
jne 0x140005740
lea r8, [rbp + 0x7f]
mov edx, 0x7ffffffe
mov rcx, rdi
call fcn.140006cfc
mov rdx, qword [rbp + 0x7f]
inc rdx
mov r8, rdi
mov rcx, rsi
call fcn.140006c78
mov qword [rbp + 0xf], r12
mov qword [rbp - 1], r12
lea rax, [rbp - 1]
mov qword [rsp + 0x20], rax
lea r9, [0x14000d938]
mov r8d, r13d
xor edx, edx
lea rcx, [0x14000d670]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
mov ebx, eax
test eax, eax
js 0x140005a6b
mov rcx, qword [rbp - 1]
mov rax, qword [rcx]
lea r8, [rbp + 0xf]
lea rdx, [0x14000d6a0]
mov rax, qword [rax]
call qword [0x14000d338]
mov ebx, eax
test eax, eax
js 0x140005a6b
mov rcx, qword [rbp + 0xf]
mov rax, qword [rcx]
mov r8d, 2
mov rdx, rsi
mov rax, qword [rax + 0x28]
call qword [0x14000d338]
mov dword [rbp + 0x77], r12d
test eax, eax
js 0x1400057e7
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 [0x14000d338]
mov ebx, eax
test eax, eax
jns 0x140005812
jmp 0x140005a6b
lea r8, [rbp + 0x7f]
mov edx, 0x7ffffffe
lea rcx, str._windir_System32WindowsPowerShell_v1.0powershell.exe
call fcn.140006cfc
mov rdx, qword [rbp + 0x7f]
inc rdx
lea r8, str._windir_System32WindowsPowerShell_v1.0powershell.exe
mov rcx, rsi
call fcn.140006c78
mov qword [rbp - 9], r12
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
lea r9, [0x14000d918]
xor edx, edx
lea r8d, [rdx + 3]
lea rcx, [0x14000d690]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
mov ebx, eax
test eax, eax
js 0x140005a61
mov qword [rbp - 0x19], r12
mov qword [rbp + 0x7f], r12
mov qword [rbp - 0x11], r12
lea rdx, [rbp + 0x7f]
mov ecx, 0x76
call fcn.140006bc4
mov ebx, eax
test eax, eax
js 0x140005a57
lea rdx, [rbp - 0x11]
mov ecx, 0x77
call fcn.140006bc4
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.140005cf0
mov ebx, eax
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.msvcrt.dll_free]
test ebx, ebx
js 0x140005a57
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x19]
mov rax, qword [rax + 0x28]
call qword [0x14000d338]
mov ebx, eax
test eax, eax
js 0x140005a57
call fcn.140005b60
test eax, eax
je 0x140005a12
lea rdx, [rbp + 0x7f]
mov ecx, 0x7a
call fcn.140006bc4
mov ebx, eax
test eax, eax
js 0x140005a57
lea rdx, [rbp - 0x11]
mov ecx, 0x7b
call fcn.140006bc4
xor edx, edx
lea rcx, [rbp - 0x19]
call qword [sym.imp.ATL.DLL_AtlComPtrAssign]
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.140005cf0
mov ebx, eax
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.msvcrt.dll_free]
test ebx, ebx
js 0x140005a57
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x19]
mov rax, qword [rax + 0x28]
call qword [0x14000d338]
mov ebx, eax
test eax, eax
js 0x140005a57
lea rdx, [rbp + 0x7f]
mov ecx, 0x65
call fcn.140006bc4
mov ebx, eax
test eax, eax
js 0x140005a57
lea rdx, [rbp - 0x11]
mov ecx, 0x6f
call fcn.140006bc4
xor edx, edx
lea rcx, [rbp - 0x19]
call qword [sym.imp.ATL.DLL_AtlComPtrAssign]
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.140005cf0
mov ebx, eax
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rbp - 0x11]
call qword [sym.imp.msvcrt.dll_free]
test ebx, ebx
js 0x140005a57
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x19]
mov rax, qword [rax + 0x28]
call qword [0x14000d338]
mov ebx, eax
test eax, eax
js 0x140005a57
mov qword [rbp + 7], r12
mov rcx, qword [rbp - 9]
mov rax, qword [rcx]
lea r8, [rbp + 7]
lea rdx, str._V
mov rax, qword [rax]
call qword [0x14000d338]
mov ebx, eax
test eax, eax
js 0x140005a4d
mov rax, qword [r15]
mov rdx, qword [rbp + 7]
mov rcx, r15
mov rax, qword [rax + 0x38]
call qword [0x14000d338]
mov ebx, eax
lea rcx, [rbp + 7]
call fcn.140002e88
nop
lea rcx, [rbp - 0x19]
call fcn.140002e88
nop
lea rcx, [rbp - 9]
call fcn.140002e88
nop
lea rcx, [rbp - 1]
call fcn.140002e88
nop
lea rcx, [rbp + 0xf]
call fcn.140002e88
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