Function at 0x409374
Capabilities:
Continue service
Pause service
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
mov ebx, edx
mov esi, eax
push 0xffffffffffffffff
call sub.kernel32.dll_SetLastError
push 0xa0000000
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 4], eax
xor edx, edx
push ebp
push 0x40973b
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [ebp - 4], 0
je 0x4096d8
push 0xf01ff
mov eax, esi
call fcn.00405304
push eax
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 8], eax
xor edx, edx
push ebp
push 0x4096d1
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [ebp - 8], 0
je 0x40965f
mov eax, ebx
sub al, 1
jb 0x4093f3
je 0x40940a
dec al
je 0x409421
dec al
je 0x409438
jmp 0x40944f
lea eax, [ebp - 0xc]
push eax
push 0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_StartServiceA
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x409451
lea eax, [ebp - 0x28]
push eax
push 1
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x409451
lea eax, [ebp - 0x28]
push eax
push 2
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x409451
lea eax, [ebp - 0x28]
push eax
push 3
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x409451
xor eax, eax
test al, al
je 0x4094a9
push 0x3e8
call sub.kernel32.dll_Sleep_1
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x409455
movzx eax, bl
mov eax, dword [eax*4 + 0x460830]
cmp eax, dword [ebp - 0x24]
jne 0x409455
sub bl, 1
jb 0x40948b
je 0x40949a
jmp 0x4096b4
mov eax, 0x409750
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409770
call fcn.004092bc
jmp 0x4096b4
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x420
jg 0x40950f
je 0x4095e4
cmp eax, 0x41c
jg 0x4094f1
je 0x40958a
sub eax, 3
je 0x4095d5
sub eax, 2
je 0x40956c
dec eax
je 0x4095c6
sub eax, 0x415
je 0x40957b
jmp case.0x40951d.1059
sub eax, 0x41d
je 0x4095b7
dec eax
je 0x409647
dec eax
je 0x4095f3
jmp case.0x40951d.1059
add eax, 0xfffffbde
cmp eax, 0x11
ja case.0x40951d.1059
jmp dword [eax*4 + 0x409524]
mov eax, 0x409790
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x4097d8
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409834
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x40988c
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409934
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409960
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x4099b0
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x4099d8
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409a0c
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409a44
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409a64
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409ac4
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409b0c
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409b34
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409b60
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409b94
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409bd0
call fcn.004092bc
jmp 0x4096b4
call sub.kernel32.dll_GetLastError_1
sub eax, 5
je 0x40967a
dec eax
je 0x409686
sub eax, 0x75
je 0x409692
sub eax, 0x3a9
je 0x40969e
jmp 0x4096aa
mov eax, 0x409be8
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x4099b0
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409c4c
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409c7c
call fcn.004092bc
jmp 0x4096b4
mov eax, 0x409bd0
call fcn.004092bc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40971e
cmp dword [ebp - 8], 0
je 0x4096d0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
call sub.kernel32.dll_GetLastError_1
sub eax, 5
je 0x4096f0
sub eax, 0x52
je 0x409708
sub eax, 0x3d2
je 0x4096fc
jmp 0x409714
mov eax, 0x409cac
call fcn.004092bc
jmp 0x40971e
mov eax, 0x409cc4
call fcn.004092bc
jmp 0x40971e
mov eax, 0x409ce4
call fcn.004092bc
jmp 0x40971e
mov eax, 0x409bd0
call fcn.004092bc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409742
cmp dword [ebp - 4], 0
je 0x40973a
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret