Function at 0x14003c390
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
neg dword [rsp + 0x88]
mov edi, r9d
mov eax, dword [0x140263bb0]
mov r15, r8
sbb ebp, ebp
mov r12, rdx
add ebp, 3
mov rbx, rcx
cmp eax, 0xffffffff
jne 0x14003c3cf
call fcn.14003d5c0
cmp eax, 2
mov r13d, 0x2f80
mov ecx, reloc.WS2_32.dll_recv
mov r14d, pe_nt_image_headers64
cmovg r14d, ecx
cmp qword [0x140279320], 0
je 0x14003c46c
lea rcx, [rsp + 0x58]
mov rdx, rbx
sub rcx, 8
call fcn.1400294d0
mov rcx, qword [0x140279320]
mov r8d, 4
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.1401710c0
test rax, rax
je 0x14003c46c
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140171070
test rax, rax
jne 0x14003c44c
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x5b0003
call fcn.14002d250
test edi, edi
jne 0x14003c474
mov r8, rbx
lea rdx, str.Service__s_already_existed
mov ecx, 0x5b0003
call fcn.14002d250
or eax, 0xffffffff
jmp 0x14003c658
test edi, edi
je 0x14003c54c
or edi, 0xffffffff
mov qword [rsp + 0x60], rsi
cmp qword [0x140279320], 0
je 0x14003c518
lea rcx, [rsp + 0x58]
mov rdx, rbx
sub rcx, 8
call fcn.1400294d0
mov rcx, qword [0x140279320]
mov r8d, 0x10000
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.1401710c0
mov rsi, rax
test rax, rax
je 0x14003c518
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
movsxd rcx, eax
call fcn.140171070
test rax, rax
jne 0x14003c4ed
mov r8, rbx
lea rdx, str.Failed_deleting_service__s:__m
mov ecx, 0x5b0003
call fcn.14002d250
jmp 0x14003c4ef
xor edi, edi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140171070
test rax, rax
jne 0x14003c53f
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x5b0003
call fcn.14002d250
jmp 0x14003c53f
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [r13 + rcx]
test rax, rax
jne 0x14003c533
call fcn.1401760e4
mov ecx, dword [rax]
sub ecx, 0x424
neg ecx
sbb edi, edi
mov rsi, qword [rsp + 0x60]
test edi, edi
jne 0x14003c464
mov qword [rsp + 0x28], r15
mov r9d, r14d
mov r8d, 0xf01ff
mov dword [rsp + 0x20], ebp
mov rdx, r12
mov rcx, rbx
call fcn.14003d100
mov rcx, rax
call fcn.1401710c0
test rax, rax
jne 0x14003c62f
mov r8, rbx
lea rdx, str.Failed_creating_service__s:__m
mov ecx, 0x5b0003
call fcn.14002d250
mov edi, dword [rsp + 0x80]
test edi, edi
je 0x14003c616
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [r13 + rcx]
test rax, rax
jne 0x14003c5b4
call fcn.1401760e4
cmp dword [rax], 0x430
jne 0x14003c616
mov r8d, edi
lea rdx, str.Trying_again_in__d_ms
mov ecx, 0x5b0003
call fcn.14002d250
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r9d, r14d
mov qword [rsp + 0x28], r15
mov r8d, 0xf01ff
mov dword [rsp + 0x20], ebp
mov rdx, r12
mov rcx, rbx
call fcn.14003d100
mov rcx, rax
call fcn.1401710c0
test rax, rax
jne 0x14003c62f
mov r8, rbx
lea rdx, str.Failed_creating_service__s_after_timeout:__m
mov ecx, 0x5b0003
call fcn.14002d250
mov r8, rbx
lea rdx, str.Service__s_could_not_be_recreated
mov ecx, 0x5b0003
call fcn.14002d250
or eax, 0xffffffff
jmp 0x14003c658
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140171070
test rax, rax
jne 0x14003c656
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x5b0003
call fcn.14002d250
xor eax, eax
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret