Function at 0x140012bf4
Capabilities:
Delete registry value

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rdi
push r12
push r14
push r15
sub rsp, 0x70
mov rdi, rcx
mov r8d, dword [0x14004c9d8]
test r8b, 2
jne 0x140012c34
lea rdx, [rsp + 0x60]
lea rcx, [0x14004c9d8]
call fcn.140013520
mov rdx, qword [rax]
mov qword [rsp + 0xb0], rdx
mov r8d, edx
xor ebx, ebx
mov dword [rsp + 0xb0], ebx
mov byte [rsp + 0xb4], 3
mov eax, ebx
mov dword [rsp + 0xb8], ebx
movzx eax, word [rsp + 0xb4]
mov word [rsp + 0xbc], ax
mov r9d, r8d
shr r9d, 9
lea r15d, [rbx + 1]
and r9d, r15d
shr r8d, 8
and r8d, r15d
mov dword [rsp + 0x30], 3
mov dword [rsp + 0x28], r15d
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x20], rax
mov edx, 0xd9b0fd
lea rcx, [0x14004c9e0]
call fcn.1400070b8
call fcn.140014f38
mov rcx, rax
call fcn.140015be0
mov r12d, 0x80000000
lea ecx, [rax + r12]
test r12d, ecx
jne 0x140012ce1
cmp eax, 0x8007139f
je 0x140012ce1
mov dword [rsp + 0x20], 0xd8
lea r9, str.OctBrokerSvc::ServiceManager::ShutdownOctagon
xor r8d, r8d
lea rdx, str.ShutdownOctagon:_SgrmSessionManager_EndAllSgrmSessions_failed
mov ecx, eax
call fcn.140013c88
mov r8d, r15d
xor edx, edx
lea rcx, [0x140039bd0]
call qword [sym.imp.RPCRT4.dll_RpcServerUnregisterIfEx]
nop dword [rax + rax]
cmp qword [rdi + 0x38], rbx
je 0x140012d4b
mov qword [rdi + 0x38], rbx
mov r14, qword [rdi + 0x40]
mov qword [rdi + 0x40], rbx
test r14, r14
je 0x140012d4b
or eax, 0xffffffff
lock xadd dword [r14 + 8], eax
cmp eax, r15d
jne 0x140012d4b
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax]
call qword [case.0x140034af6.0]
or eax, 0xffffffff
lock xadd dword [r14 + 0xc], eax
cmp eax, r15d
jne 0x140012d4b
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax + 8]
call qword [case.0x140034af6.0]
mov r14, qword [rdi + 0x48]
test r14, r14
je 0x140012d84
mov qword [rdi + 0x48], rbx
mov rcx, r14
call fcn.140014418
mov edx, 0xe0
mov rcx, r14
call fcn.140034780
nop
jmp 0x140012d84
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x140012de6
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x140034af6.0]
mov qword [rdi + 0x18], rbx
mov r14, qword [rdi + 0x20]
mov qword [rdi + 0x20], rbx
test r14, r14
je 0x140012de6
or eax, 0xffffffff
lock xadd dword [r14 + 8], eax
cmp eax, 1
jne 0x140012de6
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax]
call qword [case.0x140034af6.0]
or eax, 0xffffffff
lock xadd dword [r14 + 0xc], eax
cmp eax, 1
jne 0x140012de6
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax + 8]
call qword [case.0x140034af6.0]
cmp qword [rdi + 0x28], rbx
je 0x140012e38
mov qword [rdi + 0x28], rbx
mov r14, qword [rdi + 0x30]
mov qword [rdi + 0x30], rbx
test r14, r14
je 0x140012e38
or eax, 0xffffffff
lock xadd dword [r14 + 8], eax
cmp eax, 1
jne 0x140012e38
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax]
call qword [case.0x140034af6.0]
or eax, 0xffffffff
lock xadd dword [r14 + 0xc], eax
cmp eax, 1
jne 0x140012e38
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax + 8]
call qword [case.0x140034af6.0]
mov r8d, dword [0x14004c9d8]
test r8b, 2
jne 0x140012e64
lea rdx, [rsp + 0x68]
lea rcx, [0x14004c9d8]
call fcn.140013520
mov rcx, qword [rax]
mov qword [rsp + 0xa0], rcx
mov r8d, ecx
and dword [rsp + 0xa0], 0
mov byte [rsp + 0xa4], 3
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x50], eax
movzx eax, word [rsp + 0xa4]
mov word [rsp + 0x54], ax
mov r9d, r8d
shr r9d, 9
and r9d, r15d
shr r8d, 8
and r8d, r15d
mov dword [rsp + 0x30], 3
mov dword [rsp + 0x28], r15d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov edx, 0xd9b0fd
lea rcx, [0x14004c9e0]
call fcn.1400070b8
call fcn.140014f38
mov rcx, rax
call fcn.140014e84
lea ecx, [rax + r12]
test r12d, ecx
jne 0x140012f02
cmp eax, 0x8007139f
je 0x140012f02
mov dword [rsp + 0x20], 0x10d
lea r9, str.OctBrokerSvc::ServiceManager::ShutdownOctagon
xor r8d, r8d
lea rdx, str.ShutdownOctagon:_SgrmSessionManager_Uninitialize_failed
mov ecx, eax
call fcn.140013c88
mov dword [rsp + 0xa8], ebx
mov qword [rsp + 0x58], rbx
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetControlWMISecurity
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x140012f92
cmp dword [rsp + 0xa8], 2
jne 0x140012f92
lea rdx, str.c688cf83_9945_5ff6_0e1e_1ff1f8a2ec9a
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteValueW]
nop dword [rax + rax]
test eax, eax
je 0x140012fbe
mov dword [rsp + 0x20], 0x131
lea rdx, str._revertAccessPermissionsToTraceProvider:_Failed_to_delete_value
jmp 0x140012fa1
mov dword [rsp + 0x20], 0x129
lea rdx, str._revertAccessPermissionsToTraceProvider:_Failed_to_open_key
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
lea r9, str.OctBrokerSvc::_revertAccessPermissionsToTraceProvider
mov r8d, r15d
cmovle ecx, eax
call fcn.140013c88
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140012fd4
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
add rsp, 0x70
pop r15
pop r14
pop r12
pop rdi
pop rbx
ret