Function at 0x180041088
Capabilities:
Enumerate services

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
xor r12d, r12d
mov rdi, r9
mov qword [rbp - 0x18], r12
mov r13, r8
mov dword [rbp - 0x30], r12d
mov r15d, r12d
mov dword [rbp + 0x40], r12d
mov qword [rbp - 0x20], r12
mov qword [rbp - 0x10], r12
test rcx, rcx
je 0x1800415ec
test r8, r8
je 0x1800415ec
lea r9, [rbp - 0x18]
lea r8, [0x18007df38]
call fcn.180043b58
mov ebx, eax
cmp eax, 2
jne 0x1800410fc
xor eax, eax
jmp 0x1800415f1
test ebx, ebx
je 0x180041121
lea r9, [0x18007df38]
mov r8d, 0x44d1
mov rdx, rdi
mov ecx, 0xd
call fcn.18000dc90
mov eax, ebx
jmp 0x1800415f1
xor edx, edx
mov dword [rbp - 0x2c], r12d
xor ecx, ecx
mov r8d, 0x2000000
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
nop dword [rax + rax]
mov r14, rax
test rax, rax
jne 0x180041154
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x1800412ac
mov qword [rsp + 0x48], r12
lea rax, [rbp - 0x2c]
mov qword [rsp + 0x40], r12
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, r14
lea rax, [rbp - 0x28]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r12d
lea r9d, [rdx + 3]
lea r8d, [rdx + 0x30]
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_service_core_l1_1_1.dll_EnumServicesStatusExW]
nop dword [rax + rax]
test eax, eax
jne 0x1800411b5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 0xea
je 0x1800411b5
cmp eax, 0x7a
jne 0x18004128e
mov edx, dword [rbp - 0x28]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
jne 0x1800411d6
lea ebx, [rax + 8]
jmp 0x18004128e
mov qword [rsp + 0x48], r12
lea rax, [rbp - 0x2c]
mov qword [rsp + 0x40], r12
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, r14
lea rax, [rbp - 0x28]
mov qword [rsp + 0x30], rax
mov eax, dword [rbp - 0x28]
lea r9d, [rdx + 3]
mov dword [rsp + 0x28], eax
lea r8d, [rdx + 0x30]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.api_ms_win_service_core_l1_1_1.dll_EnumServicesStatusExW]
nop dword [rax + rax]
test eax, eax
jne 0x18004122b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x18004127f
mov edi, r12d
mov ebx, r12d
cmp dword [rbp - 0x2c], r12d
jbe 0x18004127b
mov eax, edi
xor r9d, r9d
imul rcx, rax, 0x38
lea rax, [rbp - 0x10]
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], r12d
mov rdx, qword [rcx + rsi + 8]
mov rcx, qword [rcx + rsi]
call fcn.18000d0f0
mov ebx, eax
test eax, eax
jne 0x180041277
inc edi
cmp edi, dword [rbp - 0x2c]
jb 0x180041237
mov ebx, r12d
mov r15, qword [rbp - 0x10]
mov rdi, qword [rbp + 0x58]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov rcx, r14
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop dword [rax + rax]
test ebx, ebx
je 0x1800412ac
mov rcx, r15
call fcn.1800117f4
mov r15, r12
mov rcx, qword [rbp - 0x18]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov dword [rsp + 0x38], r12d
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea edx, [r9 + 2]
mov dword [rsp + 0x20], r12d
call fcn.18004ea9c
jmp 0x180041581
mov edx, dword [rbp - 0x30]
mov ecx, 0x40
add edx, 2
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x180041541
mov edx, dword [rbp + 0x40]
mov ecx, 0x40
add edx, 2
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov qword [rbp - 0x10], rax
mov r12, rax
test rax, rax
je 0x180041523
mov ecx, dword [rbp + 0x40]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
mov r9, r14
mov dword [rsp + 0x38], ecx
lea rax, [rbp - 0x30]
mov ecx, dword [rbp - 0x30]
xor r8d, r8d
mov qword [rsp + 0x30], r12
xor edx, edx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov rcx, qword [rbp - 0x18]
call fcn.18004ea9c
xor edx, edx
mov esi, eax
test eax, eax
jne 0x180041512
mov eax, dword [rbp - 0x30]
lea rcx, [r12 + 2]
shr rax, 1
mov ebx, edx
mov word [r14 + rax*2], dx
mov eax, dword [rbp + 0x40]
shr rax, 1
mov word [r12 + rax*2], dx
test rcx, rcx
je 0x1800413fb
mov qword [rbp - 0x20], rdx
lea r9, [rbp - 0x24]
mov dword [rbp - 0x28], edx
lea r8, [rbp - 0x20]
mov dword [rbp - 0x24], edx
lea edx, [rsi + 1]
call qword [sym.imp.api_ms_win_security_sddl_l1_1_0.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
nop dword [rax + rax]
test eax, eax
je 0x1800413eb
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x180041400
lea rdx, [rbp - 0x28]
call fcn.180014d94
mov ebx, eax
test eax, eax
je 0x180041400
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor edx, edx
mov qword [rbp - 0x20], rdx
mov dword [rbp - 0x24], edx
jmp 0x180041400
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x180041400
mov ebx, 0x57
test ebx, ebx
jne 0x1800414f6
mov rcx, qword [rbp - 0x20]
call fcn.18000df50
lea edx, [rbx + 0x30]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
xor edx, edx
mov rdi, rax
test rax, rax
je 0x1800414da
mov rbx, r15
mov r13d, edx
test r15, r15
je 0x180041463
mov rcx, qword [rbx]
mov rdx, r14
call qword [sym.imp.msvcrt.dll__wcsicmp]
nop dword [rax + rax]
test eax, eax
je 0x18004145d
mov r13, rbx
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x18004143b
mov r12, qword [rbp - 0x10]
xor edx, edx
test rbx, rbx
je 0x18004149b
mov rax, qword [rbx]
mov qword [rdi], rax
mov rax, qword [rbx + 8]
mov qword [rdi + 8], rax
mov rax, qword [rbx + 0x28]
test r13, r13
je 0x180041485
mov qword [r13 + 0x28], rax
jmp 0x180041488
mov r15, rax
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor edx, edx
jmp 0x1800414a5
mov qword [rdi], r14
mov r14, rdx
mov qword [rdi + 8], rdx
mov al, byte [r12]
mov r13, qword [rbp + 0x50]
and al, 0xdf
mov byte [rdi + 0x10], al
mov al, byte [r12 + 1]
mov byte [rdi + 0x11], al
mov rax, qword [rbp - 0x20]
mov qword [rdi + 0x18], rax
mov eax, dword [rbp - 0x28]
mov dword [rdi + 0x20], eax
mov rax, qword [r13]
mov qword [rdi + 0x28], rax
mov qword [r13], rdi
mov qword [rbp - 0x20], rdx
jmp 0x180041512
mov rcx, qword [rbp - 0x20]
mov esi, 8
test rcx, rcx
je 0x180041512
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
jmp 0x180041512
mov r9, r14
mov r8d, 0x44c5
mov rdx, rdi
mov ecx, ebx
call fcn.18000dc90
mov ecx, ebx
call fcn.18000ec90
mov esi, eax
mov rcx, r12
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
jmp 0x180041528
mov esi, 8
xor r12d, r12d
test r14, r14
je 0x180041546
mov rcx, r14
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
jmp 0x180041546
mov esi, 8
test esi, esi
jne 0x18004158b
mov rcx, qword [rbp - 0x18]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x40], rax
lea edx, [rsi + 3]
mov dword [rsp + 0x38], r12d
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov dword [rsp + 0x20], r12d
call fcn.18004ea9c
mov rdi, qword [rbp + 0x58]
mov esi, eax
test eax, eax
je 0x1800412e5
mov rcx, qword [rbp - 0x18]
cmp esi, 2
mov qword [rsp + 0x40], r12
mov ebx, r12d
cmovne ebx, esi
mov dword [rsp + 0x38], r12d
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
xor r8d, r8d
mov dword [rsp + 0x20], r12d
lea edx, [r9 + 4]
call fcn.18004ea9c
mov edx, 1
lea rcx, [rbp - 0x18]
call fcn.18004cd24
test ebx, ebx
je 0x1800415df
mov rcx, qword [r13]
call fcn.1800117f4
mov qword [r13], r12
mov rcx, r15
call fcn.1800117f4
jmp 0x18004111a
mov eax, 1
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret