Function at 0x100044178
Capabilities:
Delete service
Query service status

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov r15, r8
mov esi, edx
mov rbp, rcx
mov edi, 1
and dword [r8], 0
xor edx, edx
xor ecx, ecx
mov r8d, 0xe0000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
je 0x10004439c
mov r8d, 0x80010020
mov rdx, qword [rbp]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r13, rax
test rax, rax
je 0x100044373
lea ebx, [rdi + 2]
cmp esi, 2
je 0x100044206
cmp esi, ebx
je 0x100044206
cmp esi, 4
je 0x100044206
cmp esi, edi
jne 0x1000442a8
lea r8, [rsp + 0x28]
mov edx, edi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x100044235
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rbp]
lea rdx, [0x10000e7e0]
mov ecx, ebx
call fcn.100054fd8
xor r12d, r12d
lea rdx, [rsp + 0x28]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x100044290
cmp dword [rsp + 0x2c], edi
je 0x1000442a8
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x28]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x100044290
add r12d, 0x1f4
cmp r12d, 0x2710
ja 0x100044285
cmp dword [rsp + 0x2c], edi
jne 0x100044250
jmp 0x1000442a8
mov ecx, 0x41d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8, qword [rbp]
lea rdx, [0x10000e840]
mov ecx, 2
call fcn.100054fd8
mov dword [r15], edi
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x10004434b
mov r8, qword [rbp]
lea rdx, [0x10000e878]
mov ecx, edi
call fcn.100054fd8
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor r12d, r12d
cmp esi, 2
je 0x1000442e5
cmp esi, ebx
je 0x1000442e5
lea ebx, [r12 + 6]
mov r8d, 0x80000000
mov rdx, qword [rbp]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
add r12d, edi
test rax, rax
je 0x100044391
lea rdx, [rsp + 0x28]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp r12d, ebx
jne 0x100044339
lea rdx, [0x10000e8b0]
mov ecx, 2
call fcn.100054fd8
mov dword [r15], edi
jmp 0x100044344
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp r12d, ebx
jb 0x1000442e5
jmp 0x100044391
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rbp]
lea rdx, [0x10000e990]
mov ecx, ebx
call fcn.100054fd8
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x100044391
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rbp]
lea rdx, [0x10000ea10]
lea ecx, [rdi + 3]
call fcn.100054fd8
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1000443b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x10000eaa0]
mov ecx, 3
call fcn.100054fd8
xor edi, edi
mov rcx, rbp
call fcn.10002006c
mov eax, edi
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret