Function at 0x422d87
Capabilities:
Delete service

Disassembly:
push 0x50
mov eax, 0x4d0a03
call fcn.004b4442
push ecx
mov ebx, ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
add ebx, 0xc
push dword [ebx]
xor esi, esi
push str.ScmDirectStop:__s:_browsing_virt_services_under_the_real_Services_key
push eax
mov dword [ebp - 0x14], esi
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
lea eax, [ebp - 0x5c]
push eax
call fcn.00425c8e
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 4], esi
call fcn.00425c8e
push esi
push 1
push 1
lea eax, [ebp - 0x5c]
push eax
push ecx
mov byte [ebp - 4], 1
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str.SystemCurrentControlSetServices
call fcn.004235bf
push SysReAllocStringLen
call fcn.0046a120
add esp, 0x18
cmp eax, esi
jne 0x422e40
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push str.ScmDirectStop:_failed_listing_Services_regkey__LE_d
push ecx
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
inc esi
lea eax, [ebp - 0x44]
push eax
mov byte [ebp - 4], 0
call fcn.0042392d
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x5c]
push eax
call fcn.0042392d
mov eax, esi
call fcn.004b451a
ret
mov esi, dword [ebp - 0x50]
cmp esi, dword [ebp - 0x4c]
jbe 0x422e4d
call fcn.004ae7f1
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x4c]
cmp dword [ebp - 0x50], esi
jbe 0x422e63
call fcn.004ae7f1
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x28], esi
lea edi, [ebp - 0x2c]
lea esi, [ebp - 0x24]
mov dword [ebp - 0x2c], eax
call fcn.00423b74
test al, al
je 0x422f02
call fcn.00423af6
push eax
lea ecx, [ebp - 0x10]
call fcn.00423cb9
push ecx
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0x1c], esp
push ebx
call fcn.004235aa
push ecx
mov byte [ebp - 4], 3
lea eax, [ebp - 0x10]
mov dword [ebp - 0x18], esp
mov ecx, esp
push eax
call fcn.00423cb9
mov byte [ebp - 4], 2
call fcn.00421c2c
mov esi, dword [ebp - 0x10]
pop ecx
pop ecx
test eax, eax
je 0x422ee9
push ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
push esi
push str.ScmDirectStop:_found_virtual_service_related_to_this_app:__s
push eax
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x44]
call fcn.00423959
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.0042101a
lea esi, [ebp - 0x24]
call fcn.00423b49
jmp 0x422e56
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x38]
sub eax, esi
test eax, 0xfffffffc
jne 0x422f19
push 5
pop esi
jmp 0x422e1e
cmp esi, dword [ebp - 0x34]
jbe 0x422f23
call fcn.004ae7f1
mov eax, dword [ebp - 0x44]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x34]
cmp dword [ebp - 0x38], esi
jbe 0x422f3f
call fcn.004ae7f1
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], esi
lea edi, [ebp - 0x2c]
lea esi, [ebp - 0x24]
mov dword [ebp - 0x2c], eax
call fcn.00423b74
test al, al
je 0x4231c6
call fcn.00423af6
push eax
lea ecx, [ebp - 0x10]
call fcn.00423cb9
xor esi, esi
mov byte [ebp - 4], 4
cmp dword [ebp - 0x14], esi
jne 0x422f8c
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], eax
cmp eax, esi
je 0x4230d3
push ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
push dword [ebp - 0x10]
push str.ScmDirectStop:_stopping_virtual_service__s
push eax
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.00473190
pop ecx
pop ecx
test eax, eax
jne 0x422fd7
call ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push str.ScmDirectStop:_DoStopSvc_failed__Proceeding_anyways._LE_d
push ecx
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
cmp dword [ebp + 8], esi
je 0x4230b7
push 0x10020
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, esi
jne 0x423010
call ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push str.ScmDirectStop:_OpenService_failed__LE_d
push ecx
call fcn.00468700
add esp, 0xc
jmp 0x42307d
push ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
push dword [ebp - 0x10]
push str.ScmDirectStop:_DeleteService__s_
push eax
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
jne 0x4230b7
call ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push str.ScmDirectStop:_DeleteService_failed__LE_d_._Forcing_Registry_removal.
push ecx
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
lea eax, [ebp - 0x10]
call fcn.00423705
mov eax, dword [eax]
cmp dword [eax - 0xc], esi
jne 0x423085
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str._ScmDirectStop:_PANIC_check__SvcName_regKey_empty__
call fcn.004235bf
call fcn.00421d03
pop ecx
jmp 0x4230b7
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push str.SystemCurrentControlSetServices_
push eax
call fcn.00423863
add esp, 0xc
mov byte [ebp - 4], 7
push dword [eax]
push SysReAllocStringLen
call fcn.00469b50
pop ecx
pop ecx
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0042101a
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0042101a
lea esi, [ebp - 0x24]
call fcn.00423b49
jmp 0x422f32
call ebx
cmp eax, 5
jne 0x4231a7
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, eax
call fcn.00466e50
test eax, eax
jne 0x4231a7
or dword [ebp - 0x14], 0xffffffff
mov eax, str._SvcRemove
cmp dword [ebp + 8], esi
jne 0x423106
mov eax, str._SvcStop
push esi
lea ecx, [ebp - 0x14]
push ecx
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push str._Quiet__s
push ecx
call fcn.00468700
add esp, 8
mov byte [ebp - 4], 5
mov eax, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004671a0
pop ecx
mov byte [ebp - 4], 4
call fcn.004669c0
add esp, 0x14
cmp eax, esi
je 0x423157
cmp dword [ebp - 0x14], esi
jne 0x423157
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0042101a
jmp 0x422e1e
push dword [ebp - 0x14]
lea eax, [ebp - 0x1c]
push eax
call fcn.0046fec0
pop ecx
pop ecx
mov esi, eax
mov byte [ebp - 4], 6
call ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
push dword [esi]
push str.ScmDirectStop:_FAILED_elevating_process_for_opening_SCM:_ApiRet_s__LE_d
push ecx
call fcn.00468700
add esp, 0x10
call fcn.00421d03
pop ecx
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.0042101a
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0042101a
push 0x11
jmp 0x422f13
call ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
push str.ScmDirectStop:_FAILED_opening_SCM:_LE_d
push ecx
call fcn.00468700
add esp, 0xc
call fcn.00421d03
pop ecx
jmp 0x423195
xor esi, esi
cmp dword [ebp - 0x14], esi
je 0x422e1e
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x422e1e