Function at 0x14000ee50
Capabilities:
Enumerate services

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x298
mov rax, qword [0x140030f90]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rdi, r9
mov qword [rsp + 0x70], r9
mov dword [rsp + 0x50], r8d
mov rsi, rdx
mov rbp, rcx
mov qword [rsp + 0x68], rcx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x14000eeed
test rdi, rdi
je 0x14000eee5
cmp rdi, rsi
je 0x14000eee5
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x80]
mov rdx, rsi
mov rcx, rbp
mov dword [rsp + 0x50], 0x100
call qword [sym.imp.ADVAPI32.dll_GetServiceDisplayNameW]
mov r11d, dword [rsp + 0x2e0]
lea r9, [rsp + 0x54]
lea rdx, [rsp + 0x80]
mov r8, rdi
mov rcx, rbp
mov dword [rsp + 0x54], r11d
call qword [sym.imp.ADVAPI32.dll_GetServiceKeyNameW]
mov rax, rbx
jmp 0x14000f149
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x14000ef27
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140002430
mov rbx, rax
call fcn.140017f4c
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x4000021f
call fcn.1400026b0
xor eax, eax
jmp 0x14000f149
test rdi, rdi
je 0x14000eefa
xor ecx, ecx
lea rax, [rsp + 0x60]
xor edx, edx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x5c]
lea r9d, [rcx + 3]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
lea r8d, [rcx + 0x3b]
mov qword [rsp + 0x20], rcx
mov dword [rsp + 0x60], ecx
mov rcx, rbp
mov rdi, rbp
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14000f08c
mov ebx, dword [rsp + 0x5c]
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 0x14000efcd
call fcn.140017f4c
lea r8, str.ENUM_SERVICE_STATUS_PROCESS
lea r9, str.open_service__
lea rcx, [rax + 0x60]
mov edx, 0xc00001fa
call fcn.1400026b0
xor eax, eax
jmp 0x14000f149
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x64], eax
nop word [rax + rax]
mov qword [rsp + 0x48], 0
xor edx, edx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x58]
lea r9d, [rdx + 3]
mov qword [rsp + 0x38], rcx
lea rcx, [rsp + 0x5c]
lea r8d, [rdx + 0x3b]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
mov rcx, rdi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov dword [rsp + 0x54], eax
test eax, eax
jne 0x14000f038
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14000f078
xor ebx, ebx
cmp dword [rsp + 0x58], ebx
jbe 0x14000f064
lea rdi, [rbp + 8]
mov rcx, qword [rdi]
mov rdx, rsi
call fcn.140009b50
test eax, eax
jne 0x14000f0b9
inc ebx
add rdi, 0x38
cmp ebx, dword [rsp + 0x58]
jb 0x14000f044
mov rdi, qword [rsp + 0x68]
cmp dword [rsp + 0x54], 0
jne 0x14000f12e
mov eax, dword [rsp + 0x64]
jmp 0x14000efe0
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.140002430
mov rbx, rax
call fcn.140017f4c
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x40000220
call fcn.1400026b0
xor eax, eax
jmp 0x14000f149
mov edx, dword [rsp + 0x2e0]
mov eax, ebx
mov rbx, qword [rsp + 0x70]
imul rax, rax, 0x38
mov rax, qword [rax + rbp]
lea r9, [0x140026d5c]
or r8, 0xffffffffffffffff
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140018170
test eax, eax
jns 0x14000f110
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.140017f4c
lea r8, str.canonical_name
jmp 0x14000efb1
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 + 0x68]
mov rdx, rbx
jmp 0x14000f134
mov rdx, rsi
mov rcx, rdi
mov r8d, dword [rsp + 0x50]
xor r9d, r9d
mov dword [rsp + 0x20], 0
call fcn.14000ee50
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.140018800
add rsp, 0x298
pop rdi
pop rsi
pop rbp
pop rbx
ret