Function at 0x140037140
Capabilities:
Query service status
Stop service

Disassembly:
push rbp
push r12
push r14
push r15
sub rsp, 0x68
or r15d, 0xffffffff
mov r14d, 0x1d4c0
test edx, edx
mov rbp, rcx
cmovne r14d, edx
cmp qword [0x14026c550], 0
je 0x14003745a
lea rcx, [rsp + 0x88]
mov rdx, rbp
sub rcx, 8
call fcn.140025830
mov rcx, qword [0x14026c550]
lea r8d, [r15 + 0x2d]
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140170a90
mov r12, rax
test rax, rax
je 0x14003745a
lea rax, [rsp + 0x98]
xor edx, edx
lea r9d, [r15 + 0x25]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x30]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x1400371f3
mov r8, rbp
lea rdx, str.failed_query_service_status__s:__m
mov ecx, 0x670003
call fcn.140028e10
test eax, eax
jne 0x14003740b
mov eax, dword [rsp + 0x34]
cmp eax, 1
jne 0x140037218
mov r8, rbp
lea rdx, str.service__s_already_stopped
mov ecx, 0x670005
call fcn.140028e10
xor r15d, r15d
jmp 0x14003740b
mov qword [rsp + 0x90], rbx
xor ebx, ebx
mov qword [rsp + 0xa0], rsi
mov esi, dword [rsp + 0x44]
mov qword [rsp + 0x60], rdi
xor edi, edi
cmp eax, 3
jne 0x1400372cf
nop
cmp edi, 0xea60
jge 0x1400372cf
cmp ebx, r14d
jge 0x1400372cf
lea rax, [rsp + 0x98]
mov r9d, 0x24
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x14003729d
mov r8, rbp
lea rdx, str.failed_query_service_status__s:__m
mov ecx, 0x670003
call fcn.140028e10
test eax, eax
jne 0x1400373f6
cmp dword [rsp + 0x34], 1
je 0x14003732c
mov eax, dword [rsp + 0x44]
cmp eax, esi
jbe 0x1400372b4
xor edi, edi
mov esi, eax
mov ecx, 0x64
call fcn.14002a920
add edi, 0x64
add ebx, 0x64
cmp dword [rsp + 0x34], 3
je 0x140037240
lea r8, [rsp + 0x30]
mov edx, 1
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ControlService]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x140037352
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x14003730e
call fcn.140174cc4
cmp dword [rax], 0x6d
je 0x140037352
mov r8, rbp
lea rdx, str.ControlService_failed_for__s:__m
mov ecx, 0x670003
call fcn.140028e10
jmp 0x1400373f6
cmp dword [0x14027149c], 6
jl 0x1400373f3
mov r8, rbp
lea rdx, str.service__s__stopped_successfully
mov ecx, 0x670006
call fcn.140028e10
jmp 0x1400373f3
mov eax, dword [rsp + 0x34]
xor edi, edi
cmp eax, 1
je 0x1400373e2
cmp edi, 0xea60
jge 0x1400373dd
cmp ebx, r14d
jge 0x1400373dd
lea rax, [rsp + 0x98]
mov r9d, 0x24
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x1400373b6
mov r8, rbp
lea rdx, str.failed_query_service_status__s:__m
mov ecx, 0x670003
call fcn.140028e10
test eax, eax
jne 0x1400373f6
mov eax, dword [rsp + 0x44]
cmp eax, esi
jbe 0x1400373c2
xor edi, edi
mov esi, eax
mov ecx, 0x64
add edi, 0x64
add ebx, 0x64
call fcn.14002a920
mov eax, dword [rsp + 0x34]
cmp eax, 1
jne 0x140037361
jmp 0x1400373e2
cmp eax, 1
jne 0x1400373f6
lea rdx, str.service_stopped_successfully
mov ecx, 0x670005
call fcn.140028e10
xor r15d, r15d
mov rsi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x90]
mov rdi, qword [rsp + 0x60]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x140037432
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028e10
test r15d, r15d
je 0x14003744b
mov r8, rbp
lea rdx, str.error_stopping_service__s
mov ecx, 0x670003
call fcn.140028e10
mov eax, r15d
add rsp, 0x68
pop r15
pop r14
pop r12
pop rbp
ret
xor eax, eax
add rsp, 0x68
pop r15
pop r14
pop r12
pop rbp
ret