Function at 0x42ea59
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d2edd
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x64c00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push dword [edi + 4]
push str.KExecService_Run_operation:_d
call fcn.0040ff00
push eax
call fcn.00410290
mov eax, dword [edi + 4]
add esp, 0xc
dec eax
cmp eax, 3
ja case.default.0x42e7af
jmp dword [eax*4 + 0x42ed14]
call fcn.00405800
mov ecx, eax
test ecx, ecx
je 0x42ed07
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x5c], eax
mov dword [ebp - 4], 0
lea edx, [edi + 8]
mov ecx, dword [edx]
cmp dword [ecx - 0xc], 0
je 0x42ea3b
mov ecx, dword [edi + 0x10]
cmp dword [ecx - 0xc], 0
je 0x42ea3b
mov ecx, dword [edi + 0x14]
cmp dword [ecx - 0xc], 0
je 0x42ea3b
mov eax, dword [edi + 0x1c]
xor ecx, ecx
cmp dword [eax - 0xc], ecx
cmove eax, ecx
mov dword [ebp - 0x64], eax
mov eax, dword [edi + 0xc]
cmp dword [eax - 0xc], ecx
jne 0x42e823
push edx
lea ecx, [ebp - 0x5c]
call fcn.00406a90
jmp 0x42e837
push eax
push dword [edx]
lea eax, [ebp - 0x5c]
push str.__s___s
push eax
call fcn.00408c40
add esp, 0x10
push str.KxEInstallService_...
call fcn.0040ff00
push eax
call fcn.00410290
mov eax, dword [edi + 0x18]
add esp, 8
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x58], eax
mov eax, dword [edi + 0x10]
push 2
push 0
push 0
mov dword [ebp - 0x4c], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [ebp - 0x5c]
mov edi, eax
mov dword [ebp - 0x54], edi
test edi, edi
jne 0x42e881
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x42e9ac
mov eax, dword [0x65ca80]
mov ecx, 0x110
mov dword [ebp - 0x60], ecx
test eax, eax
jne 0x42e8a1
call fcn.00416950
mov dword [0x65ca80], eax
mov ecx, 0x110
cmp eax, 8
jne 0x42e8be
call fcn.00416c20
cmp eax, 2
mov ecx, 0x110
mov edx, 0x10
cmove ecx, edx
mov dword [ebp - 0x60], ecx
push 0
push 0
push 0
push 0
push dword [ebp - 0x64]
push esi
push 1
push 2
push ecx
push 0x32
push dword [ebp - 0x58]
push dword [ebp - 0x4c]
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x42e97f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x431
je 0x42e909
call edi
push dword [ebp - 0x54]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x42e9ac
push 2
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x42e931
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push dword [ebp - 0x54]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x42e9ac
push dword [ebp - 0x58]
push 0
push 0
push 0
push 0
push dword [ebp - 0x64]
push esi
push 1
push 2
push dword [ebp - 0x60]
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x42e97f
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push dword [ebp - 0x60]
mov edx, dword [ebp - 0x4c]
mov ecx, esi
push dword [ebp - 0x64]
push dword [ebp - 0x50]
push dword [ebp - 0x58]
call fcn.0044d990
add esp, 0x10
mov edi, eax
push dword [ebp - 0x54]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x42e9ac
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x42e99c
cmp word [eax], 0
je 0x42e99c
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x50]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push dword [ebp - 0x54]
call edi
xor edi, edi
xor eax, eax
test edi, edi
push esi
sete al
push eax
push str.KxEInstallService_return:_d__path:_ws
call fcn.0040ff00
push eax
call fcn.00410290
add esp, 0x10
mov dword [0x65ca18], edi
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test edi, edi
je 0x42ea24
test eax, eax
jg case.default.0x42e7af
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
push esi
push str.KExecService_Run_return:_d
call fcn.0040ff00
push eax
call fcn.00410290
add esp, 0xc
mov eax, esi
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.00483ab6
mov esp, ebp
pop ebp
ret
test eax, eax
jg 0x42ecfd
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, 1
jmp 0x42e9f3
lea edx, [eax - 0x10]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg case.default.0x42e7af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
jmp 0x42e9ee
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x50], eax
cmp dword [eax - 0xc], 0
je case.default.0x42e7af
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x4c], esi
test esi, esi
jne 0x42ea84
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x42eae6
push 0x10000
push dword [ebp - 0x50]
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x42eaad
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x42eae6
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x42ead4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x4c], eax
call esi
push dword [ebp - 0x50]
call esi
mov esi, dword [ebp - 0x4c]
jmp 0x42eae6
push dword [ebp - 0x50]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x4c]
call esi
xor esi, esi
push dword [edi + 0x10]
xor eax, eax
test esi, esi
sete al
push eax
push str.KxEUninstallService_return:_d__name:_ws
jmp 0x42ece7
mov eax, dword [edi + 0x10]
cmp dword [eax - 0xc], 0
je case.default.0x42e7af
push str.KxEStartService_...
call fcn.0040ff00
push eax
call fcn.00410290
mov esi, dword [edi + 0x10]
add esp, 8
push 0x40000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x42eb41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x42ebcc
push 0x14
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x50], esi
test esi, esi
jne 0x42eb67
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x42ebcc
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x2c], xmm0
movq qword [ebp - 0x1c], xmm0
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x42eb8f
cmp dword [ebp - 0x28], 4
je 0x42ebca
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x42ebbc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x58], eax
call esi
push dword [ebp - 0x50]
call esi
mov esi, dword [ebp - 0x58]
jmp 0x42ebcc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x4c]
call esi
xor esi, esi
push dword [edi + 0x10]
xor eax, eax
test esi, esi
sete al
push eax
push str.KxEStartService_return:_d__name:_ws
jmp 0x42ece7
mov esi, dword [edi + 0x10]
cmp dword [esi - 0xc], 0
je case.default.0x42e7af
push 0x40000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x42ec11
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x42ecd7
push 0x24
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x50], esi
test esi, esi
jne 0x42ec3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x42ecd7
lea eax, [ebp - 0x48]
mov dword [ebp - 0x30], 0
push eax
xorps xmm0, xmm0
push 1
push esi
movups xmmword [ebp - 0x48], xmm0
movq qword [ebp - 0x38], xmm0
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x42ec77
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x54], eax
call esi
push dword [ebp - 0x50]
jmp 0x42ecd2
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x54], 0
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
push eax
push esi
movups xmmword [ebp - 0x2c], xmm0
movq qword [ebp - 0x1c], xmm0
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x42ecbd
cmp dword [ebp - 0x28], 1
je 0x42ecc6
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x42eca0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x54], eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x4c]
call esi
mov esi, dword [ebp - 0x54]
push dword [edi + 0x10]
xor eax, eax
test esi, esi
sete al
push eax
push str.KxEStopService_return:_d__name:_ws
call fcn.0040ff00
push eax
call fcn.00410290
add esp, 0x10
test esi, esi
jne case.default.0x42e7af
mov esi, 1
jmp 0x42e9f3
push 0x80004005
call fcn.00405600
nop dword [eax]
mov dh, 0xe7
inc edx
add byte [ecx - 0x16], bl
inc edx
add bl, bh
ljmp 0x42