Function at 0x100049aec
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.1000193b8
nop
mov dword [rbp], 1
lea rcx, [rsp + 0x58]
call fcn.100020360
nop
lea rcx, [rsp + 0x50]
call fcn.100020360
nop
lea rdx, [0x100010400]
lea rcx, [rsp + 0x30]
call fcn.100020428
nop
lea r8, [rsp + 0x58]
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.100032a84
nop
lea rcx, [rsp + 0x30]
call fcn.10002006c
lea rdx, [0x100010330]
lea rcx, [rsp + 0x30]
call fcn.100020428
nop
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x58]
call fcn.100032a84
nop
lea rcx, [rsp + 0x30]
call fcn.10002006c
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 0x100049f04
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, [0x10000e598]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x100049c2c
cmp eax, 2
jne 0x100049f04
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], rbx
mov ebx, 1
jmp 0x100049f15
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 0x100049f04
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, [0x10000e598]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x100049f04
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
call fcn.10003cc14
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x30], rdx
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.100020390
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.10003636c
cmp eax, ebx
je 0x100049e76
lea rcx, [rsp + 0x48]
call fcn.100020360
nop
lea rcx, [rsp + 0x30]
call fcn.100020360
nop
mov eax, ebx
mov rdx, qword [rsp + 0x60]
cmp rdx, rbx
setne al
cmp eax, ebx
jne 0x100049d17
mov ecx, 0x80004005
call fcn.1000201f8
int3
add rdx, 0x10
lea rcx, [rsp + 0x48]
call fcn.10001f050
mov rdx, qword [rsi]
mov eax, ebx
cmp rdx, rbx
setne al
cmp eax, ebx
jne 0x100049d3f
mov ecx, 0x80004005
call fcn.1000201f8
int3
mov rax, qword [rsp + 0x48]
sub rdx, rax
movzx ecx, word [rax]
cmp cx, word [rax + rdx]
jne 0x100049d5d
add rax, 2
test cx, cx
jne 0x100049d47
mov eax, ebx
jmp 0x100049d62
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x100049e51
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x60]
call fcn.10003ccb4
cmp qword [rsp + 0x70], rbx
je 0x100049e61
mov rdi, qword [rsp + 0x60]
cmp rdi, rbx
je 0x100049dde
mov eax, ebx
cmp rdi, rbx
setne al
cmp eax, ebx
je 0x100049dd3
mov rdx, rdi
mov rdi, qword [rdi]
add rdx, 0x10
lea rcx, [rsp + 0x40]
call fcn.100020390
nop
mov rdx, qword [rsp + 0x40]
mov rcx, r12
call fcn.10001f8e0
nop
lea rcx, [rsp + 0x40]
call fcn.10002006c
cmp rdi, rbx
jne 0x100049d8e
mov rdi, qword [rsp + 0x60]
jmp 0x100049dde
mov ecx, 0x80004005
call fcn.1000201f8
int3
mov eax, ebx
cmp rdi, rbx
setne al
cmp eax, ebx
jne 0x100049df5
mov ecx, 0x80004005
call fcn.1000201f8
int3
lea rdx, [rdi + 0x10]
lea rcx, [rsp + 0x30]
call fcn.10001f050
xor r11d, r11d
lea rdx, [0x10000e568]
mov rdi, rdx
mov rsi, qword [rsp + 0x30]
lea ecx, [r11 + 0x15]
repe cmpsw word [rsi], word [rdi]
je 0x100049e25
sbb r11d, r11d
sbb r11d, 0xffffffff
cmp r11d, ebx
jne 0x100049e61
lea rcx, [rsp + 0x40]
call fcn.100020428
nop
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.10003ccb4
nop
lea rcx, [rsp + 0x40]
call fcn.10002006c
jmp 0x100049e61
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.10003ccb4
mov dword [rbp], ebx
lea rcx, [rsp + 0x30]
call fcn.10002006c
nop
lea rcx, [rsp + 0x48]
call fcn.10002006c
cmp qword [rsp + 0x70], rbx
je 0x100049edc
lea rdx, [rsp + 0xd8]
lea rcx, [rsp + 0x60]
call fcn.100035004
mov rdi, rax
cmp rax, rbx
je 0x100049f04
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, [0x10000e598]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp eax, ebx
je 0x100049ed2
mov rcx, rdi
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
jmp 0x100049f04
mov rcx, rdi
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
jmp 0x100049ef2
lea rdx, [0x10000e598]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp eax, ebx
jne 0x100049f04
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, 1
jmp 0x100049f15
mov rcx, qword [rsp + 0x38]
cmp rcx, rbx
je 0x100049f15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rsp + 0x50]
call fcn.10002006c
nop
lea rcx, [rsp + 0x58]
call fcn.10002006c
nop
lea rcx, [rsp + 0x60]
call fcn.10001f994
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