Function at 0x14004e5b0
Capabilities:
Create service
Modify service

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x238]
sub rsp, 0x338
mov rax, qword [0x1400f0158]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov r14, r9
mov r12, r8
mov rbx, rdx
mov rdi, rcx
mov r15, qword [rbp + 0x2a0]
mov r13d, dword [rbp + 0x2a8]
mov eax, dword [rbp + 0x2b0]
mov dword [rsp + 0x78], eax
mov rcx, qword [rbp + 0x2b8]
mov qword [rsp + 0x70], rcx
cmp qword [rdi + 0x10], 0
jne 0x14004e8e9
mov rcx, qword [rdi + 0x48]
xor edx, edx
test rcx, rcx
je 0x14004e649
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor edx, edx
mov qword [rdi + 0x48], rdx
lea rax, [rdi + 0x20]
cmp qword [rdi + 0x38], 8
jb 0x14004e63e
mov rax, qword [rdi + 0x20]
mov qword [rdi + 0x30], rdx
mov word [rax], dx
mov eax, dword [rsp + 0x78]
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x58], rdx
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r13d
mov r9d, 0xf01ff
mov r8, r14
mov rdx, rbx
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov qword [rdi + 0x48], rax
test rax, rax
je 0x14004e7c7
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x14004e6b0
mov rdx, rbx
lea rcx, [rdi + 0x20]
call fcn.140003fa0
test r15, r15
je 0x14004e6ed
mov qword [rsp + 0x70], r15
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, qword [rdi + 0x48]
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
je 0x14004e91d
cmp byte [rbp + 0x2c0], 0
je 0x14004e7a4
lea rcx, [rbp + 0x110]
lea rax, str.D:_A__CCLCSWRPWPDTLOCRRC___SY__A__CCDCLCSWRPWPDTLOCRSDRCWDWO___BA__A__CCLCSWLOCRRC___AU__A__CCLCSWRPWPDTLOCRRC___PU__A__RP___IU_
mov r8d, 2
nop
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x50], xmm1
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x60], xmm0
lea rcx, [rcx + 0x80]
movups xmm1, xmmword [rax + 0x70]
movups xmmword [rcx - 0x10], xmm1
lea rax, [rax + 0x80]
sub r8, 1
jne 0x14004e710
movzx eax, word [rax]
mov word [rcx], ax
xor r9d, r9d
lea r8, [rsp + 0x70]
lea edx, [r9 + 1]
lea rcx, [rbp + 0x110]
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
je 0x14004e986
mov r8, qword [rsp + 0x70]
mov edx, 4
mov rcx, qword [rdi + 0x48]
call qword [sym.imp.ADVAPI32.dll_SetServiceObjectSecurity]
test eax, eax
je 0x14004e9ef
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.140071b40
add rsp, 0x338
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, 1
lea rcx, [rbp - 0x50]
call fcn.140008170
nop
cmp edi, 0x57
ja 0x14004e829
je 0x14004e820
mov ecx, edi
sub ecx, 5
je 0x14004e817
sub ecx, 1
je 0x14004e80e
cmp ecx, 0x2e
jne 0x14004e83c
lea rdx, str.InstallService:_the_display_name_already_exists_in_the_SCM_database_either_as_a_service_name_or_as_another_display_name__
lea rcx, [rbp - 0x50]
call fcn.14001d460
mov rdx, r14
jmp 0x14004e897
lea rdx, str.InstallService:_the_SCM_is_not_open__
jmp 0x14004e88b
lea rdx, str.InstallService:_insufficient_user_rights_to_install_service__
jmp 0x14004e88b
lea rdx, str.InstallService:_one_of_the_parameters_is_incorrect__
jmp 0x14004e88b
mov eax, edi
sub eax, 0x7b
je 0x14004e884
sub eax, 0x3a8
je 0x14004e87b
cmp eax, 0xe
je 0x14004e872
lea rdx, str.InstallService_failed_to_install_the_service
lea rcx, [rbp - 0x50]
call fcn.14001d460
mov rcx, rax
mov rdx, rbx
call fcn.14001d800
mov rcx, rax
lea rdx, [0x1400bf784]
call fcn.14001d460
mov edx, edi
mov rcx, rax
call fcn.140042640
jmp 0x14004e89f
lea rdx, str.InstallService:_a_service_with_this_name_already_exists_on_this_server__
jmp 0x14004e88b
lea rdx, str.InstallService:_a_circular_service_dependency_was_specified__
jmp 0x14004e88b
lea rdx, str.InstallService:_service_name_has_an_invalid_format__
lea rcx, [rbp - 0x50]
call fcn.14001d460
mov rdx, rbx
mov rcx, rax
call fcn.14001d800
lea rdx, [rbp + 0xa0]
lea rcx, [rbp - 0x50]
call fcn.140010260
nop
mov rdx, rax
lea rcx, [rbp + 0xc8]
call fcn.14004f8a0
mov rbx, rax
call fcn.14004f890
mov r8, rax
mov r9, rbx
mov edx, edi
lea rcx, [rbp - 0x80]
call fcn.140049110
lea rdx, [0x1400e7738]
lea rcx, [rbp - 0x80]
call fcn.1400787c0
nop
call fcn.14004f890
mov r8, rax
lea r9, str.InstallService_can_only_be_run_on_the_local_machine
mov edx, 0x32
lea rcx, [rbp + 0xa0]
call fcn.140049150
lea rdx, [0x1400e7738]
lea rcx, [rbp + 0xa0]
call fcn.1400787c0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, eax
lea rcx, [rbp + 0xe8]
call fcn.14004ad70
mov rbx, rax
lea rdx, str.SetServiceDescription:_ChangeServiceConfig2_failed__
lea rcx, [rbp + 0xc8]
call fcn.140005210
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0xa0]
call fcn.140021ff0
mov rbx, rax
call fcn.14004f890
mov r8, rax
mov r9, rbx
mov edx, edi
lea rcx, [rbp - 0x80]
call fcn.140049110
lea rdx, [0x1400e7738]
lea rcx, [rbp - 0x80]
call fcn.1400787c0
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, eax
lea rcx, [rbp + 0xa0]
call fcn.14004ad70
mov rbx, rax
lea rdx, str.grantUserStartPermission:_ConvertStringSecurityDescriptorToSecurityDescriptorA_failed__
lea rcx, [rbp + 0xc8]
call fcn.140005210
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0xe8]
call fcn.140021ff0
mov rbx, rax
call fcn.14004f890
mov r8, rax
mov r9, rbx
mov edx, edi
lea rcx, [rbp - 0x80]
call fcn.140049110
lea rdx, [0x1400e7738]
lea rcx, [rbp - 0x80]
call fcn.1400787c0
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, eax
lea rcx, [rbp + 0xa0]
call fcn.14004ad70
mov rbx, rax
lea rdx, str.grantUserStartPermission:_SetServiceObjectSecurity_failed__
lea rcx, [rbp + 0xc8]
call fcn.140005210
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0xe8]
call fcn.140021ff0
mov rbx, rax
call fcn.14004f890
mov r8, rax
mov r9, rbx
mov edx, edi
lea rcx, [rbp - 0x80]
call fcn.140049110
lea rdx, [0x1400e7738]
lea rcx, [rbp - 0x80]
call fcn.1400787c0
int3