Function at 0x420700
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cd6cd
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x514080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0x10000
push 0xf003f
call fcn.00421640
mov ebx, eax
mov dword [ebp - 0x28], 0x4ef498
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], 0
test ebx, ebx
je 0x420887
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4208be
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x1c], esi
call fcn.0042b190
cmp byte [eax + 0x1c], 0
je 0x42088a
call fcn.0042b190
test byte [eax + 0x20], 8
je 0x42088a
call fcn.0042b190
mov ebx, eax
call fcn.004046f0
mov edi, eax
test edi, edi
je 0x4209c5
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x18]
push 0x21
push str.DeleteService_failed_error_code:
call fcn.004025b0
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x18]
call fcn.0042ae40
mov dword [ebp - 0x20], eax
call fcn.004046f0
mov edi, eax
test edi, edi
je 0x4209c5
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x14]
push 0
push 0x4ec684
call fcn.004025b0
push ecx
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push ecx
push eax
mov ecx, ebx
call fcn.0042b520
mov byte [ebp - 4], 3
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x14]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x42085c
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x420884
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x28], 0x4ef498
test ebx, ebx
je 0x4208aa
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x24], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0042b190
cmp byte [eax + 0x1c], 0
je 0x4209be
call fcn.0042b190
test byte [eax + 0x20], 8
je 0x4209be
call fcn.0042b190
mov ebx, eax
call fcn.004046f0
mov edi, eax
test edi, edi
je 0x4209c5
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x14]
push 0x15
push str.DeleteService_SUCCESS
call fcn.004025b0
call fcn.004046f0
mov edi, eax
test edi, edi
je 0x4209c5
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x18]
push 0
push 0x4ec684
call fcn.004025b0
push ecx
lea eax, [ebp - 0x14]
push eax
push ecx
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
call fcn.0042b520
mov byte [ebp - 4], 0xd
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x18]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x420993
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4209bb
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
mov ebx, dword [ebp - 0x10]
xor esi, esi
jmp 0x42088a
push 0x80004005
call fcn.00402720
int3