Function at 0x140002430
Capabilities:
Create service
Modify service

Disassembly:
push rbx
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x2d8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
mov rax, qword [rsp + 0x330]
mov r14, qword [rsp + 0x338]
mov rbp, qword [rsp + 0x340]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x348]
mov dword [rsp + 0x70], r8d
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x350]
mov r13, rcx
mov r8, rcx
lea rcx, str.Installing_service__ws___ws__..._n
mov dword [rsp + 0x74], r9d
mov qword [rsp + 0x80], rax
mov r15, rdx
xor ebx, ebx
call fcn.140003308
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r12, rax
test rax, rax
jne 0x1400024e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_get_handle_to_SCM__Error:__ld_n
mov edx, eax
call fcn.140003308
lea eax, [rbx + 2]
jmp 0x140002750
lea rcx, [rsp + 0xa2]
xor edx, edx
mov r8d, 0x206
mov qword [rsp + 0x2d0], rsi
mov word [rsp + 0xa0], bx
mov qword [rsp + 0x2c8], rdi
call fcn.1400039a0
test rbp, rbp
je 0x140002584
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbp
repne scasw ax, word [rdi]
mov rdx, rbp
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0xa0]
call fcn.140003ba0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasw ax, word [rdi]
not rcx
dec rcx
lea eax, [rcx + 1]
mov word [rsp + rax*2 + 0xa0], bx
test ecx, ecx
je 0x140002584
lea rax, [rsp + 0xa0]
mov ecx, ecx
mov edx, 0x2c
cmp dx, word [rax]
jne 0x14000257b
mov word [rax], bx
add rax, 2
dec rcx
jne 0x140002573
mov rax, qword [rsp + 0x80]
test rbp, rbp
lea rsi, [rsp + 0xa0]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x90]
cmove rsi, rbx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x50], rsi
lea rbp, [rsp + 0x78]
test r14, r14
mov r9d, 0xf01ff
cmove rbp, rbx
mov r8, r15
mov rdx, r13
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x30], 1
mov rcx, r12
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x78], 0xdeadbeaf
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
test rax, rax
jne 0x140002720
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x14000270d
cmp eax, 0x431
je 0x140002641
lea rcx, str.Could_not_create_service__Error:__ld_n
mov edx, eax
call fcn.140003308
mov ebx, 2
jmp 0x140002735
lea rcx, str.Service_already_exists._No_installation_required._Updating_the_service_config._n
call fcn.140003308
mov r8d, 0xf01ff
mov rdx, r13
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140002680
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_open_service__Error:__ld_n
mov edx, eax
call fcn.140003308
jmp 0x140002735
mov rax, qword [rsp + 0x80]
mov r8d, dword [rsp + 0x74]
mov edx, dword [rsp + 0x70]
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rbp
mov r9d, 1
mov rcx, rdi
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x1400026ee
lea rcx, str.The_service_config_has_been_successfully_updated._n
call fcn.140003308
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002735
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_change_service_config__Error:__ld_n
mov edx, eax
call fcn.140003308
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002735
lea rcx, str.Invalid_parameter_specified__n
call fcn.140003308
mov ebx, 2
jmp 0x140002735
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Installation_of_service_successful__n
call fcn.140003308
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x2c8]
mov rsi, qword [rsp + 0x2d0]
mov eax, ebx
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.140003450
add rsp, 0x2d8
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
ret