Function at 0x140003560
Capabilities:
Create service
Modify service

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x3b0
mov qword [rsp + 0x128], 0xfffffffffffffffe
mov r13, rcx
lea rcx, [rsp + 0xe0]
call fcn.140006ea0
nop
lea rcx, [rsp + 0xb0]
call fcn.140006460
nop
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.1400074c0
nop
lea rcx, [rsp + 0x98]
call fcn.140006cf0
mov edi, eax
lea rcx, [rsp + 0x98]
call fcn.140006ce0
mov rdx, rax
mov r8d, edi
lea rcx, [rsp + 0xe0]
call fcn.140006c40
nop
lea rcx, [rsp + 0x98]
call fcn.140006d10
nop
lea rcx, [rsp + 0xb0]
call fcn.140006d10
nop
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
mov qword [rsp + 0x408], rax
lea rdx, [r13 + 0x48]
lea rcx, [rsp + 0x110]
call fcn.1400074c0
nop
lea rdx, [r13 + 0x78]
lea rcx, [rsp + 0xf8]
call fcn.1400074c0
nop
lea rdx, [r13 + 0x90]
lea rcx, [rsp + 0xc8]
call fcn.1400074c0
nop
test rbx, rbx
je 0x140003aa2
lea rcx, [rsp + 0xc8]
call fcn.140006d00
test al, al
je 0x140003673
xor r12d, r12d
mov r15, r12
jmp 0x140003686
lea rcx, [rsp + 0xc8]
call fcn.140006ce0
mov r15, rax
xor r12d, r12d
lea rcx, [rsp + 0xe0]
call fcn.140006ce0
mov rdi, rax
lea rcx, [rsp + 0xf8]
call fcn.140006ce0
mov rsi, rax
lea rcx, [rsp + 0x110]
call fcn.140006ce0
mov rdx, rax
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 1
mov ecx, dword [r13 + 0x1c]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
mov r8, rsi
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rsi, rax
mov qword [rsp + 0x130], rax
test rax, rax
je 0x1400038e0
lea rdx, [r13 + 0xa8]
lea rcx, [rsp + 0xb0]
call fcn.1400074c0
nop
lea rcx, [rsp + 0xb0]
call fcn.140006ce0
mov qword [rsp + 0x3f8], rax
lea r8, [rsp + 0x3f8]
mov edx, 1
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
lea rcx, [r13 + 0x78]
call fcn.140006ce0
mov r9, rax
lea r8, str.Successfully_installed
lea rdx, str._s__s
lea rcx, [rsp + 0x1b0]
call fcn.140002260
lea rdx, [rsp + 0x1b0]
lea rcx, [rsp + 0x98]
call fcn.140007c00
nop
cmp byte [r13 + 0xd0], 0
jne 0x140003874
cmp dword [r13 + 0x18], 0
je 0x140003845
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x70]
call fcn.1400074c0
nop
mov rcx, rax
call fcn.140006ce0
mov r13, rax
mov qword [rsp + 0x400], r12
test rax, rax
je 0x1400037e5
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasb al, byte [rdi]
not rcx
lea r12, [rcx - 1]
lea rcx, [r12 + 1]
call fcn.140007fd4
mov rdi, rax
mov r8, r13
lea rdx, [0x14000b764]
mov rcx, rax
call qword [sym.imp.MSVCR90.dll_sprintf]
mov r9d, 0x11030
lea r8, str.NI_Services
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, qword [rsp + 0x400]
test rcx, rcx
je 0x140003830
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rdi
call fcn.140008590
nop
lea rcx, [rsp + 0x70]
call fcn.140006d10
jmp 0x140003874
lea rdx, [r13 + 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005ff0
nop
lea r8, [rsp + 0x98]
xor edx, edx
lea rcx, [rsp + 0x70]
call fcn.140006270
nop
lea rcx, [rsp + 0x70]
call fcn.140005f70
nop
lea rcx, [rsp + 0x98]
call fcn.140006d10
nop
lea rcx, [rsp + 0xb0]
call fcn.140006d10
nop
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0xc8]
call fcn.140006d10
nop
lea rcx, [rsp + 0xf8]
call fcn.140006d10
nop
lea rcx, [rsp + 0x110]
call fcn.140006d10
nop
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0xe0]
call fcn.140006d10
jmp 0x140003b0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
lea rcx, [rsp + 0x400]
mov qword [rsp + 0x20], rcx
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x1100
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
lea rcx, [r13 + 0x78]
call fcn.140006ce0
mov r9, rax
lea r8, str.Could_not_install
lea rdx, str._s__s
lea rcx, [rsp + 0x1b0]
call fcn.140002260
lea rdx, [rsp + 0x1b0]
lea rcx, [rsp + 0x98]
call fcn.140007c00
nop
cmp byte [r13 + 0xd0], 0
jne 0x140003a3a
cmp dword [r13 + 0x18], 0
je 0x140003a08
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x70]
call fcn.1400074c0
nop
mov rcx, rax
call fcn.140006ce0
mov rbx, rax
mov qword [rsp + 0x3f8], r12
test rax, rax
je 0x1400039a7
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
dec rcx
jmp 0x1400039aa
mov rcx, r12
inc rcx
call fcn.140007fd4
mov rdi, rax
mov r8, rbx
lea rdx, [0x14000b764]
mov rcx, rax
call qword [sym.imp.MSVCR90.dll_sprintf]
mov r9d, 0x11030
lea r8, str.NI_Services
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, qword [rsp + 0x3f8]
test rcx, rcx
je 0x1400039f3
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rdi
call fcn.140008590
nop
lea rcx, [rsp + 0x70]
call fcn.140006d10
jmp 0x140003a3a
lea rdx, [r13 + 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005ff0
nop
lea r8, [rsp + 0x98]
mov edx, 2
lea rcx, [rsp + 0x70]
call fcn.140006270
nop
lea rcx, [rsp + 0x70]
call fcn.140005f70
nop
lea rcx, [rsp + 0x98]
call fcn.140006d10
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCR90.dll_public:_void___cdecl_std::exception::constructor_void____ptr64]
mov dword [rsp + 0x88], r12d
mov qword [rsp + 0x90], r12
lea rax, vtable.ni::dsc::exception::ServiceFailure.0
mov qword [rsp + 0x70], rax
mov r9d, 0x1ea
lea r8, str.nidscosdepDaemon.cpp
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x138]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x138]
call fcn.14000858a
nop
mov dl, 1
lea rcx, str.Could_not_open_the_Service_Control_Manager
call fcn.1400022b0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCR90.dll_public:_void___cdecl_std::exception::constructor_void____ptr64]
xor r12d, r12d
mov dword [rsp + 0x88], r12d
mov qword [rsp + 0x90], r12
lea rax, vtable.ni::dsc::exception::ServiceFailure.0
mov qword [rsp + 0x70], rax
mov r9d, 0x1f0
lea r8, str.nidscosdepDaemon.cpp
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x188]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x188]
call fcn.14000858a
nop
add rsp, 0x3b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret