Function at 0x10053a85
Capabilities:
Delete service

Disassembly:
push 0x30
mov eax, 0x10165cc5
call fcn.10163edf
push 0xf003f
xor ebx, ebx
push ebx
push ebx
mov dword [ebp - 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x38], edi
mov dword [ebp - 4], ebx
test edi, edi
je 0x10053cbb
push sym.PrintConfig.dll_Ordinal_276
push str.PrintNotify
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 1
test esi, esi
jne 0x10053b40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0x424
je 0x10053b1e
test ebx, ebx
jle 0x10053af0
movzx ebx, bx
or ebx, 0x80070000
test ebx, ebx
jns 0x10053b1e
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10053b18
test byte [eax + 0x44], 1
je 0x10053b18
push ebx
push dword [eax + 0x3c]
mov edx, 0x1001a7e0
push dword [eax + 0x38]
push 0x21
pop ecx
call fcn.100401e4
push ebx
jmp 0x10053cf7
mov eax, dword [0x101923c0]
mov ebx, 0x101923c0
cmp eax, ebx
je 0x10053bb4
test byte [eax + 0x44], 0x10
je 0x10053bb4
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x22
jmp 0x10053ba9
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x10053b8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10053b60
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10053cf6
test byte [eax + 0x44], 1
je 0x10053cf6
push esi
push dword [eax + 0x3c]
mov edx, 0x1001a7e0
push dword [eax + 0x38]
push 0x23
jmp 0x10053cf0
mov eax, dword [0x101923c0]
mov ebx, 0x101923c0
cmp eax, ebx
je 0x10053bb4
test byte [eax + 0x44], 0x40
je 0x10053bb4
push dword [eax + 0x3c]
push dword [eax + 0x38]
push 0x24
mov edx, 0x1001a7e0
pop ecx
call fcn.10040067
sub esp, 0xc
lea ecx, [ebp - 0x34]
call fcn.100529a2
mov ecx, str.print
mov byte [ebp - 4], 2
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x30]
jne 0x10053bdb
sub ecx, edx
sar ecx, 1
push ecx
push str.print
lea ecx, [ebp - 0x2c]
call fcn.10045aa5
mov byte [ebp - 4], 3
lea edx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
call fcn.1005d498
xor eax, eax
mov byte [ebp - 4], 2
push eax
push 1
lea ecx, [ebp - 0x2c]
call fcn.10045ee3
mov ecx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHostprint
mov dword [ebp - 0x18], 7
xor eax, eax
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x30]
jne 0x10053c31
sub ecx, edx
sar ecx, 1
push ecx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHostprint
lea ecx, [ebp - 0x2c]
call fcn.10045aa5
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 4
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.1005d35e
xor eax, eax
lea ecx, [ebp - 0x2c]
push eax
push 1
call fcn.10045ee3
mov eax, dword [0x101923c0]
cmp eax, ebx
je 0x10053c8f
test byte [eax + 0x44], 0x40
je 0x10053c8f
push dword [eax + 0x3c]
mov edx, 0x1001a7e0
push dword [eax + 0x38]
push 0x25
pop ecx
call fcn.10040067
cmp dword [ebp - 0x34], 0
je 0x10053ca3
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov dword [ebp - 0x34], eax
test esi, esi
je 0x10053cae
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.10163e8e
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10053cd0
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10053cf6
test byte [eax + 0x44], 1
je 0x10053cf6
push esi
push dword [eax + 0x3c]
mov edx, 0x1001a7e0
push dword [eax + 0x38]
push 0x20
pop ecx
call fcn.100401e4
push esi
lea ecx, [ebp - 0x30]
call fcn.1003f8d8
push 0x10191580
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
int3