Function at 0x10004d0bc
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 0x10004d2e0
mov r8d, 0x80010020
mov rdx, qword [rbp]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r13, rax
test rax, rax
je 0x10004d2b7
lea ebx, [rdi + 2]
cmp esi, 2
je 0x10004d14a
cmp esi, ebx
je 0x10004d14a
cmp esi, 4
je 0x10004d14a
cmp esi, edi
jne 0x10004d1ec
lea r8, [rsp + 0x28]
mov edx, edi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x10004d179
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rbp]
lea rdx, [0x1000108c0]
mov ecx, ebx
call fcn.100037e18
xor r12d, r12d
lea rdx, [rsp + 0x28]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x10004d1d4
cmp dword [rsp + 0x2c], edi
je 0x10004d1ec
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 0x10004d1d4
add r12d, 0x1f4
cmp r12d, 0x2710
ja 0x10004d1c9
cmp dword [rsp + 0x2c], edi
jne 0x10004d194
jmp 0x10004d1ec
mov ecx, 0x41d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8, qword [rbp]
lea rdx, [0x100010920]
mov ecx, 2
call fcn.100037e18
mov dword [r15], edi
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x10004d28f
mov r8, qword [rbp]
lea rdx, [0x100010958]
mov ecx, edi
call fcn.100037e18
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor r12d, r12d
cmp esi, 2
je 0x10004d229
cmp esi, ebx
je 0x10004d229
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 0x10004d2d5
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 0x10004d27d
lea rdx, [0x100010990]
mov ecx, 2
call fcn.100037e18
mov dword [r15], edi
jmp 0x10004d288
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp r12d, ebx
jb 0x10004d229
jmp 0x10004d2d5
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rbp]
lea rdx, [0x100010a70]
mov ecx, ebx
call fcn.100037e18
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x10004d2d5
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rbp]
lea rdx, [0x100010af0]
lea ecx, [rdi + 3]
call fcn.100037e18
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x10004d2fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x100010b80]
mov ecx, 3
call fcn.100037e18
xor edi, edi
mov rcx, rbp
call fcn.10001f3ec
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