Function at 0x100037fa8
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, [0x100152eb8]
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x100037ff9
test byte [rcx + 0x1c], 1
je 0x100037ff9
mov edx, 0x40
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
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 0x100038065
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x10003804c
test byte [rcx + 0x1c], 2
je 0x10003804c
cmp byte [rcx + 0x19], 2
jb 0x10003804c
lea edx, [rbp + 0x41]
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
cmp edi, 5
jne 0x10003805b
mov esi, 0xc00d37e7
jmp 0x100038243
mov esi, 0xc00d37e8
jmp 0x10003820e
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 0x100038105
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x424
jne 0x1000380c2
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x1000380be
test byte [rcx + 0x1c], 2
je 0x1000380be
cmp byte [rcx + 0x19], 4
jb 0x1000380be
lea edx, [rbx + 0x42]
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
xor edi, edi
jmp 0x1000380f7
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x1000380f2
test byte [rcx + 0x1c], 2
je 0x1000380f2
cmp byte [rcx + 0x19], 2
jb 0x1000380f2
mov edx, 0x43
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
mov esi, 0xc00d37e9
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x10003820e
mov r8d, 0x7530
mov rdx, rax
mov rcx, rbp
call fcn.100037d90
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x100038154
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x100038150
test byte [rcx + 0x1c], 2
je 0x100038150
cmp byte [rcx + 0x19], 4
jb 0x100038150
mov edx, 0x44
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
xor edi, edi
jmp 0x1000381ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x430
jne 0x100038199
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x100038190
test byte [rcx + 0x1c], 2
je 0x100038190
cmp byte [rcx + 0x19], 4
jb 0x100038190
mov edx, 0x45
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
xor edi, edi
mov esi, 0x400d377b
jmp 0x1000381ce
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x1000381c9
test byte [rcx + 0x1c], 2
je 0x1000381c9
cmp byte [rcx + 0x19], 2
jb 0x1000381c9
mov edx, 0x46
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
mov esi, 0xc00d37ea
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [r13 + 0x28]
lea rcx, [rsp + 0x80]
call fcn.100035e40
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov r9d, 0xea60
mov rdx, rbx
mov rcx, rbp
call fcn.100037898
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x100038243
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.100036ce8
xor r8d, r8d
mov edx, esi
mov rcx, qword [0x100157688]
call fcn.100048ca0
jmp 0x1000382c2
lea rcx, [0x100151100]
mov rax, qword [0x100151100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov r8d, edi
lea rdx, [0x10001ea50]
lea rcx, [rsp + 0x78]
call fcn.100039d9c
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.100036ce8
mov r8d, edi
mov edx, esi
mov rcx, qword [0x100157688]
call fcn.100048ca0
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1000382c2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [0x100152eb8]
cmp rcx, r15
je 0x100038302
test byte [rcx + 0x1c], 1
je 0x100038302
movzx r9d, byte [rcx + 0x19]
mov eax, edi
neg eax
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp r9d, edx
jl 0x100038302
mov edx, 0x47
mov r9d, edi
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
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