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

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xc0
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov esi, r8d
movzx r13d, dl
mov rbp, rcx
test dl, dl
jne 0x140003cc8
test r8d, r8d
jne 0x140003cd3
xor edx, edx
xor ecx, ecx
lea r8d, [rsi + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
mov qword [rsp + 0x108], rax
test rax, rax
je 0x140003cb1
mov rdx, rbp
lea rcx, [rsp + 0x58]
call fcn.1400074c0
mov rcx, rax
call fcn.140006ce0
mov rdx, rax
lea r8d, [rsi + 0x24]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
lea rcx, [rsp + 0x58]
call fcn.140006d10
test rdi, rdi
je 0x140003cb1
lea r8, [rsp + 0x30]
lea edx, [rsi + 1]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
test rbx, rbx
je 0x140004177
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140004177
mov eax, 0x7530
test r8d, r8d
cmove esi, eax
xor eax, eax
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x50], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r12d, eax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdi, rax
mov qword [rsp + 0x108], rax
test rax, rax
jne 0x140003d7a
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCR90.dll_public:_void___cdecl_std::exception::constructor_void____ptr64]
xor r11d, r11d
mov dword [rsp + 0x70], r11d
mov qword [rsp + 0x78], r11
lea rax, vtable.ni::dsc::exception::ServiceFailure.0
mov qword [rsp + 0x58], rax
mov r9d, 0x498
lea r8, str.nidscosdepDaemon.cpp
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
int3
mov rcx, rbp
call fcn.140006ce0
mov rdx, rax
mov r8d, 0x2c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
mov qword [rsp + 0xa8], rax
test rax, rax
jne 0x140003dfc
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCR90.dll_public:_void___cdecl_std::exception::constructor_void____ptr64]
xor r11d, r11d
mov dword [rsp + 0x70], r11d
mov qword [rsp + 0x78], r11
lea rax, vtable.ni::dsc::exception::ServiceFailure.0
mov qword [rsp + 0x58], rax
mov r9d, 0x49f
lea r8, str.nidscosdepDaemon.cpp
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
int3
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140003e7b
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCR90.dll_public:_void___cdecl_std::exception::constructor_void____ptr64]
xor r11d, r11d
mov dword [rsp + 0x70], r11d
mov qword [rsp + 0x78], r11
lea rax, vtable.ni::dsc::exception::ServiceFailure.0
mov qword [rsp + 0x58], rax
mov r9d, 0x4a4
lea r8, str.nidscosdepDaemon.cpp
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
int3
mov eax, dword [rsp + 0x34]
cmp eax, 1
jne 0x140003e9c
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140004177
mov ebp, dword [rsp + 0x4c]
mov r14d, 0x2710
cmp eax, 3
jne 0x140003fc7
nop
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x140003ecb
mov edx, 0x3e8
jmp 0x140003ed2
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0xf8]
mov qword [rsp + 0x20], r11
mov r9d, 0x24
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140003f80
cmp dword [rsp + 0x34], 1
je 0x140003f68
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r12d
cmp eax, esi
ja 0x140003f21
cmp dword [rsp + 0x34], 3
je 0x140003eb0
jmp 0x140003fc7
mov edx, ebp
movzx ecx, r13b
call fcn.140003510
lea rcx, [rsp + 0x58]
call fcn.140002590
mov r9d, 0x4c8
lea r8, str.nidscosdepDaemon.cpp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
nop
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140004177
mov edx, ebp
movzx ecx, r13b
call fcn.140003510
lea rcx, [rsp + 0x58]
call fcn.140002590
mov r9d, 0x4be
lea r8, str.nidscosdepDaemon.cpp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
int3
mov r8d, esi
movzx edx, r13b
mov rcx, rbx
call fcn.1400041a0
test eax, eax
js 0x140004164
lea r8, [rsp + 0x30]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x14000403c
mov edx, ebp
movzx ecx, r13b
call fcn.140003510
lea rcx, [rsp + 0x58]
call fcn.140002590
mov r9d, 0x4d4
lea r8, str.nidscosdepDaemon.cpp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
int3
cmp dword [rsp + 0x34], 1
je 0x140004164
nop word [rax + rax]
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000406b
mov edx, 0x3e8
jmp 0x140004072
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0xf8]
mov qword [rsp + 0x20], r11
mov r9d, 0x24
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000411d
cmp dword [rsp + 0x34], 1
je 0x140004108
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r12d
cmp eax, esi
ja 0x1400040c1
cmp dword [rsp + 0x34], 1
jne 0x140004050
jmp 0x140004164
mov edx, ebp
movzx ecx, r13b
call fcn.140003510
lea rcx, [rsp + 0x58]
call fcn.140002590
mov r9d, 0x4ee
lea r8, str.nidscosdepDaemon.cpp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
nop
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140004177
mov edx, ebp
movzx ecx, r13b
call fcn.140003510
lea rcx, [rsp + 0x58]
call fcn.140002590
mov r9d, 0x4e4
lea r8, str.nidscosdepDaemon.cpp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140002790
lea rdx, [0x14000f2c8]
lea rcx, [rsp + 0x80]
call fcn.14000858a
nop
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret