Function at 0x164cabdc0
Capabilities:
Create service
Persist via windows service
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x20], r9
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2a8
mov rax, qword [0x164cf5010]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov r14, qword [rsp + 0x310]
mov rsi, rcx
mov r12, qword [rsp + 0x318]
mov r15, rdx
mov r13d, dword [rsp + 0x320]
xor ebx, ebx
xor edx, edx
xor ecx, ecx
mov rdi, r9
lea r8d, [rbx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
je 0x164cabe66
lea r8d, [rbx + 1]
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x164cabe5d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x164cabf6d
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
je 0x164cabf5d
xor edx, edx
lea rcx, [rsp + 0x80]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rsp + 0x300]
test rcx, rcx
je 0x164cabed0
cmp word [rcx], bx
je 0x164cabed0
lea rdx, [rsp + 0x80]
sub rdx, rcx
nop dword [rax]
nop dword [rax + rax]
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x164cabec0
mov eax, 0x10
test r14, r14
je 0x164cabee0
cmp word [r14], bx
jne 0x164cabee5
mov eax, 0x110
mov qword [rsp + 0x60], r12
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x58], r14
mov r9d, 0xf01ff
mov qword [rsp + 0x50], rcx
mov r8, rsi
mov qword [rsp + 0x48], rbx
mov rdx, rsi
mov qword [rsp + 0x40], rbx
mov rcx, rbp
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
test rax, rax
je 0x164cabf4a
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x164cabf65
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x164cabf65
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x164cac096
test rdi, rdi
je 0x164cac096
cmp word [rdi], 0
je 0x164cac096
movaps xmm0, xmmword [str.SystemCurrentControlSetServices_]
lea rcx, [rsp + 0xc6]
movaps xmm1, xmmword [0x164ce0f30]
xor edx, edx
mov eax, dword [0x164ce0f60]
mov r8d, 0x1c2
movaps xmmword [rsp + 0x80], xmm0
movaps xmm0, xmmword [0x164ce0f40]
movaps xmmword [rsp + 0x90], xmm1
movaps xmm1, xmmword [0x164ce0f50]
mov dword [rsp + 0xc0], eax
movzx eax, word [0x164ce0f64]
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0xb0], xmm1
mov word [rsp + 0xc4], ax
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x80]
sub rcx, 2
nop dword [rax]
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x164cac000
xor edx, edx
nop dword [rax]
movzx eax, word [rsi + rdx*2]
mov word [rcx + rdx*2], ax
lea rdx, [rdx + 1]
test ax, ax
jne 0x164cac010
lea rax, [rsp + 0x70]
mov r9d, 0x20006
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x80]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x164cac096
mov rax, 0xffffffffffffffff
cmp word [rdi + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x164cac054
mov rcx, qword [rsp + 0x70]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.Description
mov r9d, 1
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.164cd6f70
add rsp, 0x2a8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret