Function at 0x40ae90
Capabilities:
Check for time delay via gettickcount
Enumerate services
Query service status
Stop service

Disassembly:
sub esp, 0x84
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
call esi
push str.Spooler
push str.StopAService__s_
mov dword [esp + 0x20], eax
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x20], ebx
jne 0x40aefd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
push 0x2c
push str.Spooler
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
mov dword [esp + 0x2c], edi
jne 0x40af3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea eax, [esp + 0x1c]
push eax
push 0x24
lea ecx, [esp + 0x38]
push ecx
push 0
push edi
call ebp
test eax, eax
jne 0x40af80
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
mov eax, dword [esp + 0x34]
cmp eax, 1
je 0x40b2b3
cmp eax, 3
jne 0x40afd7
mov edx, dword [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x1c]
push eax
push 0x24
lea ecx, [esp + 0x38]
push ecx
push 0
push edi
call ebp
test eax, eax
je 0x40af58
cmp dword [esp + 0x34], 1
je 0x40b2b3
call esi
sub eax, dword [esp + 0x18]
cmp eax, 0xbb8
ja 0x40b051
mov eax, dword [esp + 0x34]
cmp eax, 3
je 0x40af92
cmp eax, 1
je 0x40b2b3
mov esi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 1
push edi
call esi
test eax, eax
jne 0x40b1b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40b2bf
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f101
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x28], ebx
jne 0x40b072
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.memory_allocation_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
push str.Stopping_service_timed_out
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
push ecx
push ebx
push 1
push edi
call esi
test eax, eax
jne 0x40b0b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.EnumDependentServices_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
cmp dword [esp + 0x14], 0
mov dword [esp + 0x24], 0
jbe 0x40b1a4
jmp 0x40b0d0
mov eax, dword [esp + 0x20]
mov ecx, 9
mov esi, ebx
lea edi, [esp + 0x70]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x70]
push 0x24
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40b1ef
lea ecx, [esp + 0x54]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40b217
cmp dword [esp + 0x58], 1
mov edi, dword [esp + 0x6c]
je 0x40b17d
lea ebx, [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x10]
push edx
push 0x24
lea eax, [esp + 0x38]
push eax
push 0
push esi
call ebp
test eax, eax
je 0x40b23f
cmp dword [esp + 0x34], 1
mov edi, dword [esp + 0x48]
je 0x40b17d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0xbb8
jbe 0x40b120
push str.Stopping_dependent_service_timed_out
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x24]
add eax, 1
add ebx, 0x24
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
jb 0x40b0d0
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
push ebx
call fcn.0040f0fc
mov ebx, dword [esp + 0x24]
add esp, 4
lea ecx, [esp + 0x54]
push ecx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40b267
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_dependent_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_dependent_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_dependent_failed__gle_d_
call fcn.00404b20
mov edi, eax
call fcn.00405000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
cmp dword [esp + 0x58], 1
mov esi, dword [esp + 0x6c]
je 0x40b2b3
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x1c]
push edx
push 0x24
lea eax, [esp + 0x38]
push eax
push 0
push edi
call ebp
test eax, eax
je 0x40af58
cmp dword [esp + 0x34], 1
mov esi, dword [esp + 0x48]
je 0x40b2b3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0xbb8
jbe 0x40b272
jmp 0x40b051
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x84
ret