Function at 0x1400184f0
Capabilities:
Modify service

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x178]
sub rsp, 0x250
mov qword [rbp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140087710]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov r13, rcx
xor edi, edi
mov dword [rsp + 0x60], edi
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x128], xmm0
mov qword [rbp + 0x138], rdi
mov esi, edi
mov dword [rbp + 0x120], edi
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
lea rdx, [r13 + 0x68]
mov r8d, 0xf003f
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r12, rax
lea rax, [0x140057410]
mov qword [rsp + 0x70], rax
lea rax, [0x140057418]
mov qword [rbp - 0x80], rax
lea rax, vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + 0x10], rax
mov r14d, 1
mov dword [rsp + 0x60], r14d
xor r8d, r8d
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005f90
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x78]
call fcn.1400060c0
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rdi
mov dword [rbp - 8], edi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x6c], edx
mov dword [rbp], 0x64
lea rdx, str.ReconfigureService__
lea rcx, [rbp - 0x80]
call fcn.1400059b0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x10], rax
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
lea r9, [rbp + 0x120]
xor edx, edx
lea r8d, [rdi + 0x40]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140018e7b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140018e7b
mov eax, dword [rbp + 0x120]
lea ebx, [rax + 0x40]
mov edx, eax
lea rcx, [rbp + 0x128]
call fcn.14001da50
mov r15, qword [rbp + 0x128]
lea r9, [rbp + 0x120]
mov r8d, ebx
mov rdx, r15
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140018805
lea rax, [0x140057410]
mov qword [rsp + 0x70], rax
lea rax, [0x140057418]
mov qword [rbp - 0x80], rax
lea rax, vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + 0x10], rax
mov r14d, 5
mov dword [rsp + 0x60], r14d
xor r8d, r8d
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005f90
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x78]
call fcn.1400060c0
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rdi
mov dword [rbp - 8], edi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x6c], edx
mov dword [rbp], 0xa
lea rdx, str.error_QueryServiceConfig
lea rcx, [rbp - 0x80]
call fcn.1400059b0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x10], rax
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
test r15, r15
je 0x140018e7b
lea rax, [0x140057410]
mov qword [rsp + 0x70], rax
lea rax, [0x140057418]
mov qword [rbp - 0x80], rax
or r14d, 0x10
mov dword [rsp + 0x60], r14d
lea rax, vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + 0x10], rax
mov dword [rbp + 0xc], 0x88
mov qword [rsp + 0x78], rdi
mov qword [rbp + 0x50], rdi
mov qword [rbp + 0x18], rdi
mov dword [rbp + 0x24], edi
mov dword [rbp + 0x28], 0x201
movdqa xmm0, xmmword [reloc.OLEAUT32.dll_SysStringLen]
movdqu xmmword [rbp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x40], xmm1
mov dword [rbp + 0x20], edi
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call fcn.14002ac70
mov rbx, rax
test rax, rax
je 0x140018897
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov cl, 1
call fcn.14002cd7c
mov qword [rbx + 8], rax
jmp 0x14001889a
mov rbx, rdi
mov qword [rbp + 0x50], rbx
lea rax, [rbp - 0x78]
mov qword [rbp + 0x58], rax
mov qword [rbp + 0x60], rdi
mov dl, 0x20
lea rcx, [rbp + 0x10]
call fcn.14000bdd0
mov word [rbp + 0x68], ax
cmp qword [rbp + 0x58], 0
jne 0x140018985
mov eax, dword [rbp + 0x20]
and eax, 0x13
or eax, 4
mov dword [rbp + 0x20], eax
and eax, dword [rbp + 0x24]
je 0x140018985
mov edx, 1
test al, 4
je 0x140018915
lea rcx, [rbp + 0x78]
call fcn.14000b410
mov r8, rax
lea rdx, str.ios_base::badbit_set
lea rcx, [rbp + 0xa8]
call fcn.1400067d0
lea rdx, [0x140079cb0]
lea rcx, [rbp + 0xa8]
call fcn.1400304a0
int3
test al, 2
je 0x14001894f
lea rcx, [rbp + 0x88]
call fcn.14000b410
mov r8, rax
lea rdx, str.ios_base::failbit_set
lea rcx, [rbp + 0xd0]
call fcn.1400067d0
lea rdx, [0x140079cb0]
lea rcx, [rbp + 0xd0]
call fcn.1400304a0
int3
lea rcx, [rbp + 0x98]
call fcn.14000b410
mov r8, rax
lea rdx, str.ios_base::eofbit_set
lea rcx, [rbp + 0xf8]
call fcn.1400067d0
lea rdx, [0x140079cb0]
lea rcx, [rbp + 0xf8]
call fcn.1400304a0
nop
lea rax, [rbp - 0x80]
mov qword [rsp + 0x68], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rsp + rcx + 0x7c], edx
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rsp + rcx + 0x6c], edx
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x78]
call fcn.1400060c0
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rdi
mov dword [rbp - 8], edi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x6c], edx
mov dword [rbp], 0xa
lea rdx, str.Current_startup_type
lea rcx, [rbp - 0x80]
call fcn.1400059b0
mov rcx, rax
mov edx, dword [r15 + 4]
call fcn.14000e7e0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x10], rax
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
mov rcx, r13
call fcn.140018070
movzx ecx, al
mov eax, dword [r15 + 4]
cmp eax, 2
jne 0x140018ca0
test cl, cl
jne 0x140018ca0
lea rax, [0x140057410]
mov qword [rsp + 0x70], rax
lea rax, [0x140057418]
mov qword [rbp - 0x80], rax
lea rax, vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + 0x10], rax
bts r14d, 9
mov dword [rsp + 0x60], r14d
xor r8d, r8d
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005f90
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x78]
call fcn.1400060c0
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rdi
mov dword [rbp - 8], edi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x6c], edx
mov dword [rbp], 0x64
lea rdx, str.ChangeServiceConfig_to_SERVICE_DEMAND_START
lea rcx, [rbp - 0x80]
call fcn.1400059b0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
lea r15, vtable.std::ios_base.0
mov qword [rbp + 0x10], r15
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, str.RPCSS
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
or r9d, 0xffffffff
mov r8d, 3
or edx, r9d
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140018e87
lea edx, [rax + 1]
lea rcx, [rsp + 0x70]
call fcn.140006500
nop
mov dword [rax + 0x90], 0xa
lea rcx, [rax + 0x10]
lea rdx, str.Changing_startup_type_to_SERVICE_DEMAND_START_Failed
call fcn.1400059b0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
mov qword [rbp + 0x10], r15
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
mov esi, 0x80004005
jmp 0x140018e87
add eax, 0xfffffffe
test eax, 0xfffffffd
je 0x140018e80
cmp cl, 1
jne 0x140018e80
lea rax, [0x140057410]
mov qword [rsp + 0x70], rax
lea rax, [0x140057418]
mov qword [rbp - 0x80], rax
lea rax, vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + 0x10], rax
bts r14d, 0xb
mov dword [rsp + 0x60], r14d
xor r8d, r8d
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005f90
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x78]
call fcn.1400060c0
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rdi
mov dword [rbp - 8], edi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x6c], edx
mov dword [rbp], 0x64
lea rdx, str.ChangeServiceConfig_to_SERVICE_AUTO_START
lea rcx, [rbp - 0x80]
call fcn.1400059b0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
lea r15, vtable.std::ios_base.0
mov qword [rbp + 0x10], r15
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, str.RPCSS
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
or r9d, 0xffffffff
mov r8d, 2
or edx, r9d
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140018e87
lea edx, [rax + 1]
lea rcx, [rsp + 0x70]
call fcn.140006500
nop
mov dword [rax + 0x90], 0xa
lea rcx, [rax + 0x10]
lea rdx, str.Changing_startup_type_to_SERVICE_AUTO_START_Failed
call fcn.1400059b0
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
mov qword [rbp + 0x10], r15
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
mov esi, 0x80004005
jmp 0x140018e87
mov esi, 0x80004005
lea r15, vtable.std::ios_base.0
lea rax, [0x140057410]
mov qword [rsp + 0x70], rax
lea rax, [0x140057418]
mov qword [rbp - 0x80], rax
lea rax, vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + 0x10], rax
bts r14d, 0xd
mov dword [rsp + 0x60], r14d
xor r8d, r8d
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x70]
call fcn.140005f90
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x78]
call fcn.1400060c0
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rdi
mov dword [rbp - 8], edi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x6c], edx
mov dword [rbp], 0x64
lea rdx, str.ReconfigureStartup___done:
lea rcx, [rbp - 0x80]
call fcn.1400059b0
mov rcx, rax
test rax, rax
je 0x140018f63
mov rax, qword [rax]
movsxd rdi, dword [rax + 4]
add rdi, rcx
and dword [rdi + 0x18], 0xfffff9ff
or dword [rdi + 0x18], 0x800
mov edx, esi
call fcn.140013770
mov rbx, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000bdd0
movzx edx, ax
mov rcx, rbx
call fcn.1400129a0
mov rcx, rbx
call fcn.14000b2a0
nop
lea rcx, [rbp + 0x10]
call fcn.14000e4e0
nop
mov qword [rbp + 0x10], r15
lea rcx, [rbp + 0x10]
call fcn.14002d15c
nop
mov rdx, qword [rbp + 0x128]
test rdx, rdx
je 0x140018fde
mov r8, qword [rbp + 0x138]
sub r8, rdx
sar r8, 2
lea rcx, [rbp + 0x128]
call fcn.14001d990
mov eax, esi
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.14002ad40
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret