Function at 0x140014980
Capabilities:
Query service status

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0xb8]
sub rsp, 0x1b0
mov qword [rbp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rbp + 0xa8], rax
mov rbx, rcx
mov qword [rsp + 0x40], rcx
lea rax, [rbp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rbp + 0x80]
xor edx, edx
mov rcx, qword [rcx + 8]
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140014a78
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
lea rcx, [rsp + 0x50]
call fcn.140005ff0
xor esi, esi
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rdx, str.Cannot_query_service_state_0x
lea rcx, [rsp + 0x60]
call fcn.1400104d0
mov rcx, qword [rsp + 0x60]
movsxd rax, dword [rcx + 4]
and dword [rsp + rax + 0x78], 0xfffff9ff
or dword [rsp + rax + 0x78], 0x800
mov edx, ebx
lea rcx, [rsp + 0x60]
call fcn.1400170a0
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
and dword [rsp + rcx + 0x78], 0xfffff3ff
or dword [rsp + rcx + 0x78], 0x200
lea rcx, [rsp + 0x60]
call fcn.140006820
nop
lea rcx, [rsp + 0x50]
call fcn.140004cc0
mov eax, ebx
jmp 0x140014dbd
mov eax, dword [rbp + 0x84]
cmp eax, 1
jne 0x140014acc
lea rcx, [rsp + 0x50]
call fcn.140005ff0
xor esi, esi
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rdx, str.Service_is_already_stopped
lea rcx, [rsp + 0x60]
call fcn.1400104d0
lea rcx, [rsp + 0x60]
call fcn.140006820
nop
lea rcx, [rsp + 0x50]
call fcn.140004cc0
xor eax, eax
jmp 0x140014dbd
cmp eax, 3
jne 0x140014ade
mov rcx, rbx
call fcn.1400156b0
jmp 0x140014dbd
mov rax, qword gs:[0x58]
mov rdx, qword [rax]
mov ecx, 0x10
add rcx, rdx
mov qword [rsp + 0x48], rcx
mov eax, dword [rcx]
mov r8d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
test al, 1
jne 0x140014b14
or eax, 1
mov dword [rcx], eax
mov ecx, r8d
add rcx, rdx
call fcn.140004bb0
nop
mov eax, r8d
add rax, rdx
mov qword [rsp + 0x38], rax
cmp byte [rax + 1], 0
je 0x140014b44
lea rdx, str.Stopping_dependent_services.
lea rcx, [0x1402b5400]
call fcn.14000e600
lea rcx, [0x1402b5400]
call fcn.14000e9f0
xor esi, esi
mov qword [rsp + 0x30], rsi
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140015930
mov edi, eax
test eax, eax
jne 0x140014d7b
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x140014c0a
mov rcx, rdi
call fcn.140014980
mov rcx, qword [rdi]
test rcx, rcx
je 0x140014b86
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140014b95
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov edx, 0x28
mov rcx, rdi
call fcn.1401a8b14
mov eax, dword [rbx + 0x24]
cmp eax, dword [rbx + 0x20]
jb 0x140014baf
mov rdi, rsi
jmp 0x140014b67
lea rcx, [rax + rax*2]
add rcx, rcx
mov rax, qword [rbx + 0x18]
mov rbx, qword [rax + rcx*8]
mov ecx, 0x28
call fcn.1401a8b5c
mov rdi, rax
mov qword [rsp + 0x30], rax
mov qword [rax], rsi
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400153b0
test eax, eax
je 0x140014bfd
mov rcx, rdi
call fcn.140013ef0
mov rdi, rsi
mov rbx, qword [rsp + 0x40]
inc dword [rbx + 0x24]
jmp 0x140014b67
lea r8, [rbp + 0x80]
mov edx, 1
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
test eax, eax
jne 0x140014ce9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
lea rax, [rbp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rbp + 0x80]
xor edx, edx
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceStatusEx]
test eax, eax
je 0x140014ce9
mov ecx, dword [rbp + 0x84]
dec ecx
test ecx, 0xfffffffd
je 0x140014ce9
lea rcx, [rsp + 0x50]
call fcn.140005ff0
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rcx, [rsp + 0x50]
call fcn.140016b70
lea rbx, [rax + 0x10]
test rbx, rbx
jne 0x140014c9c
mov rax, rsi
jmp 0x140014ca6
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
add rax, rbx
and dword [rax + 0x18], 0xfffff9ff
or dword [rax + 0x18], 0x800
mov edx, edi
mov rcx, rbx
call fcn.1400170a0
test rbx, rbx
je 0x140014ccd
mov rax, qword [rbx]
movsxd rsi, dword [rax + 4]
add rsi, rbx
and dword [rsi + 0x18], 0xfffff3ff
or dword [rsi + 0x18], 0x200
mov rcx, rbx
call fcn.140006820
nop
jmp 0x140014db1
mov rcx, rbx
call fcn.1400156b0
test eax, eax
je 0x140014d2d
lea rcx, [rsp + 0x50]
call fcn.140005ff0
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rcx, [rsp + 0x50]
call fcn.140016ba0
lea rcx, [rax + 0x10]
call fcn.140006820
nop
lea rcx, [rsp + 0x50]
call fcn.140004cc0
mov rcx, qword [rsp + 0x48]
mov eax, dword [rcx]
test al, 1
jne 0x140014d4d
or eax, 1
mov dword [rcx], eax
mov rdx, qword [rsp + 0x38]
mov rcx, rdx
call fcn.140004bb0
nop
jmp 0x140014d52
mov rdx, qword [rsp + 0x38]
cmp byte [rdx + 1], 0
je 0x140014d77
lea rdx, str.Service_stopped_successfully
lea rcx, [0x1402b5400]
call fcn.14000e600
lea rcx, [0x1402b5400]
call fcn.14000e9f0
xor eax, eax
jmp 0x140014dbd
lea rcx, [rsp + 0x50]
call fcn.140005ff0
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rdx, str.Cannot_stop_all_dependent_services
lea rcx, [rsp + 0x60]
call fcn.1400104d0
lea rcx, [rsp + 0x60]
call fcn.140006820
nop
lea rcx, [rsp + 0x50]
call fcn.140004cc0
mov eax, edi
mov rcx, qword [rbp + 0xa8]
xor rcx, rsp
call fcn.1401a8cb0
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret