Function at 0x406bb0
Capabilities:
Query service status

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
sub rsp, 0x1d0
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov rax, qword [0x004bf230]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov rdi, qword [0x004c5758]
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov r13d, 7
mov qword [rsp + 0x48], r13
xor ebx, ebx
mov qword [rsp + 0x40], rbx
mov word [rsp + 0x30], bx
lea r8d, [r13 + 0x21]
lea rdx, str.StopDarwinService:_Entering_the_function
lea rcx, [rsp + 0x28]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x28]
mov rcx, rdi
call qword [rax + 0x18]
mov esi, VarUI4FromDisp
mov r8, rsi
xor edx, edx
lea rcx, [rsp + 0xa0]
call fcn.00449860
mov dword [rsp + 0xa0], esi
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, ebx
je 0x406cb7
cmp dword [rsp + 0xb0], 2
je 0x406cb7
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], rbx
mov word [rsp + 0x30], bx
lea r8d, [r13 + 0x42]
lea rdx, str.StopDarwinService:_Win9X_platfrom._No_Darwin_service_to_stop._Return_TRUE
lea rcx, [rsp + 0x28]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x28]
mov rcx, rdi
call qword [rax + 0x18]
lea eax, [rbx + 1]
jmp 0x406f4a
mov esi, 1
mov r8d, esi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r12, rax
cmp rax, rbx
jne 0x406d18
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], rbx
mov word [rsp + 0x30], bx
lea r8d, [rsi + 0x3a]
lea rdx, str.StopDarwinService:_Cant_open_Service_Manager._Return_FALSE
lea rcx, [rsp + 0x28]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x28]
mov rcx, rdi
call qword [rax + 0x18]
xor eax, eax
jmp 0x406f4a
mov r8d, 0x24
lea rdx, str.msiserver
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
cmp rax, rbx
jne 0x406d88
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea r11, [rsp + 0x28]
mov qword [rsp + 0x20], r11
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], rbx
mov word [rsp + 0x30], bx
mov r8d, 0x3f
lea rdx, str.StopDarwinService:_Cant_open__msiserver__service._Return_FALSE
lea rcx, [rsp + 0x28]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x28]
mov rcx, rdi
call qword [rax + 0x18]
xor eax, eax
jmp 0x406f4a
lea rdx, [rsp + 0x80]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp eax, ebx
jne 0x406de4
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], rbx
mov word [rsp + 0x30], bx
mov r8d, 0x3c
lea rdx, str.StopDarwinService:_QueryServiceStatus_failed._Return_FALSE
lea rcx, [rsp + 0x28]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x28]
mov rcx, rdi
call qword [rax + 0x18]
jmp 0x406f36
cmp dword [rsp + 0x84], esi
je 0x406ef2
lea r8, [rsp + 0x28]
mov edx, esi
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_ControlService]
cmp eax, ebx
jne 0x406e4c
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x58], bx
mov r8d, 0x38
lea rdx, str.StopDarwinService:_ControlService_failed._Return_FALSE
lea rcx, [rsp + 0x50]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + 0x18]
jmp 0x406f36
mov r9d, 0x3a98
lea r8, [rsp + 0x28]
mov edx, esi
mov rcx, rbp
call fcn.00406ac0
cmp eax, ebx
jne 0x406eac
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x58], bx
mov r8d, 0x3d
lea rdx, str.StopDarwinService:_WaitForServiceState_failed._Return_FALSE
lea rcx, [rsp + 0x50]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + 0x18]
jmp 0x406f36
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x58], bx
mov r8d, 0x34
lea rdx, str.StopDarwinService:_Stopped_successfully__Return_TRUE
lea rcx, [rsp + 0x50]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + 0x18]
mov ebx, esi
jmp 0x406f36
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x58], bx
mov r8d, 0x3b
lea rdx, str.StopDarwinService:_Service_was_already_Stopped__Return_TRUE
lea rcx, [rsp + 0x50]
call fcn.00404e54
nop
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + 0x18]
mov ebx, esi
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.00443d60
lea r11, [rsp + 0x1d0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret