Function at 0x140001b40
Capabilities:
Access the windows event log
Create service
Persist via windows service
Set registry value

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x3e0]
sub rsp, 0x4e0
mov rax, qword [0x14000a160]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov rsi, rcx
xor edx, edx
mov r8d, 0xf003f
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x140001e79
mov qword [rsp + 0x518], r13
lea rcx, [rbp + 0x1b2]
xor r13d, r13d
xor edx, edx
mov r8d, 0x206
mov qword [rsp + 0x4d8], r14
mov word [rbp + 0x1b0], r13w
mov qword [rsp + 0x4d0], r15
call sub.MSVCR110.dll_memset
lea rdx, [rbp + 0x1b0]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
lea rax, [rbp + 0x1b0]
lea r14, [rsi + 8]
mov r9d, 0xf01ff
mov qword [rsp + 0x38], rax
mov eax, 1
mov r8, r14
mov dword [rsp + 0x30], eax
mov rdx, r14
mov rcx, rdi
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r15, rax
test rax, rax
je 0x140001c94
lea rcx, [rbp - 0x5e]
xor edx, edx
mov r8d, 0x206
mov word [rbp - 0x60], r13w
call sub.MSVCR110.dll_memset
lea r8, str.SYSTEMCurrentControlSetServicesEventLogApplication_
lea rcx, [rbp - 0x60]
mov edx, 0x104
mov qword [rsp + 0x70], r13
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rcx, [rbp - 0x60]
mov r8, r14
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea r8, [rsp + 0x70]
lea rdx, [rbp - 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x140001ca4
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140001e61
mov qword [rsp + 0x508], rbx
or rbx, 0xffffffffffffffff
lea rcx, [rbp + 0x1b0]
mov rax, rbx
mov qword [rsp + 0x510], r12
inc rax
cmp word [rcx + rax*2], r13w
jne 0x140001cc2
mov rcx, qword [rsp + 0x70]
add eax, 2
lea rdx, str.EventMessageFile
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x1b0]
mov r9d, 2
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
lea rdx, str.TypesSupported
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x78], 7
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r14, r14
mov r12d, r13d
mov eax, 1
mov qword [rbp - 0x80], r14
mov qword [rbp - 0x78], r13
cmovne r12d, eax
mov qword [rbp - 0x70], r13
cmp qword [rsi + 0x2c0], r13
jne 0x140001d70
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov qword [rsi + 0x2c0], rax
mov rcx, qword [rsi + 0x2c0]
test rcx, rcx
je 0x140001dab
mov qword [rsp + 0x40], r13
xor r8d, r8d
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r13d
lea edx, [r8 + 4]
lea r9d, [r8 + 0x64]
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
lea r8, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 0x60]
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rcx, [rbp - 0x60]
mov r8, r14
mov edx, 0x104
call qword [sym.imp.MSVCR110.dll_wcscat_s]
lea r8, [rsp + 0x70]
lea rdx, [rbp - 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov r12, qword [rsp + 0x510]
test eax, eax
jne 0x140001e42
lea rcx, [rsi + 0x88]
nop dword [rax]
cmp word [rcx + rbx*2 + 2], r13w
lea rbx, [rbx + 1]
jne 0x140001e00
lea eax, [rbx*2 + 2]
lea rdx, str.Description
mov r9d, 1
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x70]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x508]
mov eax, 1
mov r14, qword [rsp + 0x4d8]
mov r13, qword [rsp + 0x518]
mov r15, qword [rsp + 0x4d0]
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.140004420
add rsp, 0x4e0
pop rdi
pop rsi
pop rbp
ret