Function at 0x1400367e0
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 [0x140259350]
mov r15, r8
sbb ebp, ebp
mov r12, rdx
add ebp, 3
mov rbx, rcx
cmp eax, 0xffffffff
jne 0x14003681f
call fcn.1400377e0
cmp eax, 2
mov r13d, 0x2fe0
mov ecx, reloc.WS2_32.dll_recv
mov r14d, 0x110
cmovg r14d, ecx
cmp qword [0x14026c550], 0
je 0x1400368bc
lea rcx, [rsp + 0x58]
mov rdx, rbx
sub rcx, 8
call fcn.140025830
mov rcx, qword [0x14026c550]
mov r8d, 4
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140170a90
test rax, rax
je 0x1400368bc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x14003689c
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028e10
test edi, edi
jne 0x1400368c4
mov r8, rbx
lea rdx, str.Service__s_already_existed
mov ecx, 0x670003
call fcn.140028e10
or eax, 0xffffffff
jmp 0x140036ab0
test edi, edi
je 0x1400369a4
or edi, 0xffffffff
mov qword [rsp + 0x60], rsi
cmp qword [0x14026c550], 0
jne 0x1400368da
xor eax, eax
jmp 0x140036909
lea rcx, [rsp + 0x58]
mov rdx, rbx
sub rcx, 8
call fcn.140025830
mov rcx, qword [0x14026c550]
mov r8d, 0x10000
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140170a90
mov rcx, rax
call fcn.140170a90
mov rsi, rax
test rax, rax
jne 0x140036942
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [r13 + rcx]
test rax, rax
jne 0x140036934
call fcn.140174cc4
mov ecx, dword [rax]
sub ecx, 0x424
neg ecx
sbb edi, edi
jmp 0x140036997
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x14003696e
mov r8, rbx
lea rdx, str.Failed_deleting_service__s:__m
mov ecx, 0x670003
call fcn.140028e10
jmp 0x140036970
xor edi, edi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x140036997
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028e10
mov rsi, qword [rsp + 0x60]
test edi, edi
jne 0x1400368b4
mov qword [rsp + 0x28], r15
mov r9d, r14d
mov r8d, 0xf01ff
mov dword [rsp + 0x20], ebp
mov rdx, r12
mov rcx, rbx
call fcn.140037470
mov rcx, rax
call fcn.140170a90
test rax, rax
jne 0x140036a87
mov r8, rbx
lea rdx, str.Failed_creating_service__s:__m
mov ecx, 0x670003
call fcn.140028e10
mov edi, dword [rsp + 0x80]
test edi, edi
je 0x140036a6e
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [r13 + rcx]
test rax, rax
jne 0x140036a0c
call fcn.140174cc4
cmp dword [rax], 0x430
jne 0x140036a6e
mov r8d, edi
lea rdx, str.Trying_again_in__d_ms
mov ecx, 0x670003
call fcn.140028e10
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.140037470
mov rcx, rax
call fcn.140170a90
test rax, rax
jne 0x140036a87
mov r8, rbx
lea rdx, str.Failed_creating_service__s_after_timeout:__m
mov ecx, 0x670003
call fcn.140028e10
mov r8, rbx
lea rdx, str.Service__s_could_not_be_recreated
mov ecx, 0x670003
call fcn.140028e10
or eax, 0xffffffff
jmp 0x140036ab0
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140170a40
test rax, rax
jne 0x140036aae
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028e10
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