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

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rbp, r9
mov r12, r8
mov rbx, rdx
mov rsi, rcx
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x30]
call fcn.10001fee0
nop
lea rcx, [rsp + 0xa0]
call fcn.10001fee0
nop
test r12, r12
je 0x1000580a0
test rbp, rbp
je 0x1000580a0
mov 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 0x100057e4a
xor edi, edi
jmp 0x100058058
mov rax, qword [rsi]
mov edi, 1
cmp dword [rax - 8], edi
jle 0x100057e62
mov edx, dword [rax - 0x10]
mov rcx, rsi
call fcn.10001fbd0
mov r8d, r13d
mov rdx, qword [rsi]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r13, rax
test rax, rax
jne 0x10005803b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x100058037
mov dword [rbx], edi
lea rdx, [0x100012840]
lea rcx, [rsp + 0x40]
call fcn.10001ff98
nop
lea r8, [rsp + 0x30]
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.1000327cc
nop
lea rcx, [rsp + 0x40]
call fcn.10001fba0
lea rdx, [0x100012770]
lea rcx, [rsp + 0x40]
call fcn.10001ff98
nop
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.1000327cc
nop
lea rcx, [rsp + 0x40]
call fcn.10001fba0
mov rbx, qword [rsp + 0xa0]
cmp dword [rbx - 8], edi
jle 0x100057f18
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0xa0]
call fcn.10001fbd0
mov rbx, qword [rsp + 0xa0]
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 0x100057f46
xor edi, edi
jmp 0x100058041
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1000107a0]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x100057f77
xor edi, edi
jmp 0x100058041
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 0x100057f8f
xor edi, edi
jmp 0x100058041
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1000107a0]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x100057fbc
xor edi, edi
jmp 0x100058041
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], 0
cmp dword [rbx - 8], edi
jle 0x100057fed
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0xa0]
call fcn.10001fbd0
mov rbx, qword [rsp + 0xa0]
mov rdx, rbx
mov rbx, 0xffffffff80000002
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x100058008
xor edi, edi
jmp 0x100058041
mov rdx, qword [rsp + 0x30]
cmp dword [rdx - 8], edi
jle 0x100058024
mov edx, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.10001fbd0
mov rdx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
xor edi, edi
test eax, eax
sete dil
jmp 0x100058041
xor edi, edi
jmp 0x100058041
mov dword [rbx], 0
test r13, r13
je 0x10005804f
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 0x100058068
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x10005807b
mov rcx, qword [r12]
test rcx, rcx
je 0x10005807b
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
nop
lea rcx, [rsp + 0xa0]
call fcn.10001fba0
nop
lea rcx, [rsp + 0x30]
call fcn.10001fba0
nop
mov rcx, rsi
call fcn.10001fba0
mov eax, edi
jmp 0x1000580c3
lea rcx, [rsp + 0xa0]
call fcn.10001fba0
nop
lea rcx, [rsp + 0x30]
call fcn.10001fba0
nop
mov rcx, rsi
call fcn.10001fba0
xor eax, eax
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret