Function at 0x1400093e0
Capabilities:
Create service
Modify service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x2b0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
mov rbx, rcx
call fcn.14000936c
test eax, eax
je 0x14000941c
xor eax, eax
jmp 0x1400095f7
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x140009461
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.CServiceModule::Install:_Failed_to_OpenSCManager_0x_x
movzx ebx, ax
mov ecx, 1
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov r8d, ebx
call fcn.1400016b0
jmp 0x1400095f5
mov rcx, qword [0x14001d218]
lea rdx, [rsp + 0x90]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x14000948f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.CServiceModule::Install:_Failed_to_GetModuleFileName_0x_x
jmp 0x140009441
and qword [rsp + 0x60], 0
lea rax, str.NT_AUTHORITYNetworkService
mov edi, 1
mov qword [rsp + 0x58], rax
lea rax, str.RPCSS
lea r8, [rbx + 0x2a8]
mov qword [rsp + 0x50], rax
and qword [rsp + 0x48], 0
and qword [rsp + 0x40], 0
lea rax, [rsp + 0x90]
lea rdx, [rbx + 0xa8]
mov r9d, 0xf01ff
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], edi
mov rcx, rbp
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rsi, rax
test rax, rax
jne 0x140009641
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
cmp ecx, 0x80070431
jne 0x140009620
lea rdx, str.CServiceModule::Install:_Service_already_exists
mov ecx, edi
call fcn.1400016b0
and qword [rsp + 0x40], 0
lea rax, [rsp + 0x78]
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionMedia_CenterService
mov qword [rsp + 0x38], rax
and qword [rsp + 0x30], 0
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0xf003f
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1400095a1
mov rcx, qword [rsp + 0x78]
call fcn.14001157c
test eax, eax
jns 0x140009596
lea rdx, str.CServiceModule::Install:_SecureServiceRegKey_failed_0x_X
mov r8d, eax
mov ecx, edi
call fcn.1400016b0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.FA018B44_5E9F_4875_B127_5085A1B02ABD
call fcn.140010b20
test eax, eax
jns 0x1400095c2
lea rdx, str.CServiceModule::Install:_SetDCOMPermissions_failed_0x_X
mov r8d, eax
mov ecx, edi
call fcn.1400016b0
call fcn.140010984
test eax, eax
jns 0x1400095dc
lea rdx, str.CServiceModule::SecureMCEDirectory:_Failed__0x_x
mov r8d, eax
mov ecx, edi
call fcn.1400016b0
test rsi, rsi
je 0x1400095ea
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.140001710
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
movzx ebx, cx
lea rdx, str.CServiceModule::Install:_Failed_to_CreateService_0x_x
or ebx, 0x80070000
test ecx, ecx
cmovle ebx, ecx
mov ecx, edi
mov r8d, ebx
call fcn.1400016b0
jmp 0x1400095ec
lea r8, [rsp + 0x70]
mov edx, 5
mov rcx, rax
mov dword [rsp + 0x70], edi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14000966b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.CServiceModule:Install:_Failed_to_configure_service_SID_TYPE_0x_x
jmp 0x1400096a5
lea rax, str.SeChangeNotifyPrivilege
lea r8, [rsp + 0x80]
mov edx, 6
mov rcx, rsi
mov qword [rsp + 0x80], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140009536
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.CServiceModule::Install:_Failed_to_configure_service_REQUIRED_PRIVLEDGES_0x_x
movzx ebx, ax
mov ecx, edi
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov r8d, ebx
call fcn.1400016b0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400095ec