Function at 0x140021880
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 [0x14006d0e0]
xor rax, rsp
mov qword [rsp + 0x330], rax
mov rsi, rcx
xor r15d, r15d
mov dword [rsp + 0x60], r15d
lea rax, [0x14004a808]
mov qword [r11 - 0x2d0], rax
lea rax, [0x14004a810]
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.140002020
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.140002150
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.140001390
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140008ac0
movzx edx, ax
mov rcx, rbx
call fcn.1400084a0
mov rcx, rbx
call fcn.140007ec0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e9d0
nop
lea r12, vtable.std::ios_base.0
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.140025c9c
nop
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rsp + 0x80], rax
test rax, rax
jne 0x140021a75
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenSCManager
lea rcx, [rsp + 0x1a0]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rsp + 0x1a0]
call fcn.140029aa0
lea rdx, [rsi + 0x68]
mov r8d, 0xf003f
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
mov qword [rsp + 0x190], rax
test rax, rax
jne 0x140021ac9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenService
lea rcx, [rsp + 0x1f0]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rsp + 0x1f0]
call fcn.140029aa0
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.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140021b2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140021b2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.QueryServiceConfig_1st
lea rcx, [rsp + 0x240]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rsp + 0x240]
call fcn.140029aa0
mov edx, dword [rsp + 0x60]
lea rcx, [rsp + 0x68]
call fcn.140024700
mov r14, qword [rsp + 0x68]
lea r9, [rsp + 0x60]
mov r8d, dword [rsp + 0x60]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140021b8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.QueryServiceConfig_2nd
lea rcx, [rsp + 0x290]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rsp + 0x290]
call fcn.140029aa0
mov edx, 1
lea rcx, [rsp + 0x88]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.Current_startup_type
call fcn.140001390
mov edx, dword [r14 + 4]
mov rcx, rax
call fcn.14000ecc0
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call fcn.140008ac0
movzx edx, ax
mov rcx, rsi
call fcn.1400084a0
mov rcx, rsi
call fcn.140007ec0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e9d0
nop
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.140025c9c
nop
mov eax, dword [r14 + 4]
sub eax, 3
cmp eax, 1
jbe 0x140021d10
mov edx, 1
lea rcx, [rsp + 0x88]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0xa
lea rcx, [rax + 0x10]
lea rdx, str.Changing_startup_type_to_SERVICE_DEMAND_START
call fcn.140001390
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call fcn.140008ac0
movzx edx, ax
mov rcx, rsi
call fcn.1400084a0
mov rcx, rsi
call fcn.140007ec0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e9d0
nop
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.140025c9c
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.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140021d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.ChangeServiceConfig
lea rcx, [rsp + 0x2e0]
call fcn.140009670
lea rdx, [0x14006aee0]
lea rcx, [rsp + 0x2e0]
call fcn.140029aa0
mov edx, 1
lea rcx, [rsp + 0x88]
call fcn.140011e50
nop
mov dword [rax + 0x90], 0x64
lea rcx, [rax + 0x10]
lea rdx, str.ReconfigureStartup___done
call fcn.140001390
mov rsi, rax
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, rsi
mov dl, 0xa
call fcn.140008ac0
movzx edx, ax
mov rcx, rsi
call fcn.1400084a0
mov rcx, rsi
call fcn.140007ec0
nop
lea rcx, [rsp + 0x128]
call fcn.14000e9d0
nop
mov qword [rsp + 0x128], r12
lea rcx, [rsp + 0x128]
call fcn.140025c9c
nop
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x140021db7
mov r8, qword [rsp + 0x78]
sub r8, rdx
sar r8, 2
lea rcx, [rsp + 0x68]
call fcn.140024690
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], r15
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
xor eax, eax
jmp 0x140021dd3
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.1400271a0
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