Function at 0x140027df0
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 [0x1401b4808]
xor rax, rsp
mov qword [rbp + 0xa8], rax
mov rdi, 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 0x140027ed7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
lea rcx, [rsp + 0x50]
call fcn.1400178a0
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.140019000
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.14001c300
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.1400180a0
nop
jmp 0x140028214
mov eax, dword [rbp + 0x84]
cmp eax, 1
jne 0x140027f2b
lea rcx, [rsp + 0x50]
call fcn.1400178a0
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.140019000
lea rcx, [rsp + 0x60]
call fcn.1400180a0
nop
lea rcx, [rsp + 0x50]
call fcn.140016dd0
xor eax, eax
jmp 0x140028220
cmp eax, 3
jne 0x140027f3d
mov rcx, rdi
call fcn.140028960
jmp 0x140028220
mov rax, qword gs:[0x58]
mov rdx, qword [rax]
mov ecx, 0x254
add rcx, rdx
mov qword [rsp + 0x40], rcx
mov eax, dword [rcx]
mov r8d, 0x250
test al, 1
jne 0x140027f73
or eax, 1
mov dword [rcx], eax
mov ecx, r8d
add rcx, rdx
call fcn.14000e570
nop
mov eax, r8d
add rax, rdx
mov qword [rsp + 0x38], rax
lea rbx, [0x1401c2020]
cmp byte [rax + 1], 0
je 0x140027fc2
lea rdx, str.Stopping_dependent_services.
mov rcx, rbx
call fcn.14000f0f0
mov rax, qword [0x1401c2020]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000edc0
movzx edx, al
mov rcx, rbx
call fcn.14000ec70
mov rcx, rbx
call fcn.14000eb70
xor esi, esi
mov qword [rsp + 0x30], rsi
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140028aa0
mov ebx, eax
test eax, eax
jne 0x1400281de
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x14002804c
mov rcx, rbx
call fcn.140027df0
mov rcx, qword [rbx]
test rcx, rcx
je 0x140028000
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x14002800f
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov edx, 0x28
mov rcx, rbx
call fcn.1400d1764
mov eax, dword [rdi + 0x24]
cmp eax, dword [rdi + 0x20]
jb 0x14002802e
mov rbx, rsi
mov qword [rsp + 0x30], rbx
jmp 0x140027fe5
lea r8, [rax + rax*2]
add r8, r8
mov rcx, qword [rdi + 0x18]
lea rdx, [rsp + 0x30]
mov rcx, qword [rcx + r8*8]
call fcn.140027b90
inc dword [rdi + 0x24]
jmp 0x140027fe0
lea r8, [rbp + 0x80]
mov edx, 1
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
test eax, eax
jne 0x140028125
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
lea rax, [rbp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rbp + 0x80]
xor edx, edx
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceStatusEx]
test eax, eax
je 0x140028125
mov ecx, dword [rbp + 0x84]
dec ecx
test ecx, 0xfffffffd
je 0x140028125
lea rcx, [rsp + 0x50]
call fcn.1400178a0
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rdx, str.ControlService_failed:_0x
lea rcx, [rsp + 0x60]
call fcn.140019000
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
and dword [rsp + rcx + 0x78], 0xfffff9ff
or dword [rsp + rcx + 0x78], 0x800
mov edx, ebx
lea rcx, [rsp + 0x60]
call fcn.14001c300
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.1400180a0
nop
jmp 0x140028214
mov rcx, rdi
call fcn.140028960
test eax, eax
je 0x140028171
lea rcx, [rsp + 0x50]
call fcn.1400178a0
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], 7
mov word [rbp + 0x48], si
lea rdx, str.Cannot_stop_service
lea rcx, [rsp + 0x60]
call fcn.140019000
lea rcx, [rsp + 0x60]
call fcn.1400180a0
nop
lea rcx, [rsp + 0x50]
call fcn.140016dd0
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx]
test al, 1
jne 0x140028191
or eax, 1
mov dword [rcx], eax
mov rdx, qword [rsp + 0x38]
mov rcx, rdx
call fcn.14000e570
nop
jmp 0x140028196
mov rdx, qword [rsp + 0x38]
cmp byte [rdx + 1], 0
je 0x1400281da
lea rdx, str.Service_stopped_successfully
lea rbx, [0x1401c2020]
mov rcx, rbx
call fcn.14000f0f0
mov rax, qword [0x1401c2020]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.14000edc0
movzx edx, al
mov rcx, rbx
call fcn.14000ec70
mov rcx, rbx
call fcn.14000eb70
xor eax, eax
jmp 0x140028220
lea rcx, [rsp + 0x50]
call fcn.1400178a0
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.140019000
lea rcx, [rsp + 0x60]
call fcn.1400180a0
nop
lea rcx, [rsp + 0x50]
call fcn.140016dd0
mov eax, ebx
mov rcx, qword [rbp + 0xa8]
xor rcx, rsp
call fcn.1400d1740
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