Function at 0x180039d90
Capabilities:
Enumerate services

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x208]
sub rsp, 0x308
mov rax, qword [0x18008ab58]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov r14, qword [rbp + 0x270]
xor eax, eax
mov dword [rsp + 0x58], r8d
mov rdi, r9
mov dword [rbp - 0x68], edx
mov rsi, rcx
mov qword [rbp - 0x78], rax
mov r13d, eax
mov qword [rbp - 0x70], rax
mov r15d, eax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x60], rax
test rcx, rcx
je 0x18003a50e
cmp r9, 0xffffffffffffffff
je 0x18003a50e
test r14, r14
je 0x18003a50e
mov rdx, rcx
lea r8, [rbp - 0x58]
mov rcx, r14
call fcn.18004e6c0
mov ebx, eax
cmp eax, 2
jne 0x180039e3c
lea r8, [rbp - 0x58]
mov rdx, rsi
mov rcx, r14
call fcn.18004c964
mov ebx, eax
xor r12d, r12d
test ebx, ebx
je 0x180039e66
mov ecx, ebx
call fcn.180011120
mov edx, eax
lea ecx, [r12 + 1]
mov r9, rsi
mov r8d, 0x1be8
call fcn.180038d90
mov eax, ebx
jmp 0x18003a513
lea r9, [rbp - 0x38]
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call fcn.180016d68
test eax, eax
je 0x180039e5f
mov eax, dword [rbp + 0x278]
lea r9, [rbp - 0x78]
movsd xmm1, qword [rbp - 0x58]
mov edi, 1
and eax, edi
mov rcx, r14
mov dword [rbp - 0x50], eax
je 0x180039ea6
xor r8d, r8d
call fcn.18004fab4
mov ebx, eax
jmp 0x180039ed7
mov r8d, 2
call fcn.18004fab4
test byte [rbp + 0x278], 2
mov ebx, eax
je 0x180039ed7
movsd xmm1, qword [rbp - 0x58]
lea r9, [rbp - 0x70]
mov r8d, 6
mov rcx, r14
call fcn.18004fab4
mov r13, qword [rbp - 0x70]
test ebx, ebx
je 0x180039f1e
mov ecx, ebx
call fcn.180011120
mov edx, eax
mov r9, rsi
mov r8d, 0x1c6a
mov ecx, edi
call fcn.180038d90
cmp qword [rbp - 0x78], r12
je 0x180039f05
mov edx, edi
lea rcx, [rbp - 0x78]
call fcn.18004cd24
test r13, r13
je 0x180039e5f
mov edx, edi
lea rcx, [rbp - 0x70]
call fcn.18004cd24
jmp 0x180039e5f
mov esi, dword [0x18008b2a0]
xor r13d, r13d
mov r14, qword gs:[0x58]
mov r12d, dword [rsp + 0x58]
lea rax, [rsp + 0x54]
mov dword [rbp - 0x64], r13d
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x78]
mov edx, r12d
lea rcx, [rbp - 0x38]
call fcn.18003a708
mov ecx, eax
call fcn.18000ec90
mov r13, qword [rsp + 0x78]
xor edx, edx
mov ebx, eax
test eax, eax
jne 0x18003a4a4
test r13, r13
je 0x18003a4a4
mov esi, dword [rbp - 0x68]
cmp esi, 2
jne 0x18003a028
cmp word [r13], 0x5c
jne 0x180039f96
lea ebx, [rax + 3]
jmp 0x18003a033
mov edx, 0x25
mov rcx, r13
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
xor edx, edx
test rax, rax
je 0x18003a028
mov eax, r12d
and eax, 0x18
cmp al, 0x18
je 0x18003a028
lea rdx, [rsp + 0x68]
mov rcx, r13
call fcn.18005cfd0
mov r14d, 3
mov ebx, eax
cmp eax, r14d
jne 0x18003a009
lea rcx, str.SceSrv
mov dword [rbp - 0x64], edi
mov ebx, r14d
call fcn.18000c6d0
mov rcx, qword [0x18008b378]
mov r9d, 0x1d2f
mov r8d, 0xc00006ab
mov qword [rsp + 0x20], r13
mov edx, r14d
call fcn.18000c740
jmp 0x18003a018
xor edx, edx
test eax, eax
je 0x18003a021
mov ecx, eax
call fcn.18000ec90
mov ebx, eax
mov r15, qword [rsp + 0x68]
xor edx, edx
jmp 0x18003a033
mov r15, qword [rsp + 0x68]
jmp 0x18003a033
mov r15, r13
mov qword [rsp + 0x68], r13
mov r13, rdx
mov r14d, edx
mov dword [rsp + 0x50], r14d
mov dword [rsp + 0x78], edx
test esi, esi
jne 0x18003a249
test r15, r15
je 0x18003a249
mov rdx, r15
lea rcx, [0x18007b6b4]
call qword [sym.imp.msvcrt.dll__wcsicmp]
nop dword [rax + rax]
xor edx, edx
test eax, eax
jne 0x18003a249
xor ecx, ecx
mov dword [rsp + 0x50], edx
mov r8d, 0x2000000
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
nop dword [rax + rax]
xor esi, esi
mov r12, rax
test rax, rax
jne 0x18003a0e5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
mov rax, qword [rbp - 0x80]
mov r12, qword [rbp - 0x60]
test ebx, ebx
mov rsi, qword [rsp + 0x60]
mov rcx, r15
cmove r12, rax
mov r14d, edi
mov qword [rbp - 0x60], r12
mov dword [rsp + 0x50], r14d
or byte [rsi], 0x20
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov r12d, dword [rsp + 0x58]
xor edx, edx
mov r15d, edx
mov qword [rsp + 0x68], rdx
jmp 0x18003a24e
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rsi
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], esi
lea r9d, [rdx + 3]
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 0x18003a147
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 0x18003a147
cmp eax, 0x7a
jne 0x18003a21d
mov edx, dword [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov r14, rax
test rax, rax
jne 0x18003a169
lea ebx, [rax + 8]
jmp 0x18003a21d
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rsi
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x70]
lea r9d, [rdx + 3]
mov dword [rsp + 0x28], eax
lea r8d, [rdx + 0x30]
mov qword [rsp + 0x20], r14
call qword [sym.imp.api_ms_win_service_core_l1_1_1.dll_EnumServicesStatusExW]
nop dword [rax + rax]
test eax, eax
jne 0x18003a1c1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x18003a20e
xor edx, edx
mov ebx, edx
cmp dword [rsp + 0x50], edx
jbe 0x18003a20e
mov eax, esi
xor r9d, r9d
imul rcx, rax, 0x38
lea rax, [rbp - 0x80]
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edx
mov rdx, qword [rcx + r14 + 8]
mov rcx, qword [rcx + r14]
call fcn.18000d0f0
xor edx, edx
mov ebx, eax
test eax, eax
jne 0x18003a20c
add esi, edi
cmp esi, dword [rsp + 0x50]
jb 0x18003a1cb
xor esi, esi
mov ebx, esi
jmp 0x18003a20e
xor esi, esi
mov rcx, r14
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov rcx, r12
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop dword [rax + rax]
test ebx, ebx
je 0x18003a0a0
mov rcx, qword [rbp - 0x80]
call fcn.1800117f4
mov rax, rsi
mov qword [rbp - 0x80], rax
jmp 0x18003a0a4
mov rsi, qword [rsp + 0x60]
test ebx, ebx
jne 0x18003a3c9
mov rax, qword [rbp - 0x60]
and r12d, 8
test r14, r14
je 0x18003a272
mov r15, qword [rax]
mov rax, qword [rax + 0x28]
mov qword [rbp - 0x60], rax
mov dword [rsp + 0x78], edx
mov rcx, r15
call qword [sym.imp.msvcrt.dll__wcslwr]
nop dword [rax + rax]
xor edx, edx
mov qword [rsp + 0x68], rax
mov r15, rax
test r12d, r12d
jne 0x18003a295
test r14, r14
je 0x18003a30a
mov rcx, qword [rbp - 0x78]
lea r9, [rbp - 0x40]
mov qword [rbp - 0x48], rdx
lea r8, [rbp - 0x48]
mov rdx, r15
call fcn.18004eec8
mov rsi, qword [rbp - 0x48]
xor edx, edx
mov ebx, eax
test eax, eax
jne 0x18003a2ee
test r14, r14
je 0x18003a2ce
test rsi, rsi
je 0x18003a30a
test byte [rsi], 0x20
jne 0x18003a2f4
mov dword [rsp + 0x78], edi
jmp 0x18003a2f4
test r12d, r12d
je 0x18003a2f4
mov ecx, dword [rbp - 0x68]
lea r9, [rsp + 0x54]
lea r8, [rsp + 0x60]
mov rdx, rsi
call fcn.180050c74
mov ebx, eax
xor edx, edx
jmp 0x18003a2f4
cmp ebx, 2
cmove ebx, edx
test rsi, rsi
je 0x18003a30a
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor edx, edx
mov rsi, qword [rsp + 0x60]
cmp dword [rsp + 0x78], edx
jne 0x18003a3af
mov eax, dword [rbp - 0x50]
mov r9, rsi
neg eax
mov r8d, edi
mov eax, dword [rsp + 0x54]
mov rdx, r15
sbb ecx, ecx
add eax, eax
and ecx, dword [rbp + 0x280]
mov dword [rsp + 0x28], ecx
mov rcx, qword [rbp - 0x78]
mov dword [rsp + 0x20], eax
call fcn.180050558
mov rcx, qword [rbp - 0x70]
xor edx, edx
mov ebx, eax
test rcx, rcx
je 0x18003a3af
mov eax, dword [rbp + 0x278]
and al, 3
cmp al, 2
jne 0x18003a3af
or rax, 0xffffffffffffffff
inc rax
cmp word [r15 + rax*2], dx
jne 0x18003a363
lea r8d, [rax + rax]
mov r9d, 4
mov rdx, r15
call fcn.1800502c0
xor edx, edx
test eax, eax
jne 0x18003a3af
test r14, r14
je 0x18003a38d
and byte [rsi], 0xdf
mov eax, dword [rsp + 0x54]
mov r9, rsi
mov rcx, qword [rbp - 0x70]
add eax, eax
mov dword [rsp + 0x28], edx
mov r8d, edi
mov rdx, r15
mov dword [rsp + 0x20], eax
call fcn.180050558
xor edx, edx
test r14, r14
je 0x18003a3c5
test ebx, ebx
jne 0x18003a3c9
mov rax, qword [rbp - 0x60]
test rax, rax
jne 0x18003a25e
test ebx, ebx
je 0x18003a3e4
mov ecx, ebx
call fcn.180011120
mov edx, eax
mov r9, r13
mov r8d, 0x1c62
mov ecx, edi
call fcn.180038d90
xor edx, edx
test rsi, rsi
je 0x18003a3fa
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor edx, edx
mov qword [rsp + 0x60], rdx
test r13, r13
je 0x18003a415
mov rcx, r13
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor edx, edx
mov qword [rsp + 0x78], rdx
cmp dword [rsp + 0x50], edx
jne 0x18003a43e
test r15, r15
je 0x18003a436
mov rcx, r15
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor edx, edx
mov r15, rdx
mov qword [rsp + 0x68], rdx
mov r12, qword [rbp - 0x80]
test r12, r12
je 0x18003a455
mov rcx, r12
call fcn.1800117f4
xor edx, edx
mov qword [rbp - 0x80], rdx
mov r14, qword gs:[0x58]
mov esi, dword [0x18008b2a0]
mov r12d, dword [rsp + 0x58]
cmp dword [rbp - 0x64], edx
mov eax, edx
cmove eax, ebx
mov ebx, eax
cmp eax, 3
jne 0x18003a486
mov rax, qword [r14 + rsi*8]
mov ebx, edx
mov ecx, 0x88
mov dword [rcx + rax], edi
test ebx, ebx
jne 0x18003a4f7
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x38]
call fcn.180016dcc
xor r13d, r13d
test eax, eax
jne 0x180039f35
jmp 0x18003a4fa
test r12b, 4
je 0x18003a4b3
test ebx, ebx
jne 0x18003a4b3
test r13, r13
je 0x18003a48a
mov word [rbp - 0x20], dx
lea rax, [rsp + 0x54]
mov edx, edi
mov qword [rsp + 0x20], rax
mov r9d, 0x104
lea r8, [rbp - 0x20]
lea rcx, [rbp - 0x38]
call fcn.180017340
mov ecx, ebx
call fcn.180011120
mov edx, eax
lea r9, [rbp - 0x20]
mov r8d, 0x1c62
mov ecx, edi
call fcn.180038d90
xor edx, edx
jmp 0x18003a469
xor r13d, r13d
mov edx, edi
lea rcx, [rbp - 0x78]
call fcn.18004cd24
cmp qword [rbp - 0x70], r13
jmp 0x180039f08
mov eax, 1
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.180002a90
add rsp, 0x308
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret