Function at 0x140007850
Capabilities:
Enumerate services

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov ebx, r8d
mov r15d, edx
mov rsi, rcx
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rbp - 0x19], rax
test rax, rax
je 0x140007aba
xor r13d, r13d
mov dword [rbp - 0x31], r13d
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x41], r13
mov qword [rbp - 0x39], r13
lea r8, [rbp + 0x7f]
mov edx, 0x40000
lea rcx, [rbp - 0x49]
call fcn.1400064a0
mov r12, qword [rbp - 0x41]
mov r14, qword [rbp - 0x49]
nop dword [rax]
mov dword [rbp - 0x55], r13d
mov dword [rbp - 0x51], r13d
mov r13, r12
sub r13, r14
mov rax, r14
cmp r14, r12
mov ecx, 0
cmove rax, rcx
mov qword [rsp + 0x48], rcx
lea rcx, [rbp - 0x31]
mov qword [rsp + 0x40], rcx
lea rcx, [rbp - 0x55]
mov qword [rsp + 0x38], rcx
lea rcx, [rbp - 0x51]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8d, r15d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov byte [rbp + 0x7f], 0
test eax, eax
jne 0x140007945
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x140007ac0
mov byte [rbp + 0x7f], 1
mov r15d, dword [rbp - 0x55]
test r15d, r15d
je 0x1400079fe
mov rcx, qword [rsi + 8]
sub rcx, qword [rsi]
movabs r10, 0x2aaaaaaaaaaaaaab
mov rax, r10
imul rcx
sar rdx, 4
mov r9, rdx
shr r9, 0x3f
add r9, rdx
add r9, r15
mov qword [rbp - 0x29], r9
mov rcx, qword [rsi + 0x10]
sub rcx, qword [rsi]
mov rax, r10
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp r9, rdx
jbe 0x1400079c1
movabs rax, 0x2aaaaaaaaaaaaaa
cmp r9, rax
ja 0x140007af0
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.140006990
mov r15d, dword [rbp - 0x55]
xor ebx, ebx
test r15d, r15d
je 0x1400079fe
nop dword [rax + rax]
mov eax, ebx
imul r8, rax, 0x38
add r8, r14
mov rdx, qword [rsi + 8]
mov rcx, rsi
cmp rdx, qword [rsi + 0x10]
je 0x1400079f2
call fcn.140006e80
add qword [rsi + 8], 0x60
jmp 0x1400079f7
call fcn.1400067b0
inc ebx
cmp ebx, r15d
jb 0x1400079d0
mov ebx, dword [rbp - 0x51]
cmp rbx, r13
jbe 0x140007a42
mov rax, qword [rbp - 0x39]
sub rax, r14
cmp rbx, rax
jbe 0x140007a2b
lea r8, [rbp - 0x59]
mov edx, ebx
lea rcx, [rbp - 0x49]
call fcn.1400064a0
mov r12, qword [rbp - 0x41]
mov r14, qword [rbp - 0x49]
jmp 0x140007a42
sub rbx, r13
mov r8, rbx
xor edx, edx
mov rcx, r12
call fcn.14002c4e0
add r12, rbx
mov qword [rbp - 0x41], r12
mov rbx, qword [rbp - 0x39]
cmp byte [rbp + 0x7f], 0
je 0x140007a5b
mov ebx, dword [rbp + 0x77]
mov r15d, dword [rbp + 0x6f]
xor r13d, r13d
jmp 0x1400078d0
test r14, r14
je 0x140007a90
sub rbx, r14
mov rax, r14
cmp rbx, 0x1000
jb 0x140007a84
add rbx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140007ab4
mov rdx, rbx
mov rcx, r14
call fcn.140015390
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x110]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.14001dfa8
nop
call fcn.140007e70
nop
mov edx, eax
lea rcx, [rbp - 0x11]
call fcn.140007c10
movups xmm0, xmmword [rax]
movaps xmmword [rbp - 0x29], xmm0
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 1]
call fcn.1400015d0
lea rdx, [0x140388ce8]
lea rcx, [rbp - 1]
call fcn.140016d20
int3
call fcn.140005460
int3