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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x75fba0
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x88bba0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0xf003f
xorps xmm0, xmm0
mov dword [ebp - 0x5c], 0
push 0
push 0
movdqu xmmword [ebp - 0x58], xmm0
movq qword [ebp - 0x48], xmm0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x406659
push 0x36
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], eax
push str.SCM_has_not_been_opened_for__s_service_removal_GLE_lu
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x28], al
call fcn.0042fb60
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x78]
call fcn.00483380
mov edi, eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x799de0
mov ecx, edi
mov esi, eax
call fcn.00483720
push esi
mov ecx, edi
call fcn.00483710
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.00483750
mov byte [ebp - 4], 2
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0x2c], 0x10
jb 0x40661c
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x78]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0x10
jb 0x406652
push dword [ebp - 0x28]
call fcn.00489b60
add esp, 4
xor eax, eax
jmp 0x4068de
push 0xf01ff
push 0x799de0
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x40673b
push str._s_service_cant_be_opened_GLE_lu
lea ecx, [ebp - 0x28]
call fcn.00404f70
mov dword [ebp - 4], 3
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x78]
call fcn.00483380
mov edi, eax
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x799de0
mov ecx, edi
mov esi, eax
call fcn.00483720
push esi
mov ecx, edi
call fcn.00483710
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.00483750
mov byte [ebp - 4], 5
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 4
cmp dword [ebp - 0x2c], 0x10
jb 0x4066e3
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x78]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0x10
jb 0x406719
push dword [ebp - 0x28]
call fcn.00489b60
add esp, 4
push dword [ebp - 0x7c]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4068f0
lea eax, [ebp - 0x5c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40675f
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [ebp - 0x7c]
call esi
xor eax, eax
jmp 0x4068f0
cmp dword [ebp - 0x58], 1
je 0x40679d
lea eax, [ebp - 0x5c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40674a
xor esi, esi
lea eax, [ebp - 0x5c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x58], 1
je 0x40679d
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0xf0
jl 0x406778
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x406836
push str._s_service_cant_be_deleted_GLE_lu
lea ecx, [ebp - 0x28]
call fcn.00404f70
mov dword [ebp - 4], 6
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x78]
call fcn.00483380
mov edi, eax
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x799de0
mov ecx, edi
mov esi, eax
call fcn.00483720
push esi
mov ecx, edi
call fcn.00483710
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.00483750
mov byte [ebp - 4], 8
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 7
cmp dword [ebp - 0x2c], 0x10
jb 0x40681b
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 6
jmp 0x4066f9
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [ebp - 0x7c]
call esi
push str._s_service_has_been_removed
lea ecx, [ebp - 0x28]
call fcn.00404f70
mov dword [ebp - 4], 9
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x78]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 0xa
mov ecx, esi
push 0x799de0
call fcn.00483720
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 0xb
push eax
call fcn.00480c90
add esp, 4
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x2c], 0x10
jb 0x4068a3
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x78]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0x10
jb 0x4068d9
push dword [ebp - 0x28]
call fcn.00489b60
add esp, 4
mov eax, 1
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00722035
mov esp, ebp
pop ebp
ret