Function at 0x14002ad60
Capabilities:
Delete service
Query service status

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x14021b0e0]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdi, rax
test rax, rax
jne 0x14002ae3c
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], edi
je 0x14002ae16
xor edx, edx
xor ecx, ecx
mov r8d, 0x400001cf
call qword [sym.imp.USER32.dll_OpenInputDesktop]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call qword [sym.imp.USER32.dll_GetThreadDesktop]
mov rbx, rax
test rdi, rdi
je 0x14002ae32
test rax, rax
je 0x14002ae32
cmp rax, rdi
je 0x14002ae32
mov rcx, rdi
call qword [sym.imp.USER32.dll_SetThreadDesktop]
mov r9d, reloc.WS2_32.dll_recv
lea r8, str.UltraVNC
lea rdx, str.Failed_to_open_service_control_manager
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rbx
call qword [sym.imp.USER32.dll_SetThreadDesktop]
mov rcx, rdi
call qword [sym.imp.USER32.dll_CloseDesktop]
mov eax, 1
jmp 0x14002b138
mov r9d, reloc.WS2_32.dll_recv
lea r8, str.UltraVNC
lea rdx, str.Failed_to_open_service_control_manager
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
jmp 0x14002b138
mov r8d, 0x10004
mov qword [rsp + 0x68], rsi
lea rdx, [0x14021bd30]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbx, rax
test rax, rax
jne 0x14002afa1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x14002aeda
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], ebx
je 0x14002aece
xor edx, edx
xor ecx, ecx
mov r8d, 0x400001cf
call qword [sym.imp.USER32.dll_OpenInputDesktop]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call qword [sym.imp.USER32.dll_GetThreadDesktop]
mov rbx, rax
test rsi, rsi
je 0x14002af8e
test rax, rax
je 0x14002af8e
cmp rax, rsi
je 0x14002af8e
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetThreadDesktop]
lea rdx, str.Failed:_Permission_denied
jmp 0x14002af38
lea rdx, str.Failed:_Permission_denied
jmp 0x14002af79
cmp eax, 0x424
je 0x14002af8e
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], 0
je 0x14002af72
xor edx, edx
xor ecx, ecx
mov r8d, 0x400001cf
call qword [sym.imp.USER32.dll_OpenInputDesktop]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call qword [sym.imp.USER32.dll_GetThreadDesktop]
mov rbx, rax
test rsi, rsi
je 0x14002af8e
test rax, rax
je 0x14002af8e
cmp rax, rsi
je 0x14002af8e
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetThreadDesktop]
lea rdx, str.Failed_to_open_the_service
lea r8, str.UltraVNC
mov r9d, reloc.WS2_32.dll_recv
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rbx
call qword [sym.imp.USER32.dll_SetThreadDesktop]
mov rcx, rsi
call qword [sym.imp.USER32.dll_CloseDesktop]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
jmp 0x14002b133
lea rdx, str.Failed_to_open_the_service
mov r9d, reloc.WS2_32.dll_recv
lea r8, str.UltraVNC
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
jmp 0x14002b133
lea rdx, [rsp + 0x20]
mov qword [rsp + 0x60], rbp
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14002b028
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], 0
je 0x14002b01c
xor edx, edx
xor ecx, ecx
mov r8d, 0x400001cf
call qword [sym.imp.USER32.dll_OpenInputDesktop]
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call qword [sym.imp.USER32.dll_GetThreadDesktop]
mov rsi, rax
test rbp, rbp
je 0x14002b101
test rax, rax
je 0x14002b101
cmp rax, rbp
je 0x14002b101
mov rcx, rbp
call qword [sym.imp.USER32.dll_SetThreadDesktop]
lea rdx, str.Failed_to_query_service_status
jmp 0x14002b0bc
lea rdx, str.Failed_to_query_service_status
jmp 0x14002b0ec
cmp dword [rsp + 0x24], 1
mov rcx, rbx
je 0x14002b05b
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, 0x9c4
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.14002ad60
mov eax, 1
jmp 0x14002b12e
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14002b11a
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], 0
je 0x14002b0e5
xor edx, edx
xor ecx, ecx
mov r8d, 0x400001cf
call qword [sym.imp.USER32.dll_OpenInputDesktop]
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call qword [sym.imp.USER32.dll_GetThreadDesktop]
mov rsi, rax
test rbp, rbp
je 0x14002b101
test rax, rax
je 0x14002b101
cmp rax, rbp
je 0x14002b101
mov rcx, rbp
call qword [sym.imp.USER32.dll_SetThreadDesktop]
lea rdx, str.Failed_to_delete_the_service
lea r8, str.UltraVNC
mov r9d, reloc.WS2_32.dll_recv
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetThreadDesktop]
mov rcx, rbp
call qword [sym.imp.USER32.dll_CloseDesktop]
jmp 0x14002b101
lea rdx, str.Failed_to_delete_the_service
mov r9d, reloc.WS2_32.dll_recv
lea r8, str.UltraVNC
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
jmp 0x14002b12e
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140147af0
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret