Function at 0x4db254
Capabilities:
Continue service
Delete service
Modify service
Pause service
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4db655
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
push 0xf003f
push 0
lea edx, [ebp - 0x34]
mov eax, ebx
call fcn.00408ec4
mov eax, dword [ebp - 0x34]
call fcn.00404eec
push eax
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4db2b0
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp 0x4db63f
xor edx, edx
push ebp
push 0x4db638
push dword fs:[edx]
mov dword fs:[edx], esp
push 0xf01ff
mov eax, esi
call fcn.00404eec
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_OpenServiceA
mov esi, eax
test esi, esi
jne 0x4db2e7
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp 0x4db621
cmp edi, 7
ja case.0x4db2f0.0
jmp dword [edi*4 + 0x4db2f7]
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0
push esi
call sub.advapi32.dll_StartServiceA
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne case.0x4db2f0.0
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push 1
push esi
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne case.0x4db2f0.0
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push 2
push esi
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne case.0x4db2f0.0
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push 3
push esi
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne case.0x4db2f0.0
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x4db3f5
cmp dword [ebp - 0x2c], 1
jne 0x4db3f5
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0
push esi
call sub.advapi32.dll_StartServiceA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4db3f5
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
test bl, bl
jne 0x4db406
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
mov eax, dword [ebp - 0x2c]
sub eax, 4
je 0x4db417
sub eax, 3
jne case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push 1
push esi
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4db43a
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
xor eax, eax
mov dword [ebp - 8], eax
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov edi, eax
push 0x3e8
push edi
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 0x30]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4db477
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp 0x4db4ba
cmp dword [ebp - 0x2c], 1
jne 0x4db4a2
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0
push esi
call sub.advapi32.dll_StartServiceA
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4db4ba
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp 0x4db4ba
add dword [ebp - 8], 1
jno 0x4db4ad
call fcn.00403b58
cmp dword [ebp - 8], 0xa
jle 0x4db44e
mov dword [ebp - 4], 0x41d
push edi
call sub.kernel32.dll_CloseHandle_1
jmp case.0x4db2f0.0
mov eax, dword [ebp + 8]
sub eax, 1
jb 0x4db4d4
je 0x4db4dd
dec eax
je 0x4db4e6
jmp 0x4db4ed
mov dword [ebp - 0xc], 2
jmp 0x4db4ed
mov dword [ebp - 0xc], 3
jmp 0x4db4ed
mov dword [ebp - 0xc], 4
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov eax, dword [ebp - 0xc]
push eax
push 0xffffffffffffffff
push esi
call sub.advapi32.dll_ChangeServiceConfigA
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne case.0x4db2f0.0
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x4db556
cmp dword [ebp - 0x2c], 1
jne 0x4db556
push esi
call sub.advapi32.dll_DeleteService
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4db556
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
test bl, bl
jne 0x4db567
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
mov eax, dword [ebp - 0x2c]
sub eax, 4
je 0x4db578
sub eax, 3
jne case.0x4db2f0.0
lea eax, [ebp - 0x30]
push eax
push 1
push esi
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4db59b
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp case.0x4db2f0.0
xor eax, eax
mov dword [ebp - 8], eax
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov edi, eax
push 0x3e8
push edi
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 0x30]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4db5d8
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp 0x4db615
cmp dword [ebp - 0x2c], 1
jne 0x4db5fd
xor eax, eax
mov dword [ebp - 0x10], eax
push esi
call sub.advapi32.dll_DeleteService
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4db615
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 4], eax
jmp 0x4db615
add dword [ebp - 8], 1
jno 0x4db608
call fcn.00403b58
cmp dword [ebp - 8], 0xa
jle 0x4db5af
mov dword [ebp - 4], 0x41d
push edi
call sub.kernel32.dll_CloseHandle_1
push esi
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4db63f
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4db65c
lea eax, [ebp - 0x34]
call fcn.00404a2c
ret