Function at 0x42f420
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5eaa74]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
neg edi
sbb edi, edi
add edi, 3
cmp eax, 0xffffffff
jne 0x42f440
call fcn.00430320
mov ebx, dword [ebp + 8]
cmp eax, 2
mov ecx, 0x110
mov edx, 0x10
cmovg ecx, edx
cmp dword [0x5fac2c], 0
mov dword [ebp + 0x1c], ecx
je 0x42f4d5
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.0041fa40
add esp, 8
push 4
push dword [eax]
push dword [0x5fac2c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00539bc0
add esp, 4
test eax, eax
je 0x42f4d5
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f4b2
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00422d60
add esp, 8
cmp dword [ebp + 0x14], 0
jne 0x42f4df
push ebx
push str.Service__s_already_existed
push 0x550003
call fcn.00422d60
add esp, 0xc
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14], 0
je 0x42f5ab
or esi, 0xffffffff
cmp dword [0x5fac2c], 0
jne 0x42f4ef
xor eax, eax
jmp 0x42f51b
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.0041fa40
add esp, 8
push 0x10000
push dword [eax]
push dword [0x5fac2c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00539bc0
add esp, 4
push eax
call fcn.00539bc0
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x42f550
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x42f542
call fcn.0053fcd2
mov esi, dword [eax]
sub esi, 0x424
neg esi
sbb esi, esi
jmp 0x42f5a3
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f579
push ebx
push str.Failed_deleting_service__s:__m
push 0x550003
call fcn.00422d60
add esp, 0xc
jmp 0x42f57b
xor esi, esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f5a3
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00422d60
add esp, 8
test esi, esi
jne 0x42f4cb
push dword [ebp + 0x10]
push edi
push dword [ebp + 0x1c]
push 0xf01ff
push dword [ebp + 0xc]
push ebx
call fcn.0042fea0
push eax
call fcn.00539bc0
add esp, 0x1c
test eax, eax
jne 0x42f664
push ebx
push str.Failed_creating_service__s:__m
push 0x550003
call fcn.00422d60
mov esi, dword [ebp + 0x18]
add esp, 0xc
test esi, esi
je 0x42f659
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x42f602
call fcn.0053fcd2
cmp dword [eax], 0x430
jne 0x42f659
push esi
push str.Trying_again_in__d_ms
push 0x550003
call fcn.00422d60
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.0042fea0
push eax
call fcn.00539bc0
add esp, 0x1c
test eax, eax
jne 0x42f664
push ebx
push str.Failed_creating_service__s_after_timeout:__m
push 0x550003
call fcn.00422d60
add esp, 0xc
push ebx
push str.Service__s_could_not_be_recreated
jmp 0x42f4be
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f68a
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00422d60
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret