Function at 0x14000ff70
Capabilities:
Enumerate services

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x288
mov rax, qword [0x140029c30]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rdi, r9
mov qword [rsp + 0x60], r9
mov dword [rsp + 0x40], r8d
mov rsi, rdx
mov rbp, rcx
mov qword [rsp + 0x58], rcx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140010007
test rdi, rdi
je 0x14000ffff
cmp rdi, rsi
je 0x14000ffff
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x70]
mov rdx, rsi
mov rcx, rbp
mov dword [rsp + 0x40], 0x100
call qword [sym.imp.ADVAPI32.dll_GetServiceDisplayNameW]
mov r11d, dword [rsp + 0x2d0]
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x70]
mov r8, rdi
mov rcx, rbp
mov dword [rsp + 0x44], r11d
call qword [sym.imp.ADVAPI32.dll_GetServiceKeyNameW]
mov rax, rbx
jmp 0x140010257
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x140010041
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140006fa0
mov rbx, rax
call fcn.140016bd0
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x4000021f
call fcn.140007220
xor eax, eax
jmp 0x140010257
test rdi, rdi
je 0x140010014
xor ecx, ecx
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x48]
lea edx, [rcx + 0x3b]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x4c]
lea r8d, [rcx + 3]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x20], ecx
mov rcx, rbp
mov rdi, rbp
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x140010198
mov ebx, dword [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
jne 0x1400100dd
call fcn.140016bd0
lea r8, str.ENUM_SERVICE_STATUS
lea r9, str.open_service__
lea rcx, [rax + 0x60]
mov edx, 0xc00001fa
call fcn.140007220
xor eax, eax
jmp 0x140010257
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x54], eax
nop word [rax + rax]
lea rcx, [rsp + 0x50]
mov edx, 0x3b
mov r9, rbp
mov qword [rsp + 0x38], rcx
lea rcx, [rsp + 0x48]
lea r8d, [rdx - 0x38]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x4c]
mov qword [rsp + 0x28], rcx
mov rcx, rdi
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rsp + 0x44], eax
test eax, eax
jne 0x14001013c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x140010184
xor ebx, ebx
cmp dword [rsp + 0x48], ebx
jbe 0x140010170
lea rdi, [rbp + 8]
nop dword [rax + rax]
mov rcx, qword [rdi]
mov rdx, rsi
call fcn.14000c460
test eax, eax
jne 0x1400101c5
inc ebx
add rdi, 0x30
cmp ebx, dword [rsp + 0x48]
jb 0x140010150
mov rdi, qword [rsp + 0x58]
cmp dword [rsp + 0x44], 0
jne 0x14001023c
mov eax, dword [rsp + 0x54]
jmp 0x1400100f0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140006fa0
mov rbx, rax
call fcn.140016bd0
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x40000220
call fcn.140007220
xor eax, eax
jmp 0x140010257
mov edx, dword [rsp + 0x2d0]
lea rax, [rbx + rbx*2]
mov rbx, qword [rsp + 0x60]
add rax, rax
lea r9, [0x140022870]
or r8, 0xffffffffffffffff
mov rax, qword [rbp + rax*8]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140016e78
test eax, eax
jns 0x14001021e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.140016bd0
lea r8, str.canonical_name
jmp 0x1400100c1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x58]
mov rdx, rbx
jmp 0x140010242
mov rdx, rsi
mov rcx, rdi
mov r8d, dword [rsp + 0x40]
xor r9d, r9d
mov dword [rsp + 0x20], 0
call fcn.14000ff70
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140017480
add rsp, 0x288
pop rdi
pop rsi
pop rbp
pop rbx
ret