Function at 0x140050784
Capabilities:
Query service status

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov rax, qword [0x14011d6b0]
xor rax, rsp
mov qword [rbp + 0x3f], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0x20000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
xor ebx, ebx
test rax, rax
jne 0x1400507d6
xor al, al
jmp 0x140050a1e
mov r8d, SafeArrayUnaccessData
lea rdx, str.Winmgmt
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x1400507ff
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400507cf
xor edx, edx
lea r8d, [rdx + 0x1c]
lea rcx, [rbp + 0x1f]
call fcn.1400abab0
lea rdx, [rbp + 0x1f]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14005082a
cmp dword [rbp + 0x23], 4
jne 0x140050843
mov ebx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
jmp 0x140050a1e
call fcn.140071a10
mov rcx, rax
test rax, rax
je 0x140050a77
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rbp - 0x19], rax
mov r8d, dword [rbp + 0x23]
lea rdx, str.sStatus.dwCurrentState:_08X
lea rcx, [rbp - 0x19]
call fcn.1400042cc
mov r12, qword [rbp - 0x19]
lea rcx, [r12 - 0x18]
call fcn.140002848
add rax, 0x18
mov qword [rbp - 0x11], rax
lea rcx, [rbp - 0x11]
call fcn.14004a974
lea rdx, str.StartService___1
lea rcx, [rbp - 9]
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
lea rdx, str.QueryServiceStatus___1
lea rcx, [rbp - 1]
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
lea rdx, [rbp + 0x1f]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov r14d, 1
test eax, eax
je 0x140050932
mov r15d, ebx
cmp r15d, 0x190
jge 0x140050932
cmp dword [rbp + 0x23], 4
je 0x140050970
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400fe9b8]
lea rcx, [rbp + 7]
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
add r15d, 0x64
lea rdx, [rbp + 0x1f]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x1400508ed
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
lea r9, str.config_Winmgmt_start_auto
lea r8, [0x1400fea00]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov r15d, ebx
lea rdx, str.QueryServiceStatus___2
lea rcx, [rbp - 0x21]
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
jmp 0x1400509d5
lea rcx, [rbp - 0x21]
jmp 0x140050a4f
lea rdx, str.StartService___2
lea rcx, [rbp + 0xf]
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
cmp r15d, 0xa
jge 0x1400509e6
cmp dword [rbp + 0x23], 4
je 0x140050a4b
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400fe9b8]
lea rcx, [rbp + 0x17]
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
add r15d, r14d
lea rdx, [rbp + 0x1f]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140050979
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r14b, bl
or ecx, 0xffffffff
lock xadd dword [r12 - 8], ecx
sub ecx, 1
jg 0x140050a1b
mov rcx, qword [r12 - 0x18]
mov r8, qword [rcx]
lea rdx, [r12 - 0x18]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov al, r14b
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.1400a9d90
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
lea rcx, [rbp - 0x29]
lea rdx, str.StartService_Completed_:_SERVICE_RUNNING
call fcn.140002ce0
mov rcx, rax
call fcn.14004a974
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400509fb
mov ecx, 0x80004005
call fcn.140002f7c
int3