Function at 0x416ed0
Capabilities:
Get process heap flags
Query or enumerate registry value

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x108
call fcn.004162b0
mov dword [esp + 0xc], str.__wine_SvcctlStarted
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
sub esp, 0x10
mov dword [ebp - 0xbc], eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0x41f0b8
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 3
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.SYSTEMCurrentControlSetControlServiceCurrent
mov dword [esp], 0x80000002
call sub.advapi32.dll_RegCreateKeyExW
sub esp, 0x24
test eax, eax
je 0x416f79
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
lea eax, [ebp - 0xac]
mov dword [esp + 4], str.SystemCurrentControlSetControl
mov dword [esp + 8], eax
mov dword [esp], 0x80000002
call sub.advapi32.dll_RegOpenKeyW
sub esp, 0xc
test eax, eax
jne 0x417098
mov eax, dword [ebp - 0xac]
lea edi, [ebp - 0xa4]
lea ebx, [ebp - 0x98]
mov dword [esp + 8], 0
lea esi, [ebp - 0xa8]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.ServicesPipeTimeout
mov dword [esp], eax
mov dword [ebp - 0xa4], pe_nt_image_headers32
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
jne 0x416ffc
cmp dword [ebp - 0xa8], 1
je 0x417262
mov eax, dword [ebp - 0xac]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], str.WaitToKillServiceTimeout
mov dword [esp], eax
mov dword [ebp - 0xa4], pe_nt_image_headers32
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
jne 0x417044
cmp dword [ebp - 0xa8], 1
je 0x417293
lea eax, [ebp - 0xa0]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xac]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], str.AutoStartDelay
mov dword [esp], eax
mov dword [ebp - 0xa4], 4
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
je 0x417214
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
push eax
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0xc0], eax
call eax
mov dword [0x41f164], eax
sub esp, 0xc
test eax, eax
je 0x417256
lea ecx, [eax + 0x10]
mov dword [eax + 4], 0
movd xmm1, ecx
lea ecx, [eax + 8]
add eax, 0x18
movd xmm0, ecx
punpckldq xmm1, xmm1
punpckldq xmm0, xmm0
punpcklqdq xmm0, xmm1
movups xmmword [eax - 0x10], xmm0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_InitializeCriticalSection]
mov eax, dword [0x41f164]
push edi
mov edx, dword [eax + 0x18]
mov dword [edx + 0x18], str..._wine_programs_services_services.c:_scmdatabase
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x2000000
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.SystemCurrentControlSetServices
mov dword [esp], 0x80000002
call sub.advapi32.dll_RegCreateKeyExW
mov esi, eax
sub esp, 0x24
mov eax, dword [0x41f164]
test esi, esi
jne 0x417231
call fcn.00406910
test eax, eax
jne 0x416f6d
call fcn.00405550
mov edx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc8], edx
test eax, eax
je 0x4172f7
mov ebx, dword [0x41f164]
mov eax, dword [ebx]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
push edx
mov eax, dword [ebx + 0x18]
mov dword [eax + 0x18], 0
lea eax, [ebx + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
push ecx
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc8]
call eax
mov eax, dword [0x41f0bc]
sub esp, 0xc
test eax, eax
je 0x4171fc
mov dword [esp], eax
call sub.userenv.dll_DestroyEnvironmentBlock
push eax
test byte [0x418070], 8
jne 0x4172c4
mov eax, dword [ebp - 0xcc]
jmp 0x416f6d
cmp dword [ebp - 0xa8], 4
jne 0x417089
mov eax, dword [ebp - 0xa0]
mov dword [0x418064], eax
jmp 0x417089
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, esi
sub esp, 0xc
jmp 0x416f6d
mov esi, 0x46a
mov eax, esi
jmp 0x416f6d
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x416ffc
mov dword [0x41806c], eax
jmp 0x416ffc
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x417044
mov dword [0x418068], eax
jmp 0x417044
mov eax, dword [ebp - 0xcc]
mov dword [esp + 0xc], str.services.exe_exited_with_code__d_n
mov dword [esp + 8], str.main
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x418070
mov dword [esp], 3
call fcn.00405aa0
jmp 0x417209
mov eax, dword [0x41f164]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], 0
mov dword [ebp - 0xe4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc0]
call eax
mov dword [ebp - 0xc4], eax
sub esp, 0xc
test eax, eax
je 0x41785f
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.ROOT
mov dword [esp], 0
call sub.setupapi.dll_SetupDiGetClassDevsW
mov dword [ebp - 0xdc], eax
sub esp, 0x10
add eax, 1
je 0x417880
mov edi, dword [ebp - 0xe4]
lea eax, [edi + 0x18]
add edi, 0x10
mov dword [ebp - 0xe8], eax
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebp - 0xd8], eax
call eax
mov ecx, 0x20
mov eax, dword fs:[0x18]
mov dword [ebp - 0xe0], eax
push esi
xor esi, esi
mov ebx, dword [edi]
mov dword [ebp - 0xc8], edi
mov edi, ecx
cmp ebx, dword [ebp - 0xc8]
je 0x417447
cmp dword [ebx + 0x38], 2
jbe 0x4173d3
mov eax, dword [ebp - 0xdc]
cmp eax, 0xffffffff
je 0x417440
lea edx, [ebx + 0x10]
call fcn.004059d0
test eax, eax
je 0x417440
lea edx, [esi + 1]
cmp edx, edi
jb 0x417430
lea eax, [edi + edi]
shl edi, 3
mov dword [esp + 4], 0
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0xc4]
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xe0]
mov dword [ebp - 0xd0], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov edx, dword [ebp - 0xd0]
sub esp, 0x10
test eax, eax
je 0x417447
mov dword [ebp - 0xc4], eax
mov edi, dword [ebp - 0xd4]
lock add dword [ebx + 0xc], 1
mov eax, dword [ebp - 0xc4]
mov dword [eax + esi*4], ebx
mov esi, edx
mov ebx, dword [ebx]
jmp 0x4173aa
mov eax, dword [ebp - 0xe8]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0xd4], eax
call eax
mov edi, dword [ebp - 0xc4]
push ebx
xor ebx, ebx
mov dword [esp + 0xc], 0x4058d0
mov dword [esp + 8], 4
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_qsort]
mov eax, dword [ebp - 0xe4]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call fcn.004073e0
mov dword [ebp - 0xd0], esi
mov dword [ebp - 0xc8], 0
jmp 0x4174c9
test byte [0x418070], 8
jne 0x41750d
mov eax, dword [ebp - 0xc8]
mov dword [edi + eax*4], esi
add eax, 1
mov dword [ebp - 0xc8], eax
add ebx, 1
cmp dword [ebp - 0xd0], ebx
je 0x417542
mov esi, dword [edi + ebx*4]
cmp dword [esi + 0x7c], 0
jne 0x4174ab
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.004088f0
test eax, eax
je 0x417503
test byte [0x418070], 1
jne 0x41781a
mov dword [esp], esi
call fcn.00406890
jmp 0x4174c6
mov eax, dword [esi + 0x10]
call fcn.00405b90
mov dword [esp + 0xc], str.delayed_starting__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 4], 0x418070
mov dword [esp], 3
call fcn.00405aa0
jmp 0x4174b4
mov edx, dword [ebp - 0xe4]
xor esi, esi
mov eax, 1
lock cmpxchg dword [edx + 4], esi
cmp dword [ebp - 0xc8], 0
je 0x4177d8
call dword [sym.imp.kernel32.dll_CreateThreadpoolCleanupGroup]
mov dword [0x41f0b4], eax
test eax, eax
je 0x4178ce
mov dword [esp + 8], 8
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0xd0], eax
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc0]
call eax
mov dword [ebp - 0xc0], eax
sub esp, 0xc
test eax, eax
je 0x4177d8
mov eax, dword [ebp - 0xc0]
mov edx, dword [ebp - 0xc8]
mov ecx, 7
lea ebx, [ebp - 0x98]
mov dword [eax], edx
mov edx, dword [ebp - 0xc4]
mov dword [eax + 4], edx
lea edx, [ebp - 0x94]
mov eax, esi
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [0x41f0b4]
mov ecx, 0xffffd8f0
mov dword [ebp - 0x98], 1
mov dword [ebp - 0x8c], 0x407350
mov dword [ebp - 0x90], eax
mov eax, ecx
mul dword [0x418064]
sub edx, dword [0x418064]
mov dword [esp + 8], ebx
mov dword [ebp - 0x9c], edx
mov esi, eax
mov eax, dword [ebp - 0xc0]
mov dword [esp], 0x408e40
mov dword [ebp - 0xa0], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CreateThreadpoolTimer]
sub esp, 0xc
test eax, eax
je 0x417922
lea edx, [ebp - 0xa0]
mov dword [esp], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_SetThreadpoolTimer]
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0x10
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xdc]
mov dword [esp], eax
call sub.setupapi.dll_SetupDiDestroyDeviceInfoList
push ecx
mov eax, dword [ebp - 0xbc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetEvent]
push eax
mov eax, dword [0x41f160]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [esp + 4], 0xffffffff
mov dword [ebp - 0xc4], eax
call eax
mov esi, dword [0x41f164]
mov dword [ebp - 0x98], ebx
push eax
push eax
lea edi, [esi + 0x18]
mov eax, dword [ebp - 0xd8]
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0xd0], edi
mov dword [esp], edi
call eax
lea ecx, [esi + 8]
push edx
mov eax, dword [esi + 8]
mov dword [ebp - 0xc0], ecx
cmp ecx, eax
je 0x4178bd
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0xbc], ebx
mov dword [edx], eax
mov edx, dword [ebp - 0x94]
mov dword [eax + 4], edx
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x94], eax
mov dword [eax], ebx
mov dword [esi + 0xc], ecx
mov dword [esi + 8], ecx
jmp 0x41777a
test ebx, ebx
je 0x417788
lock add dword [ebx + 0xc], 1
mov eax, dword [ebp - 0xd4]
mov dword [esp], edi
call eax
push eax
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc4]
call eax
push eax
push eax
mov eax, dword [ebp - 0xd8]
mov dword [esp], edi
call eax
push eax
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov dword [ecx + 4], eax
mov ecx, dword [ebx]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc0]
mov dword [ebx], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov dword [esi + 0xc], ebx
mov dword [esp], ebx
call fcn.00406620
mov ebx, dword [ebp - 0x98]
cmp ebx, dword [ebp - 0xbc]
jne 0x41771a
mov eax, dword [ebp - 0xd0]
mov dword [esp], eax
mov eax, dword [ebp - 0xd4]
call eax
mov eax, dword [0x41f0b4]
push esi
test eax, eax
je 0x4177ce
mov dword [esp], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 1
call dword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroupMembers]
mov eax, dword [0x41f0b4]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroup]
push ebx
call fcn.00405780
jmp 0x41719c
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
lea ebx, [ebp - 0x98]
mov dword [ebp - 0xc8], eax
mov edx, dword [ebp - 0xc4]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc8]
call eax
sub esp, 0xc
jmp 0x417677
mov dword [ebp - 0xe0], eax
mov eax, dword [esi + 0x10]
call fcn.00405b90
mov ecx, dword [ebp - 0xe0]
mov dword [esp + 0xc], str.Auto_start_service__s_failed_to_start:__d_n
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 4], 0x418070
mov dword [esp], 0
call fcn.00405aa0
jmp 0x417503
mov eax, dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea ebx, [ebp - 0x98]
mov dword [ebp - 0xd8], eax
mov eax, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0xd4], eax
jmp 0x417686
test byte [0x418070], 2
je 0x41736a
mov eax, dword [ebx + 0x34]
mov dword [esp + 0xc], str.Failed_to_enumerate_devices__error__x._n
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x418070
mov dword [esp], 1
call fcn.00405aa0
jmp 0x41736a
mov dword [ebp - 0xbc], ebx
mov edi, dword [ebp - 0xd0]
jmp 0x41777a
test byte [0x418070], 2
je 0x4177d8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], 1
lea ebx, [ebp - 0x98]
mov dword [esp + 0xc], str.CreateThreadpoolCleanupGroup_failed_with_error__u_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.schedule_delayed_autostart
mov dword [esp + 4], 0x418070
call fcn.00405aa0
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0xc8], eax
jmp 0x4177e9
test byte [0x418070], 2
jne 0x417961
mov edx, dword [ebp - 0xc0]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0xc8], eax
call eax
sub esp, 0xc
jmp 0x4177e9
mov eax, dword [ebp - 0xd0]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.CreateThreadpoolWait_failed:__u_n
mov dword [esp + 8], str.schedule_delayed_autostart
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x418070
mov dword [esp], 1
call fcn.00405aa0
jmp 0x41792b