Function at 0x40234e
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
xor esi, esi
push 1
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x402586
push edi
mov edi, str.Service
push edi
lea ecx, [ebp - 0x14]
call fcn.00402785
lea eax, [ebp - 0x14]
lea ecx, [ebp - 1]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040283d
mov ecx, eax
call fcn.00402abe
mov eax, dword [eax]
push 0x10024
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 8], eax
call fcn.00402776
lea ecx, [ebp - 0x14]
call fcn.00402776
cmp dword [ebp - 8], esi
je 0x40255c
mov esi, 0x4074d0
push esi
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4024dc
push ebx
push edi
lea ecx, [ebp - 0x14]
call fcn.00402785
lea eax, [ebp - 0x14]
lea ecx, [ebp - 1]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040288f
mov ecx, eax
call fcn.00402b12
push dword [eax + 4]
push dword [eax]
push str.Stopping__s.
call fcn.00401c58
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.00402776
lea ecx, [ebp - 0x14]
call fcn.00402776
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call ebx
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x402452
cmp dword [0x4074d4], 3
jne 0x402452
push 0x407124
call fcn.00401c58
mov dword [esp], 0x3e8
jmp 0x402426
cmp dword [0x4074d4], 1
pop ebx
push edi
jne 0x40249b
lea ecx, [ebp - 0x14]
call fcn.00402785
lea eax, [ebp - 0x14]
lea ecx, [ebp - 1]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040288f
mov ecx, eax
call fcn.00402b12
push dword [eax + 4]
push dword [eax]
push str._n_s_stopped._n
call fcn.00401c58
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.00402776
lea ecx, [ebp - 0x14]
jmp 0x4024d7
lea ecx, [ebp - 0x14]
call fcn.00402785
lea eax, [ebp - 0x14]
lea ecx, [ebp - 1]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040288f
mov ecx, eax
call fcn.00402b12
push dword [eax + 4]
push dword [eax]
push str._n_s_failed_to_stop._n
call fcn.00401c58
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.00402776
lea ecx, [ebp - 0x14]
call fcn.00402776
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x402533
push edi
lea ecx, [ebp - 0x14]
call fcn.00402785
lea eax, [ebp - 0x14]
lea ecx, [ebp - 1]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040288f
mov ecx, eax
call fcn.00402b12
push dword [eax + 4]
push dword [eax]
push str._s_removed._n
call fcn.00401c58
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.00402776
cmp byte [ebp - 0x10], 0
je 0x402551
push dword [ebp - 0x14]
call fcn.004016ff
jmp 0x402550
push 0x100
push 0x4073c8
call fcn.00402674
pop ecx
pop ecx
push eax
push str.DeleteService_failed____s_n
call fcn.00401c58
pop ecx
pop ecx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40257a
push 0x100
push 0x4073c8
call fcn.00402674
pop ecx
pop ecx
push eax
push str.OpenService_failed____s_n
call fcn.00401c58
pop ecx
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
jmp 0x4025a4
push 0x100
push 0x4073c8
call fcn.00402674
pop ecx
pop ecx
push eax
push str.OpenSCManager_failed____s_n
call fcn.00401c58
pop ecx
pop ecx
pop esi
leave
ret