Function at 0x1801094c0
Capabilities:
Enumerate services

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov dword [rsp + 0x70], 1
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x78], 0
mov dword [rsp + 0x74], 0
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x88], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
cmp qword [rsp + 0xa8], 0
je 0x180109557
cmp qword [rsp + 0xb0], 0
jne 0x18010956a
lea rcx, str.GetNewTagId___Invalid_Parameter_n
call fcn.1801045e0
xor eax, eax
jmp 0x180109a22
mov r8d, 0xc
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x18010959b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
jmp 0x180109944
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x1801095c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x1801351d0]
call fcn.1801045e0
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x74]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x80]
mov r8d, 3
mov edx, 0xb
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jne 0x1801096eb
cmp dword [rsp + 0x74], 0
je 0x1801096eb
mov eax, dword [rsp + 0x74]
add rax, 0x30
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x74]
xor edx, edx
mov ecx, 0x30
div rcx
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x74]
mov rcx, rax
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
je 0x1801096d5
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x74]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x80]
mov r8d, 3
mov edx, 0xb
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jne 0x1801096d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x1801096d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
jmp 0x180109944
jmp 0x1801096e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
jmp 0x180109944
jmp 0x1801096ff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
jmp 0x180109944
cmp qword [rsp + 0x58], 0
je 0x18010973c
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 1
jne 0x180109728
mov qword [rsp + 0x58], 0
jmp 0x18010973c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x180135230]
call fcn.1801045e0
mov ecx, 0x1ffe
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x180109768
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
jmp 0x180109944
mov dword [rsp + 0x88], 0
jmp 0x180109785
mov eax, dword [rsp + 0x88]
inc eax
mov dword [rsp + 0x88], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x88], eax
jae 0x180109936
mov eax, dword [rsp + 0x88]
imul rax, rax, 0x30
mov r8d, 1
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rcx + rax]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x18010991d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x1801097fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetNewTagId___Cant_lock_the_SCM_Database__d__n
call fcn.1801045e0
lea r9, [rsp + 0x74]
mov r8d, 0x1ffe
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 1
jne 0x180109883
mov eax, dword [rsp + 0x88]
imul rax, rax, 0x30
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x80]
mov rcx, qword [rcx + rax]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
je 0x180109881
mov rdx, qword [rsp + 0xa8]
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
jne 0x180109881
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x20]
cmp dword [rsp + 0x6c], eax
ja 0x180109881
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x20]
inc eax
mov dword [rsp + 0x6c], eax
jmp 0x180109897
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetNewTagId___Cant_query_a_service_config_data__d__n
call fcn.1801045e0
cmp qword [rsp + 0x58], 0
je 0x1801098d4
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 1
jne 0x1801098c0
mov qword [rsp + 0x58], 0
jmp 0x1801098d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetNewTagId___Cant_unlock_the_SCM_Database__d__n
call fcn.1801045e0
mov r8d, 0x1ffe
xor edx, edx
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jne 0x180109912
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetNewTagId___Cant_close_the_service__d__n
call fcn.1801045e0
jmp 0x18010991b
mov qword [rsp + 0x60], 0
jmp 0x180109931
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetNewTagId___Cant_open_the_service__d___but_continue..._n
call fcn.1801045e0
jmp 0x180109775
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0x6c]
mov dword [rax], ecx
cmp qword [rsp + 0x50], 0
je 0x180109960
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.msvcrt.dll_free]
mov qword [rsp + 0x50], 0
cmp qword [rsp + 0x80], 0
je 0x180109985
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.msvcrt.dll_free]
mov qword [rsp + 0x80], 0
cmp qword [rsp + 0x60], 0
je 0x1801099b8
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 1
jne 0x1801099ae
mov qword [rsp + 0x60], 0
jmp 0x1801099b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
cmp qword [rsp + 0x58], 0
je 0x1801099eb
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 1
jne 0x1801099e1
mov qword [rsp + 0x58], 0
jmp 0x1801099eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
cmp qword [rsp + 0x48], 0
je 0x180109a1e
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 1
jne 0x180109a14
mov qword [rsp + 0x48], 0
jmp 0x180109a1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x68]
add rsp, 0x98
ret