Function at 0x140005a50
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x60
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rsi, rdx
mov rbx, rcx
xor r12d, r12d
cmp rdx, r12
je 0x1400081f1
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], r12d
xor r9d, r9d
mov r8, qword [rcx]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x48]
call fcn.1400018d0
mov edi, eax
cmp eax, r12d
jne 0x1400081fb
lea rbp, str.ServiceStarted
mov dword [rsp + 0x98], 8
lea rax, [rsp + 0x98]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0xa0]
xor r8d, r8d
mov rdx, rbp
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r13d, 4
cmp eax, r12d
jne 0x140005b21
cmp dword [rsp + 0xa0], 0xb
jne 0x140008238
mov eax, r12d
cmp eax, r12d
jne 0x140008238
lea rbp, str.Heartbeat
mov dword [rsp + 0x98], 8
lea rdi, [rsi + 8]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0xa0]
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, r12d
jne 0x140005b7f
cmp dword [rsp + 0xa0], 0xb
jne 0x140008277
mov eax, r12d
cmp eax, r12d
jne 0x140008277
lea rbp, str.WaitingForShutdown
mov dword [rsp + 0x98], r13d
lea rdi, [rsi + 0x10]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0xa0]
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, r12d
jne 0x140005bda
cmp dword [rsp + 0xa0], r13d
jne 0x1400082b3
mov eax, r12d
cmp eax, r12d
jne 0x1400082b3
lea rbp, str.ServiceFailures
mov dword [rsp + 0x98], r13d
add rsi, 0x14
lea rax, [rsp + 0x98]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0xa0]
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, r12d
jne 0x140005c35
cmp dword [rsp + 0xa0], r13d
jne 0x1400082ef
mov eax, r12d
cmp eax, r12d
jne 0x1400082ef
cmp rbx, r12
je 0x140005c4c
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x140005c50
mov rbx, qword [rsp + 0x90]
add rsp, 0x60
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, 0x80070057
jmp 0x140005c50
mov r9d, eax
mov r8, qword [rbx]
lea rdx, str.CServiceUptime::SetHeartbeatInterval:_Failed_to_open_key__s___0x_x
mov ecx, 1
call fcn.1400016b0
movzx ebx, di
mov bh, 0xdf
or ebx, 0x80070000
cmp edi, r12d
cmovle ebx, edi
mov rcx, qword [rsp + 0x48]
cmp rcx, r12
je 0x140008231
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
jmp 0x140005c50
mov qword [rsi], r12
mov dword [rsp + 0x98], r12d
mov dword [rsp + 0x28], r13d
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
mov r9d, r13d
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp eax, r12d
je 0x140005b2a
jmp 0x140008329
mov qword [rdi], r12
mov dword [rsp + 0x98], r12d
mov dword [rsp + 0x28], r13d
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
mov r9d, r13d
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp eax, r12d
je 0x140005b88
jmp 0x140008329
mov dword [rdi], r12d
mov dword [rsp + 0x98], r12d
mov dword [rsp + 0x28], r13d
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
mov r9d, r13d
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp eax, r12d
je 0x140005be3
jmp 0x140008329
mov dword [rsi], r12d
mov dword [rsp + 0x98], r12d
mov dword [rsp + 0x28], r13d
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
mov r9d, r13d
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp eax, r12d
je 0x140005c3e
mov r9d, edi
mov r8, rbp
lea rdx, str.CServiceUptime::GetHistory:_Failed_to_set_default_for_value__s___0x_x
mov ecx, 1
call fcn.1400016b0
movzx esi, di
or esi, 0x80070000
cmp edi, r12d
cmovle esi, edi
cmp rbx, r12
je 0x14000835d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x140005c50