Function at 0x416080
Capabilities:
Enumerate services
Query service status
Stop service

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x78
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov rbp, rdx
xor ebx, ebx
mov dword [rax + 0x20], ebx
mov dword [rax + 0x18], ebx
lea r8d, [rbx + 0x2c]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.0040d000
nop
lea rcx, [rsp + 0x30]
call fcn.0040d010
test al, al
je 0x41610b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x4160e2
movzx ebx, ax
or ebx, 0x80070000
mov r9d, ebx
mov r8, rbp
lea rdx, str.Failed_in_calling_OpenServiceW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, ebx
jmp 0x4164c9
lea rcx, [rsp + 0x30]
call fcn.0040cfb0
mov rcx, rax
lea rdx, [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x416165
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x41613c
movzx ebx, ax
or ebx, 0x80070000
mov r9d, ebx
mov r8, rbp
lea rdx, str.Failed_in_calling_QueryServiceStatus_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, ebx
jmp 0x4164c9
cmp dword [rsp + 0x54], 1
jne 0x41617d
lea rcx, [rsp + 0x30]
call fcn.0040d020
xor eax, eax
jmp 0x4164c9
lea rcx, [rsp + 0x30]
call fcn.0040cfb0
mov rcx, rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x4161fd
cmp dword [rsp + 0xb8], 0
jbe 0x4161f1
mov r9d, 0x8007000d
mov r8, rbp
lea rdx, str.Failed_in_calling_EnumDependentServicesW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, 0x8007000d
jmp 0x4164c9
mov dword [rsp + 0xb0], ebx
jmp 0x416386
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test eax, eax
jle 0x416212
movzx edi, ax
or edi, 0x80070000
cmp edi, 0x800700ea
je 0x416243
mov r9d, edi
mov r8, rbp
lea rdx, str.Failed_in_calling_EnumDependentServicesW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, edi
jmp 0x4164c9
mov edi, dword [rsp + 0xb0]
test edi, edi
je 0x416386
mov dword [rsp + 0xb0], ebx
lea rcx, [rsp + 0x40]
call fcn.0040eb00
nop
mov edx, edi
lea rcx, [rsp + 0x40]
call fcn.0040eb40
mov esi, eax
test eax, eax
jns 0x416292
lea rcx, [rsp + 0x40]
call fcn.0040eb10
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, esi
jmp 0x4164c9
lea rcx, [rsp + 0x40]
call fcn.0040cfb0
mov rsi, rax
lea rcx, [rsp + 0x30]
call fcn.0040cfb0
mov rcx, rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
mov r9d, edi
mov r8, rsi
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
jne 0x416324
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x4162f0
movzx ebx, ax
or ebx, 0x80070000
mov r9d, ebx
mov r8, rbp
lea rdx, str.Failed_in_calling_EnumDependentServicesW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0x40]
call fcn.0040eb10
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, ebx
jmp 0x4164c9
mov edi, ebx
cmp dword [rsp + 0xb8], ebx
jbe 0x41637c
nop
mov rdx, qword [rsi]
mov rcx, qword [rsp + 0xa0]
call fcn.00416080
mov ebp, eax
test eax, eax
js 0x416360
add edi, 1
add rsi, 0x30
cmp edi, dword [rsp + 0xb8]
jb 0x416330
mov rbp, qword [rsp + 0xa8]
jmp 0x41637c
lea rcx, [rsp + 0x40]
call fcn.0040eb10
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, ebp
jmp 0x4164c9
lea rcx, [rsp + 0x40]
call fcn.0040eb10
mov r8, rbp
lea rdx, str.Stopping_named_service__s_r_n
xor ecx, ecx
call fcn.00415890
lea rcx, [rsp + 0x30]
call fcn.0040cfb0
mov rcx, rax
lea r8, [rsp + 0x50]
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4163f9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4163ca
movzx eax, ax
or eax, 0x80070000
cmp eax, 0x80070426
jne 0x4163e2
lea rcx, [rsp + 0x30]
call fcn.0040d020
xor eax, eax
jmp 0x4164c9
mov r9d, eax
mov r8, rbp
lea rdx, str.Failed_in_calling_ControlService_for_service__s._Error_code:_0x_x_r_n
mov ecx, 1
call fcn.00415890
lea rcx, [rsp + 0x30]
call fcn.0040cfb0
mov rsi, rax
mov edi, ebx
nop
nop
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41644d
mov r9d, dword [rsp + 0x54]
cmp r9d, 3
jne 0x41648d
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
add edi, 0x3e8
cmp edi, 0x1d4c0
jb 0x416410
mov ebx, 0x8007041d
jmp 0x41647a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x416462
movzx ebx, ax
or ebx, 0x80070000
mov r8d, ebx
lea rdx, str.Failed_in_calling_QueryServiceStatus._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
test ebx, ebx
jns 0x416488
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, ebx
jmp 0x4164c9
mov r9d, dword [rsp + 0x54]
cmp r9d, 1
jne 0x4164a1
lea rcx, [rsp + 0x30]
call fcn.0040d020
xor eax, eax
jmp 0x4164c9
mov dword [rsp + 0x20], ebx
mov r8, rbp
lea rdx, str.Service__s_could_not_be_stopped._The_current_status_of_the_service_is__d._Last_error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0x30]
call fcn.0040d020
mov eax, 0x80070425
add rsp, 0x78
pop rdi
pop rsi
pop rbp
pop rbx
ret