Function at 0x100037fec
Capabilities:
Delete service

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rbp
mov r13, rcx
lea r15, [0x100153eb8]
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x10003803d
test byte [rcx + 0x1c], 1
je 0x10003803d
mov edx, 0x40
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov esi, 0x400d377a
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x1000380a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x100038090
test byte [rcx + 0x1c], 2
je 0x100038090
cmp byte [rcx + 0x19], 2
jb 0x100038090
lea edx, [rbp + 0x41]
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
cmp edi, 5
jne 0x10003809f
mov esi, 0xc00d37e7
jmp 0x100038287
mov esi, 0xc00d37e8
jmp 0x100038252
mov r8d, 0x10024
mov rdx, qword [r13 + 0x28]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x100038149
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x424
jne 0x100038106
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x100038102
test byte [rcx + 0x1c], 2
je 0x100038102
cmp byte [rcx + 0x19], 4
jb 0x100038102
lea edx, [rbx + 0x42]
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
xor edi, edi
jmp 0x10003813b
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x100038136
test byte [rcx + 0x1c], 2
je 0x100038136
cmp byte [rcx + 0x19], 2
jb 0x100038136
mov edx, 0x43
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
mov esi, 0xc00d37e9
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x100038252
mov r8d, 0x7530
mov rdx, rax
mov rcx, rbp
call fcn.100037dd4
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x100038198
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x100038194
test byte [rcx + 0x1c], 2
je 0x100038194
cmp byte [rcx + 0x19], 4
jb 0x100038194
mov edx, 0x44
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
xor edi, edi
jmp 0x100038212
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x430
jne 0x1000381dd
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x1000381d4
test byte [rcx + 0x1c], 2
je 0x1000381d4
cmp byte [rcx + 0x19], 4
jb 0x1000381d4
mov edx, 0x45
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
xor edi, edi
mov esi, 0x400d377b
jmp 0x100038212
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x10003820d
test byte [rcx + 0x1c], 2
je 0x10003820d
cmp byte [rcx + 0x19], 2
jb 0x10003820d
mov edx, 0x46
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
mov esi, 0xc00d37ea
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [r13 + 0x28]
lea rcx, [rsp + 0x80]
call fcn.100035e60
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov r9d, 0xea60
mov rdx, rbx
mov rcx, rbp
call fcn.1000378dc
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x100038287
lea edx, [rdi + 4]
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov r9, qword [r13 + 0x28]
mov r8d, esi
mov rcx, r13
call fcn.100036d2c
xor r8d, r8d
mov edx, esi
mov rcx, qword [0x100158688]
call fcn.100048d2c
jmp 0x100038306
lea rcx, [0x100152100]
mov rax, qword [0x100152100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov r8d, edi
lea rdx, [0x10001ea50]
lea rcx, [rsp + 0x78]
call fcn.100039dd4
mov edx, 1
and qword [rsp + 0x28], 0
mov rbx, qword [rsp + 0x78]
mov qword [rsp + 0x20], rbx
mov r9, qword [r13 + 0x28]
mov r8d, esi
mov rcx, r13
call fcn.100036d2c
mov r8d, edi
mov edx, esi
mov rcx, qword [0x100158688]
call fcn.100048d2c
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x100038306
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [0x100153eb8]
cmp rcx, r15
je 0x100038346
test byte [rcx + 0x1c], 1
je 0x100038346
movzx r9d, byte [rcx + 0x19]
mov eax, edi
neg eax
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp r9d, edx
jl 0x100038346
mov edx, 0x47
mov r9d, edi
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
mov eax, edi
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret