Function at 0x140022450
Capabilities:
Modify service

Disassembly:
mov r11, rsp
push r12
push r14
push r15
sub rsp, 0x340
mov qword [r11 - 0x1d0], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov rax, qword [0x14006f0d0]
xor rax, rsp
mov qword [rsp + 0x330], rax
mov rsi, rcx
xor r15d, r15d
mov dword [rsp + 0x60], r15d
lea rax, [0x14004b878]
mov qword [r11 - 0x2d0], rax
lea rax, [0x14004b880]
mov qword [r11 - 0x2c0], rax
lea rax, vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [r11 - 0x230], rax
mov dword [rsp + 0x60], 1
xor r8d, r8d
lea rdx, [r11 - 0x2b8]
lea rcx, [r11 - 0x2d0]
call fcn.140001fe0
nop
mov rax, qword [rsp + 0x88]
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 + 0x88], rax
mov rax, qword [rsp + 0x88]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x84], edx
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0xa0]
call fcn.140002110
nop
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0x108], r15
mov dword [rsp + 0x110], r15d
mov rax, qword [rsp + 0x88]
movsxd rcx, dword [rax + 4]
lea rax, vtable.Logger.0
mov qword [rsp + rcx + 0x88], rax
mov rax, qword [rsp + 0x88]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa0]
mov dword [rsp + rcx + 0x84], edx
mov dword [rsp + 0x118], 0x64
lea rdx, str.ReconfigureService__
lea rcx, [rsp + 0x98]
call fcn.140001350
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140008970
movzx edx, ax
mov rcx, rbx
call fcn.1400083b0
mov rcx, rbx
call fcn.140007dd0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e980
nop
lea r12, vtable.std::ios_base.0
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.14002695c
nop
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rsp + 0x80], rax
test rax, rax
jne 0x140022645
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenSCManager
lea rcx, [rsp + 0x1a0]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rsp + 0x1a0]
call fcn.14002a780
lea rdx, [rsi + 0x68]
mov r8d, 0xf003f
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov rbx, rax
mov qword [rsp + 0x190], rax
test rax, rax
jne 0x140022699
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenService
lea rcx, [rsp + 0x1f0]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rsp + 0x1f0]
call fcn.14002a780
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], r15
mov dword [rsp + 0x60], r15d
lea r9, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceConfigW]
test eax, eax
jne 0x1400226ff
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x7a
je 0x1400226ff
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.QueryServiceConfig_1st
lea rcx, [rsp + 0x240]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rsp + 0x240]
call fcn.14002a780
mov edx, dword [rsp + 0x60]
lea rcx, [rsp + 0x68]
call fcn.1400253a0
mov r14, qword [rsp + 0x68]
lea r9, [rsp + 0x60]
mov r8d, dword [rsp + 0x60]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceConfigW]
test eax, eax
jne 0x14002275d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.QueryServiceConfig_2nd
lea rcx, [rsp + 0x290]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rsp + 0x290]
call fcn.14002a780
mov edx, 1
lea rcx, [rsp + 0x88]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.Current_startup_type
call fcn.140001350
mov edx, dword [r14 + 4]
mov rcx, rax
call fcn.14000ec70
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call fcn.140008970
movzx edx, ax
mov rcx, rsi
call fcn.1400083b0
mov rcx, rsi
call fcn.140007dd0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e980
nop
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.14002695c
nop
mov eax, dword [r14 + 4]
sub eax, 3
cmp eax, 1
jbe 0x1400228e0
mov edx, 1
lea rcx, [rsp + 0x88]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0xa
lea rcx, [rax + 0x10]
lea rdx, str.Changing_startup_type_to_SERVICE_DEMAND_START
call fcn.140001350
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call fcn.140008970
movzx edx, ax
mov rcx, rsi
call fcn.1400083b0
mov rcx, rsi
call fcn.140007dd0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e980
nop
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.14002695c
nop
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
lea rax, str.RPCSS
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
or r9d, 0xffffffff
mov r8d, 3
or edx, r9d
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfigW]
test eax, eax
jne 0x1400228e0
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r8d, eax
lea rdx, str.ChangeServiceConfig
lea rcx, [rsp + 0x2e0]
call fcn.140009520
lea rdx, [0x14006c740]
lea rcx, [rsp + 0x2e0]
call fcn.14002a780
mov edx, 1
lea rcx, [rsp + 0x88]
call fcn.140011e00
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.ReconfigureStartup___done
call fcn.140001350
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call fcn.140008970
movzx edx, ax
mov rcx, rsi
call fcn.1400083b0
mov rcx, rsi
call fcn.140007dd0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e980
nop
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.14002695c
nop
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x140022987
mov r8, qword [rsp + 0x78]
sub r8, rdx
sar r8, 2
lea rcx, [rsp + 0x68]
call fcn.140025330
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], r15
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop
xor eax, eax
jmp 0x1400229a3
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.140027e60
lea r11, [rsp + 0x340]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret