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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x43f008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 5
push 0
push 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
test ebx, ebx
je 0x406cce
push 0
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 3
push 0x30
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov eax, dword [ebp - 0xc]
add eax, 0x2c
push eax
mov dword [ebp - 0x10], eax
call fcn.0040f367
mov edi, eax
add esp, 4
mov dword [ebp - 0x38], edi
test edi, edi
je 0x406cce
push dword [ebp - 0x10]
push 0
push edi
call fcn.0040c8a0
add esp, 0xc
lea eax, [ebp - 8]
push 0
push 0
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
push edi
push 3
push 0x30
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
push ebx
test eax, eax
jne 0x406ca9
call esi
jmp 0x406cc5
call esi
xor ebx, ebx
cmp dword [ebp - 8], ebx
jbe 0x406cc5
mov edx, dword [edi]
call fcn.0040a180
inc ebx
lea edi, [edi + 0x2c]
cmp ebx, dword [ebp - 8]
jb 0x406cb2
mov edi, dword [ebp - 0x38]
push edi
call fcn.0040f34c
add esp, 4
xor eax, eax
mov dword [ebp - 0xc], eax
nop dword [eax]
nop word [eax + eax]
mov edi, dword [eax + 0x43b614]
mov dword [ebp - 0x38], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
push 0
push 0
mov dword [ebp - 8], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
je 0x406e40
push 0x2c
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x406e3d
lea eax, [ebp - 0x10]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x406e3a
mov eax, dword [ebp - 0x30]
cmp eax, 1
je 0x406df9
cmp eax, 3
jne 0x406d94
nop dword [eax + eax]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x10]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x406e3a
cmp dword [ebp - 0x30], 1
je 0x406df3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 8]
cmp eax, 0x7530
ja 0x406e3a
cmp dword [ebp - 0x30], 3
je 0x406d50
mov ecx, dword [ebp - 0x38]
call fcn.0040a390
lea eax, [ebp - 0x34]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x406e3a
cmp dword [ebp - 0x30], 1
je 0x406df3
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x10]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x406e3a
cmp dword [ebp - 0x30], 1
je 0x406df3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 8]
cmp eax, 0x7530
ja 0x406e3a
cmp dword [ebp - 0x30], 1
jne 0x406db7
push edi
call esi
push ebx
call esi
mov ebx, dword [ebp - 0xc]
push 0xf003f
push 0
push 0
mov ebx, dword [ebx + 0x43b614]
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x406e40
push 0x10000
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x406e2d
push edi
jmp 0x406e3e
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push ebx
call esi
push edi
jmp 0x406e3e
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
cmp eax, 0x14
jb 0x406ce0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a5a2
mov esp, ebp
pop ebp
ret