Function at 0x100051a2c
Capabilities:
Delete registry value
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
sub rsp, 0xa0
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov rbp, r9
mov r12, r8
mov rdi, rdx
mov rsi, rcx
xor ebx, ebx
mov qword [rax - 0x80], rbx
lea rcx, [rax - 0x58]
call fcn.100018ee8
nop
mov dword [rbp], 1
lea rcx, [rsp + 0x58]
call fcn.10001e06c
nop
lea rcx, [rsp + 0x50]
call fcn.10001e06c
nop
lea rdx, [0x1000124e0]
lea rcx, [rsp + 0x30]
call fcn.10001e134
nop
lea r8, [rsp + 0x58]
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.10002f9d0
nop
lea rcx, [rsp + 0x30]
call fcn.10001f3ec
lea rdx, [0x100012410]
lea rcx, [rsp + 0x30]
call fcn.10001e134
nop
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x58]
call fcn.10002f9d0
nop
lea rcx, [rsp + 0x30]
call fcn.10001f3ec
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rdx
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x100051e44
mov dword [rsp + 0xd8], ebx
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x100010678]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x100051b6c
cmp eax, 2
jne 0x100051e44
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], rbx
mov ebx, 1
jmp 0x100051e55
mov eax, dword [rsp + 0xd8]
add eax, 4
mov dword [rsp + 0xd8], eax
mov ecx, eax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov rdi, qword [rsp + 0xe0]
mov qword [rdi], rax
cmp rax, rbx
je 0x100051e44
mov ecx, dword [rsp + 0xd8]
mov rax, qword [rsp + 0xe8]
mov dword [rax], ecx
mov r8, rcx
xor edx, edx
mov rcx, qword [rdi]
call sub.msvcrt.dll_memset
lea r11, [rsp + 0xd8]
mov qword [rsp + 0x28], r11
mov rax, qword [rdi]
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]
cmp eax, ebx
jne 0x100051e44
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
call fcn.10003de0c
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x30], rdx
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.10001e09c
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.100032ac4
cmp eax, ebx
je 0x100051db6
lea rcx, [rsp + 0x48]
call fcn.10001e06c
nop
lea rcx, [rsp + 0x30]
call fcn.10001e06c
nop
mov eax, ebx
mov rdx, qword [rsp + 0x60]
cmp rdx, rbx
setne al
cmp eax, ebx
jne 0x100051c57
mov ecx, 0x80004005
call fcn.10001f28c
int3
add rdx, 0x10
lea rcx, [rsp + 0x48]
call fcn.10001e1c8
mov rdx, qword [rsi]
mov eax, ebx
cmp rdx, rbx
setne al
cmp eax, ebx
jne 0x100051c7f
mov ecx, 0x80004005
call fcn.10001f28c
int3
mov rax, qword [rsp + 0x48]
sub rdx, rax
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x100051c9d
add rax, 2
test cx, cx
jne 0x100051c87
mov eax, ebx
jmp 0x100051ca2
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x100051d91
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x60]
call fcn.10003de90
cmp qword [rsp + 0x70], rbx
je 0x100051da1
mov rdi, qword [rsp + 0x60]
cmp rdi, rbx
je 0x100051d1e
mov eax, ebx
cmp rdi, rbx
setne al
cmp eax, ebx
je 0x100051d13
mov rdx, rdi
mov rdi, qword [rdi]
add rdx, 0x10
lea rcx, [rsp + 0x40]
call fcn.10001e09c
nop
mov rdx, qword [rsp + 0x40]
mov rcx, r12
call fcn.10001ee9c
nop
lea rcx, [rsp + 0x40]
call fcn.10001f3ec
cmp rdi, rbx
jne 0x100051cce
mov rdi, qword [rsp + 0x60]
jmp 0x100051d1e
mov ecx, 0x80004005
call fcn.10001f28c
int3
mov eax, ebx
cmp rdi, rbx
setne al
cmp eax, ebx
jne 0x100051d35
mov ecx, 0x80004005
call fcn.10001f28c
int3
lea rdx, [rdi + 0x10]
lea rcx, [rsp + 0x30]
call fcn.10001e1c8
xor r11d, r11d
lea rdx, [0x100010648]
mov rdi, rdx
mov rsi, qword [rsp + 0x30]
lea ecx, [r11 + 0x15]
repe cmpsw word [rsi], word [rdi]
je 0x100051d65
sbb r11d, r11d
sbb r11d, 0xffffffff
cmp r11d, ebx
jne 0x100051da1
lea rcx, [rsp + 0x40]
call fcn.10001e134
nop
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.10003de90
nop
lea rcx, [rsp + 0x40]
call fcn.10001f3ec
jmp 0x100051da1
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.10003de90
mov dword [rbp], ebx
lea rcx, [rsp + 0x30]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0x48]
call fcn.10001f3ec
cmp qword [rsp + 0x70], rbx
je 0x100051e1c
lea rdx, [rsp + 0xd8]
lea rcx, [rsp + 0x60]
call fcn.100031ad4
mov rdi, rax
cmp rax, rbx
je 0x100051e44
mov ecx, dword [rsp + 0xd8]
add ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
mov r9d, 7
xor r8d, r8d
lea rdx, [0x100010678]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp eax, ebx
je 0x100051e12
mov rcx, rdi
call fcn.10005cbc0
jmp 0x100051e44
mov rcx, rdi
call fcn.10005cbc0
jmp 0x100051e32
lea rdx, [0x100010678]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp eax, ebx
jne 0x100051e44
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, 1
jmp 0x100051e55
mov rcx, qword [rsp + 0x38]
cmp rcx, rbx
je 0x100051e55
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rsp + 0x50]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0x58]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0x60]
call fcn.10001a784
mov eax, ebx
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret