Function at 0x140021f60
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov rax, qword [0x1400a7038]
xor rax, rsp
mov qword [rbp + 0xb0], rax
lea r13, vtable.LogItem.0
mov qword [rbp], r13
call fcn.1400201b0
mov rdx, rax
lea rcx, [rbp + 8]
call fcn.1400264e0
nop
lea rdx, [rbp + 8]
lea rcx, [rbp + 0x90]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x28]
call fcn.14001ff90
nop
lea rdx, [rbp + 8]
lea rcx, [rsp + 0x68]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14001ff90
mov dword [rbp + 0x68], 1
mov dword [rbp + 0x6c], 1
lea rdx, str.Applying_service_DACL_workaround
lea rcx, [rbp]
call fcn.140020c20
nop
lea rcx, [rbp]
call fcn.140020720
xor r12d, r12d
mov qword [rbp + 0x90], r12
mov qword [rbp + 0xa0], r12
mov ebx, reloc.WS2_32.dll_ntohs
mov qword [rbp + 0xa8], rbx
mov byte [rbp + 0x90], r12b
lea rcx, [rbp - 0x78]
call fcn.1400489e0
nop
mov qword [rbp + 0x70], r12
mov qword [rbp + 0x80], r12
mov qword [rbp + 0x88], rbx
mov byte [rbp + 0x70], r12b
lea rdx, [0x1400ab970]
lea rcx, [rsp + 0x68]
call fcn.1400264e0
lea r8, [rbp + 0x70]
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.140038070
mov r15, qword [rbp + 0x88]
mov rdi, qword [rbp + 0x70]
test eax, eax
je 0x1400220ff
mov qword [rbp], r13
call fcn.1400201b0
mov rdx, rax
lea rcx, [rbp + 8]
call fcn.1400264e0
nop
lea rdx, [rbp + 8]
lea rcx, [rsp + 0x68]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x28]
call fcn.14001ff90
nop
lea rdx, [rbp + 8]
lea rcx, [rbp - 0x68]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14001ff90
mov dword [rbp + 0x68], 1
mov dword [rbp + 0x6c], 3
lea rdx, str.Failed_to_read_service_name_from_registry
lea rcx, [rbp]
call fcn.140020c20
nop
lea rcx, [rbp]
call fcn.140020720
jmp 0x1400223e9
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
lea rsi, [rbp + 0x70]
cmp r15, 0x10
cmovae rsi, rdi
mov r14, qword [rbp + 0x80]
cmp r14, 0x10
jae 0x140022130
movups xmm0, xmmword [rsi]
movups xmmword [rsp + 0x68], xmm0
jmp 0x1400221aa
mov rbx, r14
or rbx, 0xf
movabs rax, 0x7fffffffffffffff
cmp rbx, rax
cmova rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x140022187
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14002247b
mov rcx, rax
call fcn.140055f48
mov rcx, rax
test rax, rax
je 0x140022180
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140022196
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x140022193
call fcn.140055f48
jmp 0x140022196
mov rax, r12
mov qword [rsp + 0x68], rax
lea r8, [r14 + 1]
mov rdx, rsi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov qword [rsp + 0x78], r14
mov qword [rbp - 0x80], rbx
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x68]
call fcn.14001ff90
mov rcx, rax
call fcn.140021910
mov rbx, rax
test rax, rax
jne 0x140022248
mov qword [rbp], r13
call fcn.1400201b0
mov rdx, rax
lea rcx, [rbp + 8]
call fcn.1400264e0
nop
lea rdx, [rbp + 8]
lea rcx, [rbp - 0x68]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x28]
call fcn.14001ff90
nop
lea rdx, [rbp + 8]
lea rcx, [rsp + 0x68]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14001ff90
mov dword [rbp + 0x68], 1
mov dword [rbp + 0x6c], 3
lea rdx, str.Couldnt_obtain_service_handle
lea rcx, [rbp]
call fcn.140020c20
nop
lea rcx, [rbp]
call fcn.140020720
jmp 0x1400223e9
lea rdx, [rsp + 0x60]
mov rcx, rbx
call fcn.140021b10
test al, al
jne 0x14002227f
lea rcx, [rbp]
call fcn.1400204e0
nop
mov dword [rax + 0x6c], 3
lea rdx, str.Couldnt_obtain_service_start_type
mov rcx, rax
call fcn.140020c20
nop
jmp 0x1400223d7
cmp dword [rsp + 0x60], 3
je 0x1400223b6
mov rcx, rbx
call fcn.140021d20
test al, al
jne 0x1400222bc
lea rcx, [rbp]
call fcn.1400204e0
nop
mov dword [rax + 0x6c], 3
lea rdx, str.Couldnt_set_service_ACL
mov rcx, rax
call fcn.140020c20
nop
jmp 0x1400223d7
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov edx, 0xffffffff
mov r9d, edx
mov r8d, 3
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x1400223a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x60], eax
mov qword [rbp], r13
call fcn.1400201b0
mov rdx, rax
lea rcx, [rbp + 8]
call fcn.1400264e0
nop
lea rdx, [rbp + 8]
lea rcx, [rbp - 0x48]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x28]
call fcn.14001ff90
nop
lea rdx, [rbp + 8]
lea rcx, [rbp - 0x28]
call fcn.1400264e0
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14001ff90
mov dword [rbp + 0x68], 1
mov dword [rbp + 0x6c], 3
lea rdx, str.ChangeServiceConfig_failed:_error
lea rcx, [rbp]
call fcn.140020c20
mov rcx, rax
lea rdx, [rsp + 0x60]
call fcn.140020a20
nop
lea rcx, [rbp]
call fcn.140020720
lea rcx, [rbp]
call fcn.1400204e0
nop
mov dword [rax + 0x6c], 3
lea rdx, str.Couldnt_set_service_start_type_to_manual
mov rcx, rax
call fcn.140020c20
nop
jmp 0x1400223d7
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov bl, 1
jmp 0x1400223eb
lea rcx, [rbp]
call fcn.1400204e0
nop
mov dword [rax + 0x6c], 1
lea rdx, str.Start_type_is_manual___no_need_to_apply_workaround
mov rcx, rax
call fcn.140020c20
nop
lea rcx, [rbp]
call fcn.140020720
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor bl, bl
cmp r15, 0x10
jb 0x140022426
lea rdx, [r15 + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x14002241d
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14002241d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.140055f30
nop
mov edx, 0x80000000
mov rcx, qword [rbp - 0x78]
add rdx, rcx
cmp rdx, 3
jbe 0x140022448
cmp rcx, 0xffffffff80000005
je 0x140022448
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
movzx eax, bl
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.140055f10
lea r11, [rsp + 0x1c0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.14001f720
nop
int3