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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push 8
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
add esp, 8
call ebx
push 0xf003f
push 0
push 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
test ebp, ebp
jne 0x403984
push 6
push str.NVSTINST_ERROR_:__d
call fcn.0040a7c0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WIN_ERROR_:__d
call fcn.0040a7c0
push 9
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 0x10
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x38]
push edi
push 0x2c
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x4039e7
push 7
push str.NVSTINST_ERROR_:__d
call fcn.0040a7c0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WIN_ERROR_:__d
call fcn.0040a7c0
push 0xa
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 0x10
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 9
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 8
pop edi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea ecx, [esp + 0x10]
push ecx
push 0x24
lea edx, [esp + 0x20]
push edx
push 0
push edi
call esi
test eax, eax
jne 0x403a23
push 8
push str.NVSTINST_ERROR_:__d
call fcn.0040a7c0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WIN_ERROR_:__d
jmp 0x403c85
mov eax, dword [esp + 0x1c]
cmp eax, 1
jne 0x403a60
push 0xb
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push edi
call esi
push ebp
call esi
push 9
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 8
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
cmp eax, 3
jne 0x403ae6
lea esp, [esp]
push 0xc
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
mov eax, 0xcccccccd
mul dword [esp + 0x38]
shr edx, 3
add esp, 8
cmp edx, 0x3e8
jae 0x403a9a
mov edx, 0x3e8
jmp 0x403aa7
cmp edx, 0x2710
jbe 0x403aa7
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push 0x24
lea ecx, [esp + 0x20]
push ecx
push 0
push edi
call esi
test eax, eax
je 0x403a03
cmp dword [esp + 0x1c], 1
je 0x403b32
call ebx
sub eax, dword [esp + 0x14]
cmp eax, 0xbb8
ja 0x403b66
cmp dword [esp + 0x1c], 3
je 0x403a70
push 0xe
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
push ebp
push edi
call fcn.004036f0
push 0xf
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
push 0x10
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 0x20
lea edx, [esp + 0x18]
push edx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x403b72
push 0xa
push str.NVSTINST_ERROR_:__d
jmp 0x403c85
push 0xd
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push edi
call esi
push ebp
call esi
push 9
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 8
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
push 9
push str.NVSTINST_ERROR_:__d
jmp 0x403c85
call ebx
mov ebx, eax
mov eax, dword [esp + 0x2c]
push 0x11
push str.NVSTINST_INFO_:__d
mov dword [esp + 0x1c], eax
call fcn.0040a7c0
add esp, 8
cmp dword [esp + 0x1c], 1
je 0x403c99
jmp 0x403ba0
mov eax, 0xcccccccd
mul dword [esp + 0x30]
mov esi, edx
shr esi, 3
cmp esi, 0x3e8
jae 0x403bbd
mov esi, 0x3e8
jmp 0x403bca
cmp esi, 0x2710
jbe 0x403bca
mov esi, 0x2710
push 0x12
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x10]
push ecx
push 0x24
lea edx, [esp + 0x20]
push edx
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x403a03
mov esi, 1
cmp dword [esp + 0x1c], esi
je 0x403c4d
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x2c], eax
jbe 0x403c33
push 0x13
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x2c]
mov ebx, eax
mov dword [esp + 0x14], ecx
jmp 0x403c41
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [esp + 0x30]
ja 0x403c7e
cmp dword [esp + 0x1c], esi
jne 0x403ba0
jmp 0x403c99
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebp
call esi
push 0xd
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
push 9
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 0x10
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
push 0x14
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push edi
call esi
push ebp
call esi
push 9
push str.NVSTINST_INFO_:__d
call fcn.0040a7c0
add esp, 8
pop esi
pop edi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret