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

Disassembly:
push 0xffffffffffffffff
push 0x438f18
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44bd40]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, dword [esp + 0xa8]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x1c], esi
xor edi, edi
mov dword [esp + 0x80], edi
call fcn.004117e0
test eax, eax
mov ebp, 0x10
jne 0x405cf6
push str.This_operating_system_does_not_have_services.__Skipping_the_action_of_stopping_the_service.
push 1
push 0x44d160
call fcn.00401110
add esp, 0xc
jmp 0x4061a9
cmp esi, edi
mov dword [esp + 0x20], edi
mov ebx, 1
jne 0x405d6f
push 0xf003f
push edi
push edi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x1c], esi
jne 0x405d6f
mov eax, dword [esp + 0x8c]
mov esi, ebp
cmp dword [esp + 0xa0], esi
jae 0x405d37
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__OpenSCManager_failed.
push 8
push 0x44d160
call fcn.00401110
add esp, 0x10
cmp dword [esp + 0xa0], esi
jb 0x405d65
mov eax, dword [esp + 0x8c]
push eax
call fcn.0041615f
add esp, 4
mov eax, 0x41c
jmp 0x40623a
cmp dword [esp + 0xa0], ebp
mov eax, dword [esp + 0x8c]
jae 0x405d86
lea eax, [esp + 0x8c]
push 0xac
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x48], esi
jne 0x405dec
cmp dword [esp + 0xa0], ebp
mov eax, dword [esp + 0x8c]
jae 0x405db4
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__OpenService_failed.
push 8
push 0x44d160
call fcn.00401110
add esp, 0x10
cmp dword [esp + 0xa0], ebp
jb 0x405de2
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.0041615f
add esp, 4
mov eax, 0x424
jmp 0x40623a
lea edx, [esp + 0x28]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4061f8
cmp dword [esp + 0x2c], ebx
jne 0x405e44
cmp dword [esp + 0xa0], ebp
mov eax, dword [esp + 0x8c]
jae 0x405e1d
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__Service_found_to_be_stopped_already.
push ebx
push 0x44d160
call fcn.00401110
add esp, 0x10
lea ecx, [esp + 0x88]
call fcn.00401db0
xor eax, eax
jmp 0x40623a
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
cmp dword [esp + 0x2c], 3
mov ebp, dword [esp + 0xa4]
mov edi, eax
mov dword [esp + 0x4c], edi
jne 0x405e9d
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x28]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x405f75
cmp dword [esp + 0x2c], 1
je 0x405f0d
call ebx
sub eax, edi
cmp eax, ebp
ja 0x405f32
cmp dword [esp + 0x2c], 3
je 0x405e60
mov edi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
lea edx, [esp + 0x18]
push edx
xor eax, eax
lea ecx, [esp + 0x18]
push ecx
push eax
push eax
push 1
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call edi
test eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x4060b4
call ebp
cmp eax, 0xea
je 0x405f98
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x405ef1
lea eax, [esp + 0x8c]
push eax
push str._s_Dependent_Service_attempting_to_stop.__EnumDependentServices_failed_to_return_ERROR_MORE_DATA.
push 8
push 0x44d160
call fcn.00401110
add esp, 0x10
call ebp
jmp 0x40622a
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x405f25
lea eax, [esp + 0x8c]
push eax
push str._s_Service_successfully_stopped.
push 1
jmp 0x405e24
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x405f4a
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__Service_found_to_be_pending_a_stop_event_and_timed_out_waiting_for_the_service_to_stop.
push 8
push 0x44d160
call fcn.00401110
add esp, 0x10
lea ecx, [esp + 0x88]
call fcn.00401db0
mov eax, 0x5b4
jmp 0x40623a
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x405f8d
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__Service_found_to_be_pending_a_stop_event_and_QueryServiceStatus_failed.
jmp 0x406215
mov edx, dword [esp + 0x14]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [esp + 0x24], eax
jne 0x405fd7
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x405fcc
lea eax, [esp + 0x8c]
push eax
push str._s_Dependent_Service_attempting_to_stop.__HeapAlloc_failed.
jmp 0x405ef7
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x18]
push edx
push ecx
push eax
push 1
push esi
call edi
test eax, eax
jne 0x406013
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x406008
lea eax, [esp + 0x8c]
push eax
push str._s_Dependent_Service_attempting_to_stop.__EnumDependentServices_failed.
jmp 0x405ef7
xor ebx, ebx
cmp dword [esp + 0x18], ebx
jbe 0x406090
mov ebp, dword [esp + 0x24]
nop
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
mov ecx, 9
mov esi, ebp
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
jae 0x406045
lea eax, [esp + 0x8c]
mov esi, dword [esp + 0x54]
push eax
push esi
push str.Attempting_to_stop__s___s_Dependent_Service_.
push 1
push 0x44d160
call fcn.00401110
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0xb8]
add esp, 0x14
push edx
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x74], esp
push esi
call fcn.004033c0
mov ecx, dword [esp + 0x68]
call fcn.00405c90
add ebx, 1
add ebp, 0x24
cmp ebx, dword [esp + 0x18]
jb 0x406020
mov ecx, dword [esp + 0x24]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [esp + 0x48]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.ADVAPI32.dll_ControlService]
lea edx, [esp + 0x28]
push edx
push 1
push esi
call edi
test eax, eax
jne 0x4060eb
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x4060e0
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__ControlService_with_SERVICE_CONTROL_STOP_failed.
jmp 0x405ef7
cmp dword [esp + 0x2c], 4
jne 0x40611c
call ebx
cmp dword [esp + 0x2c], 4
mov ebp, eax
jne 0x40611c
lea ecx, [ecx]
call ebx
sub eax, ebp
cmp eax, 0x7530
jae 0x40611c
lea eax, [esp + 0x28]
push eax
push 1
push esi
call edi
cmp dword [esp + 0x2c], 4
je 0x406100
cmp dword [esp + 0x2c], 1
je 0x406165
mov ebp, dword [esp + 0xa4]
mov edi, dword [esp + 0x4c]
mov edi, edi
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x28]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4061ee
cmp dword [esp + 0x2c], 1
je 0x406165
call ebx
sub eax, edi
cmp eax, ebp
ja 0x4061cb
cmp dword [esp + 0x2c], 1
jne 0x406130
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x40617d
lea eax, [esp + 0x8c]
push eax
push str._s_Service_successfully_stopped.
push 1
push 0x44d160
call fcn.00401110
add esp, 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
cmp dword [esp + 0x20], 0
je 0x4061a9
mov eax, dword [esp + 0x1c]
push eax
call esi
cmp dword [esp + 0xa0], 0x10
jb 0x405e3d
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.0041615f
add esp, 4
xor eax, eax
jmp 0x40623a
cmp dword [esp + 0xa0], 0x10
mov eax, dword [esp + 0x8c]
jae 0x4061e3
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__Timed_out_waiting_for_the_service_to_stop.
jmp 0x405f50
cmp dword [esp + 0xa0], 0x10
jmp 0x4061ff
cmp dword [esp + 0xa0], ebp
mov eax, dword [esp + 0x8c]
jae 0x40620f
lea eax, [esp + 0x8c]
push eax
push str._s_Service_attempting_to_stop.__QueryServiceStatus_failed.
push 8
push 0x44d160
call fcn.00401110
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x88]
mov esi, eax
call fcn.00401db0
mov eax, esi
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0x24