Function at 0x10004d32c
Capabilities:
Delete registry key
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], rbp
mov rbp, r9
mov r12, r8
mov rbx, rdx
mov rsi, rcx
and qword [rax - 0x40], 0
lea rcx, [rax - 0x48]
call fcn.10001e06c
nop
lea rcx, [rsp + 0x90]
call fcn.10001e06c
nop
test r12, r12
je 0x10004d5fc
test rbp, rbp
je 0x10004d5fc
and qword [r12], 0
mov r13d, 0x80000000
mov r8d, r13d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
jne 0x10004d3b2
xor edi, edi
jmp 0x10004d5b4
mov rax, qword [rsi]
mov edi, 1
cmp dword [rax - 8], edi
jle 0x10004d3ca
mov edx, dword [rax - 0x10]
mov rcx, rsi
call fcn.10001e9a0
mov r8d, r13d
mov rdx, qword [rsi]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r13, rax
test rax, rax
jne 0x10004d59a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x10004d596
mov dword [rbx], edi
lea rdx, [0x1000124e0]
lea rcx, [rsp + 0x40]
call fcn.10001e134
nop
lea r8, [rsp + 0x30]
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.10002f9d0
nop
lea rcx, [rsp + 0x40]
call fcn.10001f3ec
lea rdx, [0x100012410]
lea rcx, [rsp + 0x40]
call fcn.10001e134
nop
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.10002f9d0
nop
lea rcx, [rsp + 0x40]
call fcn.10001f3ec
mov rbx, qword [rsp + 0x90]
cmp dword [rbx - 8], edi
jle 0x10004d480
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x90]
call fcn.10001e9a0
mov rbx, qword [rsp + 0x90]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, rbx
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x10004d4ae
xor edi, edi
jmp 0x10004d59d
mov qword [rsp + 0x28], rbp
and qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x100010678]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x10004d4dc
xor edi, edi
jmp 0x10004d59d
mov ecx, dword [rbp]
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov qword [r12], rax
test rax, rax
jne 0x10004d4f4
xor edi, edi
jmp 0x10004d59d
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x100010678]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x10004d51e
xor edi, edi
jmp 0x10004d59d
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
and qword [rsp + 0x38], 0
cmp dword [rbx - 8], edi
jle 0x10004d54c
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x90]
call fcn.10001e9a0
mov rbx, qword [rsp + 0x90]
mov rdx, rbx
mov rbx, 0xffffffff80000002
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x10004d567
xor edi, edi
jmp 0x10004d59d
mov rdx, qword [rsp + 0x30]
cmp dword [rdx - 8], edi
jle 0x10004d583
mov edx, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.10001e9a0
mov rdx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
xor edi, edi
test eax, eax
sete dil
jmp 0x10004d59d
xor edi, edi
jmp 0x10004d59d
and dword [rbx], 0
test r13, r13
je 0x10004d5ab
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x10004d5c4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x10004d5d7
mov rcx, qword [r12]
test rcx, rcx
je 0x10004d5d7
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
nop
lea rcx, [rsp + 0x90]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0x30]
call fcn.10001f3ec
nop
mov rcx, rsi
call fcn.10001f3ec
mov eax, edi
jmp 0x10004d61f
lea rcx, [rsp + 0x90]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0x30]
call fcn.10001f3ec
nop
mov rcx, rsi
call fcn.10001f3ec
xor eax, eax
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret