Function at 0x140009310
Capabilities:
Check for time delay via gettickcount
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rax, qword [0x14004c120]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov ebx, edx
xor edx, edx
mov rsi, rcx
lea r8d, [rdx + 0x24]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
xor r14d, r14d
mov rbp, rax
xor eax, eax
mov dword [rsp + 0x38], r14d
mov qword [rsp + 0x3c], rax
mov qword [rsp + 0x44], rax
mov qword [rsp + 0x4c], rax
mov qword [rsp + 0x54], rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x30], r14d
mov edi, eax
test rbp, rbp
je 0x140009542
cmp ebx, 1
jne 0x140009389
lea rdx, [0x140034df8]
jmp 0x140009399
cmp ebx, 2
jne 0x140009539
lea rdx, [0x14004f1d8]
mov r8d, 0x10024
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140009539
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140009530
cmp dword [rsp + 0x3c], 3
jne 0x14000948d
mov r14d, 0x2710
nop dword [rax]
lea r8, str.Service_stop_pending...
lea rdx, [0x140034be0]
mov rcx, rsi
call fcn.140005d00
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140009421
mov edx, 0x3e8
jmp 0x140009428
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000948d
cmp dword [rsp + 0x3c], 1
je 0x14000948d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0x7530
ja 0x140009477
cmp dword [rsp + 0x3c], 3
je 0x1400093f0
jmp 0x14000948d
lea r8, str.Service_stop_timed_out._n
lea rdx, [0x140034be0]
mov rcx, rsi
call fcn.140005d00
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400094fd
cmp dword [rsp + 0x3c], 1
je 0x140009504
nop dword [rax + rax]
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400094fd
cmp dword [rsp + 0x3c], 1
je 0x140009504
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0x7530
ja 0x1400094fd
cmp dword [rsp + 0x3c], 1
jne 0x1400094b0
jmp 0x140009504
cmp dword [rsp + 0x3c], 1
jne 0x140009530
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140009530
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.DeleteService_failed
lea rdx, str._s__d
mov r9d, eax
mov rcx, rsi
call fcn.140005d00
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140018f50
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret