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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [0x4214a4], eax
test eax, eax
jne 0x4027e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
push 0x4215d4
call fcn.00404560
mov esi, dword [0x4215d4]
add esp, 8
mov ebx, esp
mov dword [ebp - 4], ebx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x4027c6
cmp ecx, dword [esi - 0x10]
jne 0x4027c6
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x40296c
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4029b2
mov ecx, dword [esi - 0xc]
mov dword [edi + 4], ecx
jmp 0x40295b
push 0x10024
push 0x41dab0
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [0x4214a0], eax
test eax, eax
jne 0x40280f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed_w_err_0x_08lx_n
jmp 0x40278b
push 0x421480
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
js 0x4028f2
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
xor esi, esi
nop word [eax + eax]
push 0x421480
push dword [0x4214a0]
call ebx
test eax, eax
je 0x402868
mov eax, dword [0x421484]
cmp eax, 3
jne 0x40286d
push 0x1f4
call edi
inc esi
cmp esi, 0x14
jl 0x402840
mov eax, dword [0x421484]
push 0x41db10
cmp eax, 1
jne 0x40287e
push str._s_is_stopped._n
jmp 0x402883
push str._s_failed_to_stop._n
push 0x4215d4
call fcn.00404560
mov esi, dword [0x4215d4]
add esp, 8
mov ebx, esp
mov dword [ebp - 4], ebx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x4028bb
cmp ecx, dword [esi - 0x10]
jne 0x4028bb
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x4028e5
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4029b2
mov ecx, dword [esi - 0xc]
mov dword [edi + 4], ecx
lea ecx, [edi + 0x10]
mov edx, dword [esi - 0xc]
inc edx
push edx
push esi
call fcn.00404370
add esp, 8
lea eax, [edi + 0x10]
mov dword [ebx], eax
call fcn.00401710
add esp, 4
push dword [0x4214a0]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jns 0x402979
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeleteService_failed_w_err_0x_08lx_n
push 0x4215d4
call fcn.00404560
mov esi, dword [0x4215d4]
add esp, 8
mov ebx, esp
mov dword [ebp - 4], ebx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x402946
cmp ecx, dword [esi - 0x10]
jne 0x402946
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x40296c
mov eax, dword [ecx]
push 1
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4029b2
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
lea ecx, [edi + 0x10]
inc edx
push edx
push esi
call fcn.00404370
add esp, 8
lea eax, [edi + 0x10]
mov dword [ebx], eax
call fcn.00401710
add esp, 4
mov eax, dword [0x4214a4]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x402995
push eax
call esi
mov dword [0x4214a4], 0
mov eax, dword [0x4214a0]
test eax, eax
je 0x4029ab
push eax
call esi
mov dword [0x4214a0], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00404160
int3