Function at 0x140018ff0
Capabilities:
Query or enumerate registry value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
call fcn.140018bf0
xor r8d, r8d
xor ecx, ecx
mov edx, 1
lea r9, str.__wine_SvcctlStarted
call qword [sym.imp.kernel32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
mov rsi, qword [sym.imp.advapi32.dll_RegCreateKeyExW]
mov r12, rax
mov dword [rsp + 0x28], 3
mov rcx, 0xffffffff80000002
lea rax, [0x1400200e0]
mov dword [rsp + 0x20], 1
mov qword [rsp + 0x40], 0
lea rdx, str.SYSTEMCurrentControlSetControlServiceCurrent
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
call rsi
test eax, eax
je 0x140019085
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea r14, [rsp + 0x98]
mov rcx, 0xffffffff80000002
lea rdx, str.SystemCurrentControlSetControl
mov r8, r14
call qword [sym.imp.advapi32.dll_RegOpenKeyW]
test eax, eax
jne 0x140019191
lea rbp, [rsp + 0x8c]
xor r8d, r8d
mov rcx, qword [rsp + 0x98]
mov dword [rsp + 0x90], pe_nt_image_headers64
lea r13, [rsp + 0x90]
mov rdi, qword [sym.imp.advapi32.dll_RegQueryValueExW]
mov r9, rbp
lea rbx, [rsp + 0xa0]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rbx
lea rdx, str.ServicesPipeTimeout
call rdi
test eax, eax
jne 0x140019109
cmp dword [rsp + 0x8c], 1
je 0x1400192e3
xor r8d, r8d
mov rcx, qword [rsp + 0x98]
mov qword [rsp + 0x28], r13
mov r9, rbp
mov qword [rsp + 0x20], rbx
lea rdx, str.WaitToKillServiceTimeout
mov dword [rsp + 0x90], pe_nt_image_headers64
call rdi
test eax, eax
jne 0x140019147
cmp dword [rsp + 0x8c], 1
je 0x14001930e
lea rax, [rsp + 0x94]
xor r8d, r8d
mov rcx, qword [rsp + 0x98]
mov dword [rsp + 0x90], 4
mov qword [rsp + 0x28], r13
mov r9, rbp
mov qword [rsp + 0x20], rax
lea rdx, str.AutoStartDelay
call rdi
test eax, eax
je 0x1400192b6
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.advapi32.dll_RegCloseKey]
mov rdi, qword [sym.imp.ucrtbase.dll_malloc]
mov ecx, 0x58
call rdi
test rax, rax
mov qword [0x140020020], rax
je 0x140019870
lea rdx, [rax + 0x10]
mov dword [rax + 8], 0
mov qword [rax + 0x18], rdx
lea rcx, [rax + 0x30]
mov qword [rax + 0x10], rdx
lea rdx, [rax + 0x20]
mov qword [rax + 0x28], rdx
lea rbx, str..._.._wine_programs_services_services.c:_scmdatabase
mov qword [rax + 0x20], rdx
call qword [sym.imp.kernel32.dll_InitializeCriticalSection]
mov rax, qword [0x140020020]
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov rdx, qword [rax + 0x30]
mov qword [rdx + 0x28], rbx
lea rdx, str.SystemCurrentControlSetServices
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2000000
mov dword [rsp + 0x20], 0
call rsi
mov rcx, qword [0x140020020]
test eax, eax
mov ebx, eax
jne 0x1400192d6
call fcn.140007220
test eax, eax
jne 0x140019071
call fcn.1400057e0
mov rsi, qword [sym.imp.ucrtbase.dll_free]
test eax, eax
mov dword [rsp + 0x54], eax
je 0x140019365
mov r12, qword [0x140020020]
mov rcx, qword [r12]
call qword [sym.imp.advapi32.dll_RegCloseKey]
mov rax, qword [r12 + 0x30]
lea rcx, [r12 + 0x30]
mov qword [rax + 0x28], 0
call qword [sym.imp.kernel32.dll_DeleteCriticalSection]
mov rcx, r12
call rsi
mov rcx, qword [0x1400200e8]
test rcx, rcx
je 0x1400192a0
call sub.userenv.dll_DestroyEnvironmentBlock
test byte [0x14001a070], 8
jne 0x140019339
mov eax, dword [rsp + 0x54]
jmp 0x140019071
cmp dword [rsp + 0x8c], 4
jne 0x140019183
mov eax, dword [rsp + 0x94]
mov dword [0x14001a064], eax
jmp 0x140019183
call qword [sym.imp.ucrtbase.dll_free]
mov eax, ebx
jmp 0x140019071
xor edx, edx
mov r8d, 0xa
mov rcx, rbx
call qword [sym.imp.ucrtbase.dll_wcstol]
test eax, eax
mov dword [rsp + 0x94], eax
je 0x140019109
mov dword [0x14001a06c], eax
jmp 0x140019109
xor edx, edx
mov r8d, 0xa
mov rcx, rbx
call qword [sym.imp.ucrtbase.dll_wcstol]
test eax, eax
mov dword [rsp + 0x94], eax
je 0x140019147
mov dword [0x14001a068], eax
jmp 0x140019147
mov eax, dword [rsp + 0x54]
lea r9, str.services.exe_exited_with_code__ld_n
mov ecx, 3
lea r8, str.main
lea rdx, [0x14001a070]
mov dword [rsp + 0x20], eax
call fcn.140005ec0
jmp 0x1400192ad
mov rax, qword [0x140020020]
mov ecx, 0x100
mov qword [rsp + 0x60], rax
call rdi
test rax, rax
mov r13, rax
je 0x14001987c
xor r8d, r8d
xor ecx, ecx
mov r9d, 4
lea rdx, str.ROOT
call sub.setupapi.dll_SetupDiGetClassDevsW
cmp rax, 0xffffffffffffffff
mov r15, rax
je 0x1400197d1
mov rsi, qword [rsp + 0x60]
lea rax, [rsi + 0x30]
mov qword [rsp + 0x68], rax
mov rcx, rax
mov rax, qword [sym.imp.kernel32.dll_EnterCriticalSection]
mov qword [rsp + 0x58], rax
call rax
mov rbp, qword [rsi + 0x20]
lea rax, [rsi + 0x20]
cmp rax, rbp
je 0x140019833
mov qword [rsp + 0x70], r12
xor ebx, ebx
mov esi, 0x20
mov r12, r13
mov qword [rsp + 0x78], rdi
mov rdi, rax
cmp dword [rbp + 0x54], 2
jbe 0x14001940a
cmp r15, 0xffffffffffffffff
je 0x14001943a
mov rdx, rbp
mov rcx, r15
call fcn.140005b30
test eax, eax
je 0x14001943a
lea r13d, [rbx + 1]
cmp r13d, esi
jb 0x14001942e
lea edx, [rsi + rsi]
mov rcx, r12
mov rsi, rdx
shl rdx, 3
call qword [sym.imp.ucrtbase.dll_realloc]
test rax, rax
je 0x140019443
mov r12, rax
lock add dword [rbp + 0x18], 1
mov qword [r12 + rbx*8], rbp
mov ebx, r13d
mov rbp, qword [rbp]
cmp rbp, rdi
jne 0x1400193ef
mov r13, r12
mov rdi, qword [rsp + 0x78]
mov r12, qword [rsp + 0x70]
mov rax, qword [sym.imp.kernel32.dll_LeaveCriticalSection]
xor esi, esi
xor ebp, ebp
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x68], rax
call rax
mov edx, ebx
mov r8d, 8
mov rcx, r13
lea r9, [0x140005a90]
call qword [sym.imp.ucrtbase.dll_qsort]
mov rcx, qword [rsp + 0x60]
or edx, 0xffffffff
call fcn.140007b70
mov qword [rsp + 0x70], r12
jmp 0x1400194ad
lea rax, [0x14001a070]
test byte [rax], 8
jne 0x1400194ee
mov eax, esi
add esi, 1
mov qword [r13 + rax*8], r12
add rbp, 1
cmp ebx, ebp
jbe 0x14001951e
mov r12, qword [r13 + rbp*8]
cmp dword [r12 + 0xc8], 0
jne 0x140019493
xor edx, edx
xor r8d, r8d
mov rcx, r12
call fcn.140008c30
test eax, eax
mov edx, eax
je 0x1400194e4
lea rax, [0x14001a070]
test byte [rax], 1
jne 0x140019744
mov rcx, r12
call fcn.140007190
jmp 0x1400194a9
mov rcx, qword [r12 + 0x20]
call fcn.140005f90
lea r9, str.delayed_starting__s_n
mov ecx, 3
mov qword [rsp + 0x20], rax
lea r8, str.scmdatabase_autostart_services
lea rdx, [0x14001a070]
call fcn.140005ec0
jmp 0x14001949f
mov r12, qword [rsp + 0x70]
xor r8d, r8d
mov eax, 1
mov rbx, qword [rsp + 0x60]
lock cmpxchg dword [rbx + 8], r8d
test esi, esi
je 0x1400197b8
call qword [sym.imp.kernel32.dll_CreateThreadpoolCleanupGroup]
test rax, rax
mov qword [0x1400200d8], rax
je 0x140019780
mov qword [rsp + 0x60], rax
mov ecx, 0x10
call rdi
mov rdx, qword [rsp + 0x60]
mov r8d, 0
test rax, rax
mov r10, rax
je 0x1400197b8
lea rbx, [rsp + 0xa0]
mov dword [rax], esi
mov ecx, 0x10
mov qword [rax + 8], r13
mov rdi, rbx
mov eax, r8d
mov r8, rbx
rep stosd dword [rdi], eax
lea rax, [0x140007b20]
mov qword [rsp + 0x60], r10
mov qword [rsp + 0xb8], rax
mov eax, dword [0x14001a064]
lea rcx, [0x140008df0]
mov qword [rsp + 0xb0], rdx
mov rdx, r10
mov dword [rsp + 0xa0], 1
imul rax, rax, 0xffffffffffffd8f0
mov dword [rsp + 0x98], eax
sar rax, 0x20
mov dword [rsp + 0x9c], eax
call qword [sym.imp.kernel32.dll_CreateThreadpoolTimer]
mov r10, qword [rsp + 0x60]
test rax, rax
mov rcx, rax
je 0x14001981c
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
call qword [sym.imp.kernel32.dll_SetThreadpoolTimer]
mov rsi, qword [sym.imp.ucrtbase.dll_free]
mov rcx, r15
call sub.setupapi.dll_SetupDiDestroyDeviceInfoList
mov rcx, r12
call qword [sym.imp.kernel32.dll_SetEvent]
mov rax, qword [0x14001da60]
or edx, 0xffffffff
mov r14, qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov rcx, qword [rax]
call r14
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0xa0], rbx
mov rdi, qword [0x140020020]
mov qword [rsp + 0xa8], rbx
lea r12, [rdi + 0x30]
lea r13, [rdi + 0x10]
mov rcx, r12
call rax
mov rax, qword [rdi + 0x10]
cmp r13, rax
je 0x140019812
mov rdx, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0x68]
mov qword [rdx], rax
mov rdx, qword [rsp + 0xa8]
mov qword [rax + 8], rdx
mov rax, qword [rdi + 0x18]
mov qword [rsp + 0xa8], rax
mov qword [rax], rbx
mov qword [rdi + 0x18], r13
mov qword [rdi + 0x10], r13
jmp 0x1400196fc
test r15, r15
je 0x140019709
lock add dword [r15 + 0x18], 1
mov rcx, r15
call fcn.140007c20
mov rcx, r12
call rbp
or edx, 0xffffffff
mov rcx, qword [r15 + 0x28]
call r14
mov rax, qword [rsp + 0x58]
mov rcx, r12
call rax
mov rdx, qword [r15]
mov rcx, r15
mov rax, qword [r15 + 8]
mov qword [rdx + 8], rax
mov rdx, qword [r15]
mov qword [rax], rdx
mov qword [r15], r13
mov rax, qword [rdi + 0x18]
mov qword [r15 + 8], rax
mov qword [rax], r15
mov qword [rdi + 0x18], r15
call fcn.140007020
mov r15, qword [rsp + 0xa0]
cmp r15, rbx
jne 0x1400196a5
mov rcx, r12
mov rax, qword [rsp + 0x68]
call rax
mov rcx, qword [0x1400200d8]
test rcx, rcx
je 0x14001973a
xor r8d, r8d
mov edx, 1
call qword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroupMembers]
mov rcx, qword [0x1400200d8]
call qword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroup]
call fcn.1400059f0
jmp 0x140019261
mov rcx, qword [r12 + 0x20]
mov dword [rsp + 0x78], edx
call fcn.140005f90
mov edx, dword [rsp + 0x78]
lea r9, str.Auto_start_service__s_failed_to_start:__ld_n
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.scmdatabase_autostart_services
mov dword [rsp + 0x28], edx
lea rdx, [0x14001a070]
call fcn.140005ec0
jmp 0x1400194e4
test byte [0x14001a070], 2
je 0x1400197b8
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x68]
lea r9, str.CreateThreadpoolCleanupGroup_failed_with_error__lu_n
mov ecx, 1
lea r8, str.schedule_delayed_autostart
lea rdx, [0x14001a070]
mov dword [rsp + 0x20], eax
call fcn.140005ec0
mov rsi, qword [sym.imp.ucrtbase.dll_free]
lea rbx, [rsp + 0xa0]
mov rcx, r13
call rsi
jmp 0x140019612
test byte [0x14001a070], 2
je 0x1400193a8
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x68]
lea r9, str.Failed_to_enumerate_devices__error__lx._n
mov ecx, 1
lea r8, str.scmdatabase_autostart_services
lea rdx, [0x14001a070]
mov dword [rsp + 0x20], eax
call fcn.140005ec0
jmp 0x1400193a8
mov rbp, qword [rsp + 0x68]
jmp 0x1400196fc
test byte [0x14001a070], 2
jne 0x14001983a
mov rsi, qword [sym.imp.ucrtbase.dll_free]
mov rcx, r10
call rsi
jmp 0x1400197c7
xor ebx, ebx
jmp 0x140019450
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x68]
lea r9, str.CreateThreadpoolWait_failed:__lu_n
mov ecx, 1
lea r8, str.schedule_delayed_autostart
lea rdx, [0x14001a070]
mov dword [rsp + 0x20], eax
call fcn.140005ec0
mov r10, qword [rsp + 0x60]
jmp 0x140019825
mov ebx, 0x46a
mov eax, ebx
jmp 0x140019071
mov rax, qword [sym.imp.kernel32.dll_EnterCriticalSection]
lea rbx, [rsp + 0xa0]
mov qword [rsp + 0x58], rax
mov rax, qword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov qword [rsp + 0x68], rax
jmp 0x14001961a