Function at 0x140076fb0
Capabilities:
Query service status
Start service

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rsp + 0xc0], rbx
mov rax, qword [0x140398250]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rdi, r8
mov r12d, edx
xor r8d, r8d
lea rdx, str.CBaseFuncSub::FS_ControlPrintBuddyService
lea rcx, [rbp - 0x19]
call fcn.1400075a0
nop
mov qword [rsp + 0x20], rdi
mov r9d, r12d
lea r8, str.bStart___d__lpwStopflg___x
mov r13d, 1
mov edx, r13d
lea rcx, [rbp - 0x19]
call fcn.140007780
xor edx, edx
xor ecx, ecx
mov r8d, 0x20000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x1400770fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor ebx, ebx
mov qword [rbp - 9], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
mov r9d, 0x409
mov r8d, r12d
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1400770a4
mov rax, qword [rbp - 9]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
lea r9, str._t_t_t_OpenSCManager_
lea r8, str.ApiName:__s__ErrorCode:__d_:__s
lea edx, [rbx + 6]
lea rcx, [rbp - 0x19]
call fcn.140007780
mov rcx, qword [rbp - 9]
test rcx, rcx
je 0x1400770b3
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r8, str.Stopflg___d__return___08x
mov edx, 2
lea rcx, [rbp - 0x19]
cmp esi, 0x78
jne 0x1400770de
mov word [rdi], bx
mov dword [rsp + 0x20], r13d
xor r9d, r9d
call fcn.140007780
nop
jmp 0x14007733a
movzx r9d, word [rdi]
mov qword [rsp + 0x20], rbx
call fcn.140007780
nop
lea rcx, [rbp - 0x19]
call fcn.140007730
xor eax, eax
jmp 0x140077346
mov r8d, 0xf01ff
lea rdx, str.NBAgntNT
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400771bc
mov qword [rbp - 9], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
lea rax, [rbp - 9]
mov qword [rsp + 0x20], rax
mov r9d, 0x409
mov r8d, r12d
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x140077180
mov rax, qword [rbp - 9]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
lea r9, str._t_t_t_OpenService_
lea r8, str.ApiName:__s__ErrorCode:__d_:__s
lea edx, [rbx + 6]
lea rcx, [rbp - 0x19]
call fcn.140007780
mov rcx, qword [rbp - 9]
test rcx, rcx
je 0x14007718f
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx r9d, word [rdi]
mov dword [rsp + 0x20], r13d
lea r8, str.Stopflg___d__return___08x
mov edx, 2
lea rcx, [rbp - 0x19]
call fcn.140007780
nop
jmp 0x14007733a
mov rcx, rax
test r12d, r12d
je 0x140077228
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140077309
lea rdx, str._t_t_t_StartService_
lea rcx, [rbp - 0x19]
call fcn.140029dc0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx r9d, word [rdi]
xor ebx, ebx
mov qword [rsp + 0x20], rbx
lea r8, str.Stopflg___d__return___08x
lea edx, [rbx + 2]
lea rcx, [rbp - 0x19]
call fcn.140007780
nop
lea rcx, [rbp - 0x19]
call fcn.140007730
xor eax, eax
jmp 0x140077346
lea rdx, [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea rcx, [rbp - 0x19]
test eax, eax
jne 0x140077287
lea rdx, str._t_t_t_QueryServiceStatus_
call fcn.140029dc0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx r9d, word [rdi]
xor ebx, ebx
mov qword [rsp + 0x20], rbx
lea r8, str.Stopflg___d__return___08x
lea edx, [rbx + 2]
lea rcx, [rbp - 0x19]
call fcn.140007780
nop
lea rcx, [rbp - 0x19]
call fcn.140007730
xor eax, eax
jmp 0x140077346
mov r9d, dword [rbp + 0xb]
lea r8, str._t_t_tQueryServiceStatus_SERVICE____ld_
mov edx, 7
call fcn.140007780
cmp dword [rbp + 0xb], r13d
je 0x140077309
lea r8, [rbp + 7]
mov edx, r13d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
cmp eax, r13d
je 0x140077305
lea rdx, str._t_t_t_QueryServiceStatus_
lea rcx, [rbp - 0x19]
call fcn.140029dc0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx r9d, word [rdi]
xor ebx, ebx
mov qword [rsp + 0x20], rbx
lea r8, str.Stopflg___d__return___08x
lea edx, [rbx + 2]
lea rcx, [rbp - 0x19]
call fcn.140007780
nop
lea rcx, [rbp - 0x19]
call fcn.140007730
xor eax, eax
jmp 0x140077346
mov word [rdi], r13w
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx r9d, word [rdi]
mov dword [rsp + 0x20], r13d
lea r8, str.Stopflg___d__return___08x
mov edx, 2
lea rcx, [rbp - 0x19]
call fcn.140007780
nop
lea rcx, [rbp - 0x19]
call fcn.140007730
mov eax, r13d
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140245660
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret