Function at 0x14005dc50
Capabilities:
Create process on windows
Query service status
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rax, qword [0x14012bd38]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov rdi, rdx
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 0x14005dca0
xor al, al
jmp 0x14005dee4
mov r8d, SafeArrayGetElement
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x14005dcc5
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14005dc99
xor edx, edx
lea r8d, [rdx + 0x1c]
lea rcx, [rbp + 0xf]
call fcn.1400b15e0
lea rdx, [rbp + 0xf]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14005dcf0
cmp dword [rbp + 0x13], 4
jne 0x14005dd09
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 0x14005dee4
call fcn.140077d4c
mov rcx, rax
test rax, rax
je 0x14005df38
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rbp - 0x29], rax
mov r8d, dword [rbp + 0x13]
lea rdx, str.sStatus.dwCurrentState:_08X
lea rcx, [rbp - 0x29]
call fcn.140002f84
mov r12, qword [rbp - 0x29]
lea rcx, [r12 - 0x18]
call fcn.140001888
add rax, 0x18
mov qword [rbp - 0x21], rax
lea rcx, [rbp - 0x21]
call fcn.14004b81c
lea rdx, str.StartService___1
lea rcx, [rbp - 0x19]
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
lea rdx, str.QueryServiceStatus___1
lea rcx, [rbp - 0x11]
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
lea rdx, [rbp + 0xf]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov r14d, 1
test eax, eax
je 0x14005ddf8
mov r15d, ebx
cmp r15d, 0x190
jge 0x14005ddf8
cmp dword [rbp + 0x13], 4
je 0x14005de36
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400f8798]
lea rcx, [rbp - 9]
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
add r15d, 0x64
lea rdx, [rbp + 0xf]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14005ddb3
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
lea r9, str.config_Winmgmt_start_auto
lea r8, [0x1400e048c]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov r15d, ebx
lea rdx, str.QueryServiceStatus___2
lea rcx, [rbp - 0x31]
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
jmp 0x14005de9b
lea rcx, [rbp - 0x31]
jmp 0x14005df10
lea rdx, str.StartService___2
lea rcx, [rbp - 1]
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
cmp r15d, 0xa
jge 0x14005deac
cmp dword [rbp + 0x13], 4
je 0x14005df0c
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400f8798]
lea rcx, [rbp + 7]
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
add r15d, r14d
lea rdx, [rbp + 0xf]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14005de3f
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 0x14005dee1
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 + 0x2f]
xor rcx, rsp
call fcn.1400b0010
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
lea rcx, [rbp - 0x39]
lea rdx, str.StartService_Completed_:_SERVICE_RUNNING
call fcn.140001340
mov rcx, rax
call fcn.14004b81c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14005dec1
mov ecx, 0x80004005
call fcn.140001860
int3