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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
mov eax, 0x1108
call fcn.14010fc40
sub rsp, rax
mov rax, qword [0x1401ce680]
xor rax, rsp
mov qword [rsp + 0x10f0], rax
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov r8d, 0x104
lea rdx, [rsp + 0xd0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140146e85
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.14003b570
jmp 0x140147333
mov rax, qword [rsp + 0x1128]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x20], rax
lea r9, str.__s___s
mov r8d, 0x207
mov edx, 0x208
lea rcx, [rsp + 0x4e0]
call fcn.14003b660
mov r8d, 3
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
jne 0x140146eff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x1401b10a0]
call fcn.14003b570
jmp 0x140147333
mov rax, qword [rsp + 0x1148]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x1140]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x1138]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x4e0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov eax, dword [rsp + 0x1130]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
mov r9d, 0xf01ff
mov r8, qword [rsp + 0x1118]
mov rdx, qword [rsp + 0x1110]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
jne 0x140146fba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_with_error_code:_0x_08lx_n
call fcn.14003b570
jmp 0x140147333
mov r9, 0xffffffffffffffff
mov r8, qword [rsp + 0x1120]
mov edx, 0x400
lea rcx, [rsp + 0x8f0]
call fcn.14012a1f8
lea rax, [rsp + 0x8f0]
mov qword [rsp + 0xb8], rax
lea r8, [rsp + 0xb8]
mov edx, 1
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140147028
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Couldnt_set_service_description_with_error_code:_0x_08lx_n
call fcn.14003b570
jmp 0x140147333
cmp dword [rsp + 0x1150], 0
je 0x14014731f
mov dword [rsp + 0x9c], 7
cmp qword [rsp + 0x1160], 0
jne 0x14014705e
lea rax, [rsp + 0xd0]
mov qword [rsp + 0xa8], rax
jmp 0x14014706e
mov rax, qword [rsp + 0x1160]
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x1110]
mov qword [rsp + 0x20], rax
lea r9, [0x1401b10f0]
mov r8, 0xffffffffffffffff
mov edx, 0x100
lea rcx, [rsp + 0x2e0]
call fcn.14003b660
cmp eax, 0xffffffff
jne 0x1401470c6
lea rcx, [0x1401b11f0]
call fcn.14003b570
jmp 0x140147333
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 0
lea r9, [0x1401b11e8]
xor r8d, r8d
lea rdx, [rsp + 0x2e0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x14014713a
mov edx, dword [rsp + 0x70]
lea rcx, str.Cannot_register_service_with_Windows_Event_Log._Error_creating_key:__d_n
call fcn.14003b570
jmp 0x140147333
mov rcx, qword [rsp + 0x90]
call fcn.140129ef4
lea rax, [rax + rax + 2]
mov dword [rsp + 0x98], eax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0xc0], rax
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.EventMessageFile
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x1401471c6
mov edx, dword [rsp + 0x70]
lea rcx, str.Cannot_register_service_with_Windows_Event_Log._Error_creating_value__EventMessageFile_:__d_n
call fcn.14003b570
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140147333
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x9c]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.TypesSupported
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x140147226
mov edx, dword [rsp + 0x70]
lea rcx, str.Cannot_register_service_with_Windows_Event_Log._Error_creating_value__TypesSupported_:__d_n
call fcn.14003b570
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140147333
cmp dword [rsp + 0x1158], 0
jbe 0x140147314
mov rcx, qword [rsp + 0x90]
call fcn.140129ef4
lea rax, [rax + rax + 2]
mov dword [rsp + 0xa0], eax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0xc8], rax
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.CategoryMessageFile
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x1401472ba
mov edx, dword [rsp + 0x70]
lea rcx, str.Cannot_register_service_with_Windows_Event_Log._Error_creating_value__CategoryMessageFile_:__d_n
call fcn.14003b570
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140147333
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x1158]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.CategoryCount
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x140147314
mov edx, dword [rsp + 0x70]
lea rcx, str.Cannot_register_service_with_Windows_Event_Log._Error_creating_value__CategoryCount_:__d_n
call fcn.14003b570
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140147333
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rsp + 0x1110]
lea rcx, str._s_is_installed._n
call fcn.14003b570
cmp qword [rsp + 0x80], 0
je 0x140147358
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [rsp + 0x80], 0
cmp qword [rsp + 0x88], 0
je 0x14014737d
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [rsp + 0x88], 0
mov rcx, qword [rsp + 0x10f0]
xor rcx, rsp
call fcn.14010f1d0
add rsp, 0x1108
ret