Function at 0x140010c50
Capabilities:
Query service status
Stop service

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x570
mov rax, qword [0x14008b5a0]
xor rax, rsp
mov qword [rsp + 0x560], rax
movzx eax, dl
mov rsi, rcx
mov qword [rsp + 0x58], rcx
mov rdx, rcx
lea rcx, str.StopService__S__disable_u__n
xor dil, dil
mov r8d, eax
mov qword [rsp + 0x5a0], rbx
mov byte [rsp + 0x31], al
mov byte [rsp + 0x30], dil
call fcn.1400154e0
xor ecx, ecx
call fcn.14003c8b0
mov rcx, rsi
mov dword [rsp + 0x48], eax
call fcn.14003b770
xor edx, edx
mov rcx, rsi
movzx ebp, al
mov byte [rsp + 0x32], al
call fcn.140024b70
xor edx, edx
xor ecx, ecx
mov r8d, 0xa0000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rcx, rax
mov qword [rsp + 0x50], rax
jne 0x140010d08
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.StopService:_Unable_to_open_SCM._GetLastError_u__n
mov edx, eax
mov ebx, eax
call fcn.1400154e0
lea rcx, str.StopService:_Unable_to_open_SCM._GetLastError_u_n
mov edx, ebx
call fcn.14004d888
jmp 0x1400111c6
mov ebp, 0xa
xor ebx, ebx
nop
mov r8d, 0x24
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov qword [rsp + 0x38], rax
jne 0x140010d4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
mov ebx, eax
je 0x140010d99
lea rcx, str.StopService:_Unable_to_open_service__S_via_SCM._GetLastError_u_n
mov r8d, eax
mov rdx, rsi
call fcn.1400154e0
mov rax, qword [rsp + 0x38]
cmp ebx, 5
jne 0x140010d6f
test rax, rax
jne 0x140010d6f
test ebp, ebp
je 0x140010d6f
lea rcx, str.StopService:_Waiting_for__S_service_to_unlock.__d_retries_left_n
mov r8d, ebp
mov rdx, rsi
call fcn.1400154e0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 5
jne 0x140010da3
mov rax, qword [rsp + 0x38]
test rax, rax
jne 0x140010dc1
add ebp, 0xffffffff
mov rcx, qword [rsp + 0x50]
jne 0x140010d10
jmp 0x140010da8
mov dil, 1
mov byte [rsp + 0x30], dil
jmp 0x140010d6f
mov rax, qword [rsp + 0x38]
test rax, rax
jne 0x140010dc1
lea rcx, str.StopService:_Failed_to_open__S_service_n
mov rdx, rsi
call fcn.1400154e0
jmp 0x1400111a3
mov rcx, rsi
xor ebx, ebx
call fcn.14003b6e0
test rax, rax
mov rbp, rax
je 0x140010eac
lea rax, [rsp + 0xa0]
lea r8, [rsp + 0x300]
mov r9d, 0x12c
xor edx, edx
mov rcx, rbp
mov qword [rsp + 0x28], 0x12c
mov qword [rsp + 0x20], rax
call fcn.140039a20
test al, al
je 0x140010ea4
nop
lea rdx, str.ServicePreStopCommand.
lea rcx, [rsp + 0x300]
add ebx, 1
call fcn.1400384b0
test eax, eax
jne 0x140010e69
lea rdx, [rsp + 0xa0]
lea rcx, str.StopService:_Running_pre_stop_command__S_n
call fcn.1400154e0
lea rcx, [rsp + 0xa0]
mov dl, 1
call fcn.1400083e0
test al, al
movzx edi, al
jne 0x140010e69
lea rdx, [rsp + 0xa0]
lea rcx, str.StopService:_ERROR__StartProcess_failed_for_pre_stop_command__S_n
call fcn.1400154e0
lea rax, [rsp + 0xa0]
lea r8, [rsp + 0x300]
mov r9d, 0x12c
mov edx, ebx
mov rcx, rbp
mov qword [rsp + 0x28], 0x12c
mov qword [rsp + 0x20], rax
call fcn.140039a20
test al, al
jne 0x140010e10
mov byte [rsp + 0x30], dil
mov rcx, rbp
call fcn.140039380
mov ecx, 0x200
mov dword [rsp + 0x34], 0
call fcn.14004c8b0
test rax, rax
mov qword [rsp + 0x40], rax
je 0x140010f68
lea r9, [rsp + 0x34]
lea rdx, [rsp + 0x40]
mov r8d, 0x200
mov rcx, rsi
call fcn.14000f540
test al, al
je 0x140010f9b
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x40]
test eax, eax
je 0x140010f63
movzx edi, byte [rsp + 0x31]
mov rbx, rcx
mov rbp, rax
xor esi, esi
nop
nop
nop
lea rcx, str.StopService:_Calling_StopService_on_dependent_service__S_n
mov rdx, rbx
call fcn.1400154e0
movzx edx, dil
mov rcx, rbx
call fcn.140010c50
test al, al
jne 0x140010f3e
lea rcx, str.StopService:_StopService_for_dependent_service__S_failed.__n
mov rdx, rbx
call fcn.1400154e0
mov rcx, rbx
call fcn.140036f80
add rsi, 1
cmp rsi, rbp
lea rbx, [rbx + rax*2 + 2]
jb 0x140010f10
mov dil, byte [rsp + 0x30]
mov rsi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
call fcn.14004ca6c
lea rcx, str.StopService:_SERVICE_CONTROL_STOP_issued_to__S_service._n
mov rdx, rsi
call fcn.1400154e0
mov rbx, qword [rsp + 0x38]
lea r8, [rsp + 0x80]
mov rcx, rbx
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140010fb9
mov dil, 1
jmp 0x140011013
lea rcx, str.StopService:_Error_enumerating_dependent_services_n
call fcn.1400154e0
mov rcx, qword [rsp + 0x40]
xor dil, dil
call fcn.14004ca6c
jmp 0x1400111a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
sub ecx, 0x41b
je 0x140011001
sub ecx, 0xb
je 0x140010fd3
cmp ecx, 0x35
jne 0x140010fd6
mov dil, 1
cmp eax, 0x426
jne 0x140010fee
lea rcx, str.StopService:_ERROR_SERVICE_NOT_ACTIVE_returned_when_stopping__S_service._n
mov rdx, rsi
call fcn.1400154e0
jmp 0x140011013
lea rcx, str.StopService:_GetLastError__u_returned_when_stopping__S_service_n
mov r8, rsi
mov edx, eax
call fcn.1400154e0
jmp 0x140011013
lea rcx, str.StopService:_ERROR_DEPENDENT_SERVICES_RUNNING_returned_when_stopping__S_service_n
mov rdx, rsi
call fcn.1400154e0
xor dil, dil
lea rcx, str.Querying_status_of_service__S..._n
mov rdx, rsi
call fcn.1400154e0
test dil, dil
je 0x1400111a3
nop
nop
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
setne dil
test dil, dil
je 0x1400110bb
mov r8d, dword [rsp + 0x64]
mov eax, r8d
sub eax, 1
je 0x1400110aa
sub eax, 3
je 0x140011093
cmp eax, 3
je 0x14001107c
lea rcx, str.waiting_on__S_service_to_report_RUNNING_or_STOPPED__current_state__x__n
mov rdx, rsi
call fcn.1400154e0
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140011030
lea rcx, str._S_service_reports_PAUSED_n
mov rdx, rsi
call fcn.1400154e0
xor dil, dil
jmp 0x1400111a3
lea rcx, str._S_service_reports_RUNNING_n
mov rdx, rsi
call fcn.1400154e0
xor dil, dil
jmp 0x1400111a3
lea rcx, str._S_service_reports_STOPPED_n
mov rdx, rsi
call fcn.1400154e0
jmp 0x1400110d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.StopService:_QueryServiceStatus_of__S_service_FAILED__GetLastError_u_n
mov rdx, rsi
mov r8d, eax
call fcn.1400154e0
test dil, dil
je 0x1400111a3
cmp byte [rsp + 0x31], 0
je 0x1400111a3
mov rcx, rsi
call fcn.14003b6e0
test rax, rax
mov rbx, rax
je 0x1400111a3
mov dword [rsp + 0x34], 4
call fcn.140006600
mov rcx, rax
mov rbp, rax
call fcn.140006680
lea rdx, str.upgradetmp.Start
mov rcx, rbx
call fcn.14003b570
test al, al
jne 0x14001117b
lea r8, [rsp + 0x34]
lea rdx, str.Start
mov rcx, rbx
call fcn.14003b440
test al, al
je 0x14001116d
mov r8d, dword [rsp + 0x34]
lea rdx, str.upgradetmp.Start
mov rcx, rbx
call fcn.14003b350
test al, al
je 0x140011187
lea rdx, str.Start
mov r8d, 4
mov rcx, rbx
call fcn.14003b350
jmp 0x140011187
lea rcx, str.Start_doesnt_exist._upgradetmp.Start__not_set_n
call fcn.1400154e0
jmp 0x140011187
lea rcx, str.upgradetmp.Start_found._Do_not_update._n
call fcn.1400154e0
test rbp, rbp
je 0x14001119b
cmp rbp, 0xffffffffffffffff
je 0x14001119b
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call fcn.140039380
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x1400111b6
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov bpl, byte [rsp + 0x32]
mov ecx, dword [rsp + 0x48]
call fcn.14003c8b0
test bpl, bpl
mov rbx, qword [rsp + 0x5a0]
je 0x1400111f4
lea rcx, str.StopService:_Lock_the_service_back_down_n
call fcn.1400154e0
movzx edx, bpl
mov rcx, rsi
call fcn.140024b70
lea rcx, str.StopService:___S__exit_d_n
movzx r8d, dil
mov rdx, rsi
call fcn.1400154e0
mov al, dil
mov rcx, qword [rsp + 0x560]
xor rcx, rsp
call fcn.14004c890
add rsp, 0x570
pop rdi
pop rsi
pop rbp
ret