Function at 0x180004b00
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rsi
lea rbp, [rsp - 0x4f]
sub rsp, 0x98
mov rax, qword [0x180045068]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rsi, rcx
lea rax, [rbp + 0xf]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov r9d, 8
lea rdx, str.SOFTWAREMicrosoftPowerShell
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x180004b51
xor al, al
jmp 0x180004d4e
mov rcx, qword [rbp + 0xf]
lea r9, [rbp - 9]
mov qword [rsp + 0xc0], rdi
lea r8, [rbp + 0x17]
mov qword [rsp + 0x90], r14
xor edx, edx
xor r14d, r14d
mov dword [rbp - 9], 0x20
mov qword [rsp + 0x38], r14
mov edi, r14d
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x180004d32
mov qword [rsp + 0xb8], rbx
nop dword [rax]
test eax, eax
jne 0x180004d2a
mov rcx, qword [rbp + 0xf]
lea rax, [rbp - 1]
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x180004cee
mov rcx, qword [rbp - 1]
lea rax, [rbp + 7]
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.PowerShellEngine
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x180004c10
mov rcx, qword [rbp - 1]
jmp 0x180004ce8
mov rcx, qword [rbp + 7]
lea rax, [rbp - 9]
mov qword [rsp + 0x28], rax
lea rdx, str.PowerShellVersion
xor r9d, r9d
mov qword [rsp + 0x20], r14
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x180004cda
mov eax, dword [rbp - 9]
cmp eax, 1
jb 0x180004cda
mov dword [rbp - 5], r14d
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rbp + 7]
lea r9, [rbp - 5]
mov rbx, rax
lea rdx, str.PowerShellVersion
lea rax, [rbp - 9]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x180004cb0
cmp dword [rbp - 5], 1
jne 0x180004cb0
cmp dword [rbp - 9], 1
jb 0x180004cb0
mov rcx, rbx
call fcn.180017af0
cmp eax, 5
jl 0x180004cb0
mov byte [rsi + 0x2b0], 1
mov rcx, qword [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180004cee
mov rcx, qword [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0xf]
lea r9, [rbp - 9]
mov qword [rsp + 0x38], r14
lea r8, [rbp + 0x17]
mov qword [rsp + 0x30], r14
inc edi
mov qword [rsp + 0x28], r14
mov edx, edi
mov qword [rsp + 0x20], r14
mov dword [rbp - 9], 0x20
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x180004bb0
mov rbx, qword [rsp + 0xb8]
mov rcx, qword [rbp + 0xf]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r14, qword [rsp + 0x90]
mov al, 1
mov rdi, qword [rsp + 0xc0]
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1800110b0
add rsp, 0x98
pop rsi
pop rbp
ret