Function at 0x140016cc0
Capabilities:
Delete registry value
Set registry value

Disassembly:
mov qword ss:[rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x140237008]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov rsi, rdx
mov rbx, rcx
xor edx, edx
lea rcx, str.RegEdit_RegEdit
xor dil, dil
call qword [sym.imp.USER32.dll_FindWindowW]
mov r14, rax
test rax, rax
jne 0x140016d25
mov rdx, rsi
mov rcx, rbx
call sym.ProcessHacker.exe_PhShellOpenKey
mov al, 1
jmp 0x140016fcb
lea rcx, [rbp - 0x78]
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte [rax + 8], 1
jne 0x140016d4d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call sym.ProcessHacker.exe_PhUiConnectToPhSvcEx
test al, al
je 0x140016fcb
mov rcx, qword [0x14023a708]
mov word [rsp + 0x70], cx
lea eax, [rcx + 2]
mov word [rsp + 0x72], ax
mov rax, qword [str.SoftwareMicrosoftWindowsCurrentVersionAppletsRegeditFavorites]
mov qword [rsp + 0x78], rax
cmp rcx, 0xfffe
ja 0x140016fb0
xor r8d, r8d
lea rax, [rsp + 0x68]
lea r9, [rbp - 0x60]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x70]
lea rcx, [r8 - 9]
call fcn.14011ab40
nop dword [rax]
test eax, eax
js 0x140016fb0
xor eax, eax
lea r8, [rbp - 0x60]
mov qword [rsp + 0x30], rax
lea rcx, [rbp - 0x30]
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov edx, 0x20006
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov rcx, qword [rsp + 0x68]
mov ebx, eax
test rcx, rcx
je 0x140016de6
nop word [rax + rax]
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
js 0x140016fb0
mov eax, dword [0x1401da640]
lea rcx, [rbp - 2]
movups xmm0, xmmword [str.A_ProcessHacker]
mov edx, 0x10
mov dword [rbp - 8], eax
movsd xmm1, qword [0x1401da638]
movzx eax, word [0x1401da644]
movups xmmword [rbp - 0x20], xmm0
mov word [rbp - 4], ax
movsd qword [rbp - 0x10], xmm1
call sym.ProcessHacker.exe_PhGenerateRandomAlphaString
cmp byte [0x140244611], 1
mov rdi, 0xffffffffffffffff
jb 0x140016ebd
lea rbx, [rbp - 0x20]
xorps xmm1, xmm1
and rbx, 0xfffffffffffffff1
lea rcx, [rbp - 0x20]
and ecx, 0xf
je 0x140016e71
xorps xmm0, xmm0
pcmpeqw xmm0, xmmword [rbx]
pmovmskb eax, xmm0
sar eax, cl
bsf ecx, eax
mov dword [rsp + 0x40], ecx
je 0x140016e6d
mov ebx, ecx
shr rbx, 1
jmp 0x140016ece
add rbx, 0x10
xorps xmm0, xmm0
pcmpeqw xmm0, xmmword [rbx]
pmovmskb eax, xmm0
bsf ecx, eax
mov dword [rsp + 0x40], ecx
jne 0x140016ea9
nop word [rax + rax]
add rbx, 0x10
movdqa xmm0, xmm1
pcmpeqw xmm0, xmmword [rbx]
pmovmskb eax, xmm0
bsf ecx, eax
mov dword [rsp + 0x40], ecx
je 0x140016e90
lea rax, [rbp - 0x20]
sub rbx, rax
mov eax, ecx
shr rax, 1
sar rbx, 1
add rbx, rax
jmp 0x140016ece
lea rax, [rbp - 0x20]
mov rbx, rdi
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140016ec4
lea rax, [rbp - 0x20]
add rbx, rbx
mov rcx, rsi
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rax
call fcn.1400f51c0
mov rsi, rax
mov word [rsp + 0x48], bx
mov ecx, dword [rax]
mov rdx, qword [rax + 8]
add ecx, 2
lea eax, [rbx + 2]
mov word [rsp + 0x4a], ax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x50], rax
cmp rbx, 0xfffe
ja 0x140016f33
mov dword [rsp + 0x28], ecx
mov r9d, 1
mov rcx, qword [rbp - 0x30]
xor r8d, r8d
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x48]
call qword [sym.imp.ntdll.dll_NtSetValueKey]
lea rcx, ds:[rsi - 0x10]
lock xadd dword [rcx + 8], edi
cmp edi, 1
jne 0x140016f4a
call fcn.1400fbcc0
lea rcx, [rbp - 0x78]
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
lea rdx, [rsp + 0x58]
mov rcx, r14
movzx r8d, byte [rax + 8]
not r8b
and r8b, 1
call fcn.140016aa0
mov rdx, qword [rsp + 0x58]
movzx edi, al
mov word [rsp + 0x48], dx
lea ecx, [rdx + 2]
mov word [rsp + 0x4a], cx
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x50], rcx
cmp rdx, 0xfffe
ja 0x140016fa6
mov rcx, qword ds:[rbp - 0x30]
lea rdx, [rsp + 0x48]
call qword [sym.imp.ntdll.dll_NtDeleteValueKey]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ntdll.dll_NtClose]
lea rcx, [rsp + 0x70]
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte ds:[rax + 8], 1
jne 0x140016fc7
call sym.ProcessHacker.exe_PhUiDisconnectFromPhSvc
movzx eax, dil
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.1401848a0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret