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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45d268
push eax
mov dword fs:[0], esp
sub esp, 0x50
cmp byte [ebp + 0xc], 0
push esi
push edi
jne 0x409558
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x409568
push 1
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
mov dword [ebp + 0xc], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x4097bc
push dword [ebp + 8]
lea ecx, [ebp - 0x30]
call fcn.0040d0e0
push 0x24
mov ecx, eax
call fcn.0040e0a0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
lea ecx, [ebp - 0x30]
mov edi, eax
call fcn.0040d860
test edi, edi
je 0x409541
lea eax, [ebp - 0x54]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
mov eax, 0x7530
test esi, esi
cmove esi, eax
mov dword [ebp - 0x14], esi
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
movups xmmword [ebp - 0x5c], xmm0
movups xmmword [ebp - 0x4c], xmm0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
push 0
push 0
mov dword [ebp - 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 1
test edi, edi
jne 0x4095f1
push 0x498
push str.nidscosdepDaemon.cpp
sub esp, 0x14
xorps xmm0, xmm0
mov eax, esp
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
movq qword [eax + 4], xmm0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax], vtable.ni::dsc::exception::ServiceFailure.0
lea eax, [ebp - 0x38]
push eax
call fcn.00407430
add esp, 0x20
lea eax, [ebp - 0x38]
push 0x473990
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov ecx, dword [ebp + 8]
push 0x2c
call fcn.0040e0a0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 2
test esi, esi
jne 0x409617
push 0x49f
jmp 0x4095a7
lea eax, [ebp - 0x18]
push eax
push 0x24
lea eax, [ebp - 0x5c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x409638
push 0x4a4
jmp 0x4095a7
mov eax, dword [ebp - 0x58]
cmp eax, 1
je 0x4097b0
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x10], ecx
mov ecx, 0x2710
cmp eax, 3
jne 0x4096bc
mov eax, 0xcccccccd
mul dword [ebp - 0x44]
shr edx, 3
cmp edx, 0x3e8
jae 0x40966e
mov edx, 0x3e8
jmp 0x409677
cmp edx, 0x2710
cmova edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x18]
push eax
push 0x24
lea eax, [ebp - 0x5c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40972f
cmp dword [ebp - 0x58], 1
je 0x4097b0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x14]
ja 0x4096fa
cmp dword [ebp - 0x58], 3
mov ecx, 0x2710
je 0x409654
push dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
push eax
push esi
call fcn.00407d80
add esp, 0xc
test eax, eax
js 0x4097b0
lea eax, [ebp - 0x5c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x409745
push dword [ebp - 0x10]
push dword [ebp + 0xc]
call fcn.00407ee0
add esp, 8
push 0x4d4
jmp 0x40970e
push dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
push eax
call fcn.00407ee0
add esp, 8
push 0x4c8
push str.nidscosdepDaemon.cpp
sub esp, 0x14
xorps xmm0, xmm0
mov ecx, esp
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
call fcn.00407850
jmp 0x4095d7
push dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
push eax
call fcn.00407ee0
add esp, 8
push 0x4be
jmp 0x40970e
cmp dword [ebp - 0x58], 1
je 0x4097b0
nop dword [eax + eax]
mov eax, 0xcccccccd
mul dword [ebp - 0x44]
shr edx, 3
cmp edx, 0x3e8
jae 0x40976a
mov edx, 0x3e8
jmp 0x409778
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x18]
push eax
push 0x24
lea eax, [ebp - 0x5c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x4097e4
cmp dword [ebp - 0x58], 1
je 0x4097b0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x14]
ja 0x4097cc
cmp dword [ebp - 0x58], 1
jne 0x409750
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x10]
push dword [ebp + 0xc]
call fcn.00407ee0
add esp, 8
push 0x4ee
jmp 0x40970e
push dword [ebp - 0x10]
push dword [ebp + 0xc]
call fcn.00407ee0
add esp, 8
push 0x4e4
jmp 0x40970e