Function at 0x4864f0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x654e14]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
neg edi
sbb edi, edi
add edi, 3
cmp eax, 0xffffffff
jne 0x486510
call fcn.004873e0
mov ebx, dword [ebp + 8]
cmp eax, 2
mov ecx, 0x110
mov edx, 0x10
cmovg ecx, edx
cmp dword [0x665124], 0
mov dword [ebp + 0x1c], ecx
je 0x4865a5
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.004766b0
add esp, 8
push 4
push dword [eax]
push dword [0x665124]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00590bc0
add esp, 4
test eax, eax
je 0x4865a5
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486582
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00479a10
add esp, 8
cmp dword [ebp + 0x14], 0
jne 0x4865af
push ebx
push str.Service__s_already_existed
push 0x550003
call fcn.00479a10
add esp, 0xc
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14], 0
je 0x486672
or esi, 0xffffffff
cmp dword [0x665124], 0
je 0x486647
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.004766b0
add esp, 8
push 0x10000
push dword [eax]
push dword [0x665124]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00590bc0
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x486647
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x48661b
push ebx
push str.Failed_deleting_service__s:__m
push 0x550003
call fcn.00479a10
add esp, 0xc
jmp 0x48661d
xor esi, esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x48666a
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00479a10
add esp, 8
jmp 0x48666a
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x48665e
call fcn.00596e90
mov esi, dword [eax]
sub esi, 0x424
neg esi
sbb esi, esi
test esi, esi
jne 0x48659b
push dword [ebp + 0x10]
push edi
push dword [ebp + 0x1c]
push 0xf01ff
push dword [ebp + 0xc]
push ebx
call fcn.00487030
push eax
call fcn.00590bc0
add esp, 0x1c
test eax, eax
jne 0x48672b
push ebx
push str.Failed_creating_service__s:__m
push 0x550003
call fcn.00479a10
mov esi, dword [ebp + 0x18]
add esp, 0xc
test esi, esi
je 0x486720
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x4866c9
call fcn.00596e90
cmp dword [eax], 0x430
jne 0x486720
push esi
push str.Trying_again_in__d_ms
push 0x550003
call fcn.00479a10
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 0x10]
push edi
push dword [ebp + 0x1c]
push 0xf01ff
push dword [ebp + 0xc]
push ebx
call fcn.00487030
push eax
call fcn.00590bc0
add esp, 0x1c
test eax, eax
jne 0x48672b
push ebx
push str.Failed_creating_service__s_after_timeout:__m
push 0x550003
call fcn.00479a10
add esp, 0xc
push ebx
push str.Service__s_could_not_be_recreated
jmp 0x48658e
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486751
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00479a10
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret