Function at 0x140037720
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x7f8
mov rax, qword [0x1400dd078]
xor rax, rsp
mov qword [rsp + 0x7e8], rax
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.14004b8b0
nop
mov r8d, 4
lea rdx, [0x1400c6888]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14003782f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x50], eax
mov edx, 1
lea rcx, [rsp + 0x2e0]
call fcn.14003aba0
nop
lea rdx, str.OpenSCManager_failed__error
lea rcx, [rsp + 0x2e0]
call fcn.14001d2a0
mov qword [rsp + 0x70], rax
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x70]
call fcn.140005ba0
lea rdx, [rsp + 0x6c8]
lea rcx, [rsp + 0x2e0]
call fcn.14003aac0
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x80], rax
mov rdx, qword [rsp + 0x80]
lea rcx, [rsp + 0x170]
call fcn.14002d0f0
lea rdx, [0x1400da9c8]
lea rcx, [rsp + 0x170]
call fcn.140065380
nop
lea rcx, [rsp + 0x6c8]
call fcn.140019710
lea rcx, [rsp + 0x2e0]
call fcn.14002d320
jmp 0x140037ee7
mov dword [rsp + 0x54], 0x10024
mov dword [rsp + 0x34], 0
jmp 0x14003784b
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 2
jge 0x140037ed3
lfence
mov rcx, qword [rsp + 0x808]
call fcn.1400196d0
mov r8d, dword [rsp + 0x54]
mov rdx, rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x140037d69
cmp dword [rsp + 0x34], 0
jne 0x140037c08
lfence
lea r8, [rsp + 0x6a0]
mov edx, 1
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140037a04
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x140037a04
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x58], eax
mov edx, 1
lea rcx, [rsp + 0x3d0]
call fcn.14003aba0
nop
lea rdx, str.ControlService_failed_for
lea rcx, [rsp + 0x3d0]
call fcn.14001d2a0
mov qword [rsp + 0xa0], rax
mov rcx, qword [rsp + 0x808]
call fcn.1400196d0
mov rdx, rax
lea rcx, [rsp + 0x6e8]
call fcn.1400426d0
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x98], rax
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0xa0]
call fcn.140017ba0
lea rdx, str.__not_active__error
mov rcx, rax
call fcn.14001d2a0
mov qword [rsp + 0xa8], rax
mov edx, dword [rsp + 0x58]
mov rcx, qword [rsp + 0xa8]
call fcn.140005ba0
nop
lea rcx, [rsp + 0x6e8]
call fcn.140019710
lea rdx, [rsp + 0x708]
lea rcx, [rsp + 0x3d0]
call fcn.14003aac0
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xb8], rax
mov rdx, qword [rsp + 0xb8]
lea rcx, [rsp + 0x188]
call fcn.14002d0f0
lea rdx, [0x1400da9c8]
lea rcx, [rsp + 0x188]
call fcn.140065380
nop
lea rcx, [rsp + 0x708]
call fcn.140019710
lea rcx, [rsp + 0x3d0]
call fcn.14002d320
nop
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov qword [rsp + 0xf8], rax
cmp dword [rsp + 0x6a4], 3
jne 0x140037c03
xor edx, edx
mov eax, dword [rsp + 0x6b8]
mov ecx, 0xa
div ecx
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0x3e8
jae 0x140037a48
mov dword [rsp + 0x30], 0x3e8
jmp 0x140037a5a
cmp dword [rsp + 0x30], 0x1388
jbe 0x140037a5a
mov dword [rsp + 0x30], 0x1388
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rsp + 0x6a0]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x140037bd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x60], eax
mov edx, 1
lea rcx, [rsp + 0x4c0]
call fcn.14003aba0
nop
lea rdx, str.QueryServiceStatusEx_failed_for
lea rcx, [rsp + 0x4c0]
call fcn.14001d2a0
mov qword [rsp + 0xd8], rax
mov rcx, qword [rsp + 0x808]
call fcn.1400196d0
mov rdx, rax
lea rcx, [rsp + 0x728]
call fcn.1400426d0
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xd0], rax
mov rdx, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xd8]
call fcn.140017ba0
lea rdx, [0x1400c68f8]
mov rcx, rax
call fcn.14001d2a0
mov qword [rsp + 0xe0], rax
mov edx, dword [rsp + 0x60]
mov rcx, qword [rsp + 0xe0]
call fcn.140005ba0
nop
lea rcx, [rsp + 0x728]
call fcn.140019710
lea rdx, [rsp + 0x748]
lea rcx, [rsp + 0x4c0]
call fcn.14003aac0
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0xf0], rax
mov rdx, qword [rsp + 0xf0]
lea rcx, [rsp + 0x1a0]
call fcn.14002d0f0
lea rdx, [0x1400da9c8]
lea rcx, [rsp + 0x1a0]
call fcn.140065380
nop
lea rcx, [rsp + 0x748]
call fcn.140019710
lea rcx, [rsp + 0x4c0]
call fcn.14002d320
jmp 0x140037bfe
cmp dword [rsp + 0x6a4], 1
jne 0x140037be2
jmp 0x140037c03
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
sub rax, qword [rsp + 0xf8]
mov ecx, dword [rsp + 0x810]
cmp rax, rcx
jbe 0x140037bfe
jmp 0x140037c03
jmp 0x140037a12
jmp 0x140037d64
cmp dword [rsp + 0x34], 1
jne 0x140037d64
lfence
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140037d64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x64], eax
mov edx, 1
lea rcx, [rsp + 0x5b0]
call fcn.14003aba0
nop
lea rdx, str.DeleteService_failed_for
lea rcx, [rsp + 0x5b0]
call fcn.14001d2a0
mov qword [rsp + 0x118], rax
mov rcx, qword [rsp + 0x808]
call fcn.1400196d0
mov rdx, rax
lea rcx, [rsp + 0x768]
call fcn.1400426d0
mov qword [rsp + 0x100], rax
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x110], rax
mov rdx, qword [rsp + 0x110]
mov rcx, qword [rsp + 0x118]
call fcn.140017ba0
lea rdx, [0x1400c6990]
mov rcx, rax
call fcn.14001d2a0
mov qword [rsp + 0x120], rax
mov edx, dword [rsp + 0x64]
mov rcx, qword [rsp + 0x120]
call fcn.140005ba0
nop
lea rcx, [rsp + 0x768]
call fcn.140019710
lea rdx, [rsp + 0x7c8]
lea rcx, [rsp + 0x5b0]
call fcn.14003aac0
mov qword [rsp + 0x128], rax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0x130], rax
mov rdx, qword [rsp + 0x130]
lea rcx, [rsp + 0x1b8]
call fcn.14002d0f0
lea rdx, [0x1400da9c8]
lea rcx, [rsp + 0x1b8]
call fcn.140065380
nop
lea rcx, [rsp + 0x7c8]
call fcn.140019710
lea rcx, [rsp + 0x5b0]
call fcn.14002d320
nop
jmp 0x140037ebb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x140037d80
jmp 0x140037ed3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
mov edx, 1
lea rcx, [rsp + 0x1f0]
call fcn.14003aba0
nop
lea rdx, str.OpenService_failed_for
lea rcx, [rsp + 0x1f0]
call fcn.14001d2a0
mov qword [rsp + 0x150], rax
mov rcx, qword [rsp + 0x808]
call fcn.1400196d0
mov rdx, rax
lea rcx, [rsp + 0x788]
call fcn.1400426d0
mov qword [rsp + 0x138], rax
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x140], rax
mov rax, qword [rsp + 0x140]
mov qword [rsp + 0x148], rax
mov rdx, qword [rsp + 0x148]
mov rcx, qword [rsp + 0x150]
call fcn.140017ba0
lea rdx, [0x1400c6960]
mov rcx, rax
call fcn.14001d2a0
mov qword [rsp + 0x158], rax
mov edx, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x158]
call fcn.140005ba0
nop
lea rcx, [rsp + 0x788]
call fcn.140019710
lea rdx, [rsp + 0x7a8]
lea rcx, [rsp + 0x1f0]
call fcn.14003aac0
mov qword [rsp + 0x160], rax
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0x168], rax
mov rdx, qword [rsp + 0x168]
lea rcx, [rsp + 0x1d0]
call fcn.14002d0f0
lea rdx, [0x1400da9c8]
lea rcx, [rsp + 0x1d0]
call fcn.140065380
nop
lea rcx, [rsp + 0x7a8]
call fcn.140019710
lea rcx, [rsp + 0x1f0]
call fcn.14002d320
nop
cmp qword [rsp + 0x40], 0
je 0x140037ece
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140037841
cmp qword [rsp + 0x48], 0
je 0x140037ee7
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0x38]
call fcn.14004bc00
mov rcx, qword [rsp + 0x7e8]
xor rcx, rsp
call fcn.1400620b0
add rsp, 0x7f8
ret