Function at 0x14004dcb0
Capabilities:
Delete service

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
sub rsp, 0x80
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x1400d2478]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rdi, rdx
mov rsi, rcx
mov qword [r11 - 0x30], 7
xor r12d, r12d
mov qword [r11 - 0x38], r12
mov word [r11 - 0x48], r12w
lea r8d, [r12 + 0xe]
lea rdx, str.Service_Delete
lea rcx, [r11 - 0x50]
call fcn.140001870
nop
mov ebx, r12d
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r9, qword [rsp + 0x50]
lea rax, str.Function_start
mov qword [rsp + 0x20], rax
lea edx, [r12 + 0x32]
lea r8d, [r12 + 1]
mov rcx, rsi
call fcn.1400144a0
xor edx, edx
xor ecx, ecx
lea r8d, [r12 + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x14004dda1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r9, qword [rsp + 0x50]
lea rax, str.OpenSCManager
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
lea rcx, str.Error___i__return_by_function___s_
mov qword [rsp + 0x20], rcx
lea edx, [rbp + 0xa]
lea r8d, [r12 + 1]
mov rcx, rsi
call fcn.1400144a0
jmp 0x14004de77
mov r8d, 0x10000
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x14004de12
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x424
jne 0x14004ddd2
mov ebx, r12d
jmp 0x14004de6e
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r9, qword [rsp + 0x50]
lea rax, str.OpenService
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
lea rcx, str.Error___i__return_by_function___s_
mov qword [rsp + 0x20], rcx
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rsi
call fcn.1400144a0
jmp 0x14004de6e
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14004de65
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r9, qword [rsp + 0x50]
lea rax, [0x1400b3d28]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
lea rcx, str.Error___i__return_by_function___s_
mov qword [rsp + 0x20], rcx
mov edx, 0xa
lea r8d, [rdx - 9]
mov rcx, rsi
call fcn.1400144a0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r9, qword [rsp + 0x50]
mov dword [rsp + 0x28], ebx
lea rax, str.Return_code__0x_x_
mov qword [rsp + 0x20], rax
mov edx, 0x28
lea r8d, [rdx - 0x27]
mov rcx, rsi
call fcn.1400144a0
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r9, qword [rsp + 0x50]
lea rax, str.Function_end
mov qword [rsp + 0x20], rax
mov edx, 0x32
lea r8d, [rdx - 0x31]
mov rcx, rsi
call fcn.1400144a0
nop
cmp qword [rsp + 0x68], 8
jb 0x14004def6
mov rcx, qword [rsp + 0x50]
call fcn.140065920
mov eax, ebx
jmp 0x14004def8
mov eax, ebx
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.140064b70
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret