Function at 0x40a840
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 8]
push 1
push str.Deleting_a_service_can_prevent_the_system_from_starting_or_functioning_properly.
mov byte [esp + 0x1a], 0
push dword [eax + 4]
push 0x5cdd9c
push edi
call sym.SystemInformer.exe_PhShowConfirmMessage
test al, al
jne 0x40a87c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword ds:[ebx + 8]
test eax, eax
je 0x40a889
mov eax, dword [eax + 4]
jmp 0x40a88b
xor eax, eax
push eax
push 0x10000
lea eax, [esp + 0x1c]
push eax
call sym.SystemInformer.exe_PhOpenService
mov esi, eax
test esi, esi
js 0x40a8ee
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x40a8fa
cmp dword [0x62ebb0], 0xffffffff
jae 0x40a8cb
mov eax, dword fs:[0x18]
mov ebx, dword [esp + 0x14]
mov eax, dword [eax + 0x34]
jmp 0x40a8d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test esi, esi
jns 0x40a8fa
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [ebp + 0xc]
mov byte [esp + 0x12], 0
mov eax, dword [ebx + 8]
test eax, eax
je 0x40a913
mov eax, dword [eax + 4]
jmp 0x40a915
push ebx
mov byte [esp + 0x16], 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
push eax
push str.Unable_to_delete
call sym.SystemInformer.exe_PhConcatStrings2
push eax
call sym.SystemInformer.exe_PhAutoDereferenceObject
lea ecx, [esp + 0x13]
push ecx
push esi
mov edx, dword [eax + 4]
mov ecx, edi
call fcn.00401880
test al, al
je 0x40a9a7
cmp byte [esp + 0x13], 0
je 0x40aaa8
mov eax, dword [ebx + 8]
test eax, eax
je 0x40a956
mov ecx, dword [eax + 4]
jmp 0x40a958
xor ecx, ecx
mov edx, 5
call fcn.0047d6e0
test eax, eax
js 0x40a983
mov byte [esp + 0x12], 1
call sym.SystemInformer.exe__PhUiDisconnectFromPhSvc_0
mov al, byte ds:[esp + 0x12]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push ecx
push eax
push ebx
mov edx, 0x5cdd9c
mov ecx, edi
lfence
call fcn.004087e0
call sym.SystemInformer.exe__PhUiDisconnectFromPhSvc_0
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 8]
push dword [eax + 4]
push 0x5cdd9c
push str.Unable_to__s__s.
call fcn.00401820
add esp, 0xc
mov ebx, dword [eax + 4]
cmp esi, 0xc0000022
je 0x40a9fe
cmp esi, 0xc0000005
je 0x40a9fe
mov eax, esi
and eax, 0xfff0000
cmp eax, 0x70000
jne 0x40a9ec
movzx eax, si
jmp 0x40aa06
mov eax, esi
and eax, 0xfff0000
cmp eax, 0xb0000
jne 0x40aa0a
mov eax, esi
jmp 0x40aa06
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosErrorNoTeb]
test eax, eax
jne 0x40aa12
push esi
call sym.SystemInformer.exe_PhGetNtMessage
jmp 0x40aa18
push eax
call sym.SystemInformer.exe_PhGetWin32Message
mov esi, eax
test ebx, ebx
je 0x40aa38
mov edi, edi
test esi, esi
je 0x40aa2b
mov eax, 0x21
jmp 0x40aa46
push ebx
push 0x5cd56c
push 0x5cbc90
jmp 0x40aa97
test esi, esi
je 0x40aa88
mov eax, 9
mov ebx, 0x5cbc90
mov edx, 4
mov ecx, esi
push dword [edx + ecx]
push 0x5cd56c
push ebx
push 0xfffe
push eax
push edi
call sym.SystemInformer.exe_PhShowMessage2
add esp, 0x18
lea ecx, [esi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x40aaa8
call fcn.004fc020
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x5cbc90
push 0x5cd56c
push str.Unable_to_perform_the_operation.
push 0xfffe
push 9
push edi
call sym.SystemInformer.exe_PhShowMessage2
add esp, 0x18
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8