Function at 0x4026b0
Capabilities:
Pause service
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x834
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x82c], ecx
mov bl, dl
mov dword [ebp - 0x828], edi
nop word [eax + eax]
mov ecx, dword [ecx]
mov edx, str.Name
call fcn.0040a560
mov ecx, eax
call fcn.00409990
test edi, edi
jne 0x402711
test bl, bl
je 0x402715
lea edx, [ebp - 0x408]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx], cl
lea edx, [edx + 1]
test cl, cl
jne 0x402701
jmp 0x402740
test bl, bl
je 0x40272c
push eax
lea eax, [ebp - 0x408]
push str._s_Watcher
push eax
call fcn.004010e0
add esp, 0xc
jmp 0x402740
lea edx, [ebp - 0x408]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx], cl
lea edx, [edx + 1]
test cl, cl
jne 0x402732
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
lea eax, [ebp - 0x408]
mov dword [ebp - 0x830], esi
test esi, esi
je 0x402956
push 0xf01ff
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x4027cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x828]
cmp eax, 0x424
jne 0x40279e
test edi, edi
jne 0x402795
test bl, bl
je 0x4027b9
jmp 0x40279e
cmp edi, 1
jne 0x40279e
test bl, bl
jne 0x4027b9
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x808]
push str.Could_not_open_Service_Control_Manager_to_stop___s__service.
push eax
call fcn.004010e0
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x40296b
jmp 0x40290d
lea eax, [ebp - 0x824]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov esi, eax
test esi, esi
je 0x402934
mov eax, dword [ebp - 0x820]
test bl, bl
je 0x40281c
cmp eax, 4
je 0x40287c
cmp eax, 2
je 0x40287c
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov esi, eax
test esi, esi
jne 0x402870
lea eax, [ebp - 0x408]
push eax
push str.ControlService_failed_to_start___s__service.
jmp 0x402861
cmp eax, 1
je 0x40287c
cmp eax, 3
je 0x40287c
mov eax, dword [ebp - 0x82c]
push 1
push 2
push str.Running
push dword [eax]
call fcn.0040a2c0
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, eax
test esi, esi
jne 0x402870
lea eax, [ebp - 0x408]
push eax
push str.ControlService_failed_to_stop___s__service.
lea eax, [ebp - 0x808]
push eax
call fcn.004010e0
add esp, 0xc
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call eax
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
je 0x4028f6
xor esi, esi
nop dword [eax]
lea eax, [ebp - 0x824]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4028f6
mov eax, dword [ebp - 0x820]
cmp eax, 1
jne 0x4028bf
test bl, bl
jne 0x4028c8
lea eax, [ebp - 0x408]
push eax
push str.Service___s__successfully_stopped.
jmp 0x4028e7
cmp eax, 4
jne 0x4028c8
test bl, bl
jne 0x4028db
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 9
jl 0x402890
jmp 0x4028f6
lea eax, [ebp - 0x408]
push eax
push str.Service___s__successfully_started.
lea eax, [ebp - 0x808]
push eax
call fcn.004010e0
add esp, 0xc
push dword [ebp - 0x830]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov edi, dword [ebp - 0x828]
mov ecx, dword [ebp - 0x82c]
inc edi
mov dword [ebp - 0x828], edi
cmp edi, 2
jl 0x4026e0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x830]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call ebx
push edi
call ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push eax
lea eax, [ebp - 0x808]
push str.Could_not_open_Service_Control_Manager_to_stop___s__service
push eax
call fcn.004010e0
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412814
mov esp, ebp
pop ebp
ret