Function at 0x417cb0
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.00417bf0
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], 0x41d0d8
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 0x417d59
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 0x417e72
xor eax, eax
lea edi, [ebp - 0xa4]
lea esi, [ebp - 0x98]
mov dword [ebp - 0xa4], pe_nt_image_headers32
lea ebx, [ebp - 0xa8]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.ServicesPipeTimeout
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
jne 0x417dda
cmp dword [ebp - 0xa8], 1
je 0x418005
mov dword [ebp - 0xa4], pe_nt_image_headers32
xor ecx, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.WaitToKillServiceTimeout
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
jne 0x417e20
cmp dword [ebp - 0xa8], 1
je 0x418034
mov dword [ebp - 0xa4], 4
lea eax, [ebp - 0xa0]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.AutoStartDelay
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call sub.advapi32.dll_RegQueryValueExW
sub esp, 0x18
test eax, eax
je 0x417fb9
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
push eax
xor eax, eax
mov dword [esp + 8], 0x30
mov edi, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 4], eax
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov dword [0x41d020], eax
sub esp, 0xc
test eax, eax
je 0x417ff9
xor edx, edx
xor esi, esi
mov dword [eax + 4], edx
lea edx, [eax + 8]
mov dword [eax + 0xc], edx
mov dword [eax + 8], edx
lea edx, [eax + 0x10]
add eax, 0x18
mov dword [eax - 4], edx
mov dword [eax - 8], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_InitializeCriticalSection]
push ecx
mov eax, dword [0x41d020]
mov edx, dword [eax + 0x18]
mov dword [edx + 0x18], str._Users_developer_Projects_Mac_mt4_Wine_WineSource_builder_sources_wine_programs_services_services.c:_scmdatabase
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], 0x2000000
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], str.SystemCurrentControlSetServices
mov dword [esp], 0x80000002
call sub.advapi32.dll_RegCreateKeyExW
mov esi, eax
sub esp, 0x24
mov eax, dword [0x41d020]
test esi, esi
jne 0x417fd6
call fcn.00406e20
test eax, eax
jne 0x417d4d
call fcn.00405800
mov dword [ebp - 0xc8], eax
test eax, eax
je 0x418096
mov ebx, dword [0x41d020]
xor edi, edi
mov eax, dword [ebx]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
xor ecx, ecx
push edx
mov eax, dword [ebx + 0x18]
mov dword [eax + 0x18], ecx
lea eax, [ebx + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
push esi
mov eax, dword fs:[0x18]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [0x41d0dc]
sub esp, 0xc
test eax, eax
je 0x417fa1
mov dword [esp], eax
call sub.userenv.dll_DestroyEnvironmentBlock
push eax
test byte [0x419070], 8
jne 0x418063
mov eax, dword [ebp - 0xc8]
jmp 0x417d4d
cmp dword [ebp - 0xa8], 4
jne 0x417e63
mov eax, dword [ebp - 0xa0]
mov dword [0x419064], eax
jmp 0x417e63
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
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 0x417d4d
mov esi, 0x46a
mov eax, esi
jmp 0x417d4d
xor eax, eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x417dda
mov dword [0x41906c], eax
jmp 0x417dda
xor edx, edx
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x417e20
mov dword [0x419068], eax
jmp 0x417e20
mov eax, dword [ebp - 0xc8]
mov dword [esp + 0xc], str.services.exe_exited_with_code__ld_n
mov dword [esp + 8], str.main
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x419070
mov dword [esp], 3
call fcn.00405ff0
jmp 0x417fae
mov eax, dword [0x41d020]
mov dword [ebp - 0xe0], eax
xor eax, eax
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov dword [ebp - 0xc0], eax
sub esp, 0xc
test eax, eax
je 0x418607
xor ecx, ecx
xor esi, esi
mov dword [esp + 0xc], 4
mov dword [esp + 8], ecx
mov dword [esp + 4], str.ROOT
mov dword [esp], esi
call sub.setupapi.dll_SetupDiGetClassDevsW
mov dword [ebp - 0xd8], eax
sub esp, 0x10
add eax, 1
je 0x418628
mov ebx, dword [ebp - 0xe0]
xor esi, esi
lea eax, [ebx + 0x18]
mov dword [ebp - 0xe4], eax
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebp - 0xd4], eax
call eax
mov eax, ebx
mov ecx, 0x20
add eax, 0x10
push edx
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 0xc4], eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0xe8], edi
mov edi, ecx
mov eax, dword [ebp - 0xc4]
cmp ebx, eax
je 0x4181e6
cmp dword [ebx + 0x38], 2
jbe 0x418170
mov eax, dword [ebp - 0xd8]
cmp eax, 0xffffffff
je 0x4181e2
mov edx, ebx
call fcn.00405c30
test eax, eax
je 0x4181e2
lea edx, [esi + 1]
cmp edx, edi
jb 0x4181cb
lea eax, [edi + edi]
shl edi, 3
mov dword [ebp - 0xcc], edx
mov dword [ebp - 0xd0], eax
mov dword [esp + 0xc], edi
mov eax, dword [ebp - 0xc0]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xdc]
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 - 0xcc]
sub esp, 0x10
test eax, eax
je 0x4181e6
mov dword [ebp - 0xc0], eax
mov edi, dword [ebp - 0xd0]
lock add dword [ebx + 0xc], 1
mov eax, dword [ebp - 0xc0]
mov dword [eax + esi*4], ebx
mov ebx, dword [ebx]
mov esi, edx
jmp 0x418146
mov edx, esi
jmp 0x4181d9
mov eax, dword [ebp - 0xe4]
mov edi, dword [ebp - 0xe8]
xor ebx, ebx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0xd0], eax
call eax
push eax
mov dword [esp + 0xc], 0x405b90
mov dword [esp + 8], 4
mov dword [esp + 4], esi
mov eax, dword [ebp - 0xc0]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_qsort]
mov dword [esp + 4], 0xffffffff
mov ecx, dword [ebp - 0xe0]
mov dword [esp], ecx
call fcn.00407740
xor eax, eax
mov dword [ebp - 0xdc], edi
mov edi, dword [ebp - 0xc0]
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xcc], esi
jmp 0x418278
test byte [0x419070], 8
jne 0x4182b6
mov eax, dword [ebp - 0xc4]
mov dword [edi + eax*4], esi
add eax, 1
mov dword [ebp - 0xc4], eax
add ebx, 1
cmp dword [ebp - 0xcc], ebx
je 0x4182eb
mov esi, dword [edi + ebx*4]
cmp dword [esi + 0x7c], 0
jne 0x41825a
xor eax, eax
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call fcn.004088b0
test eax, eax
je 0x4182ac
test byte [0x419070], 1
jne 0x4185c4
mov dword [esp], esi
call fcn.00406da0
jmp 0x418275
mov eax, dword [esi + 0x10]
call fcn.004060e0
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], 0x419070
mov dword [esp], 3
call fcn.00405ff0
jmp 0x418263
mov edi, dword [ebp - 0xdc]
mov ecx, dword [ebp - 0xe0]
xor ebx, ebx
mov eax, 1
lock cmpxchg dword [ecx + 4], ebx
cmp dword [ebp - 0xc4], 0
je 0x4185ae
call dword [sym.imp.kernel32.dll_CreateThreadpoolCleanupGroup]
mov dword [0x41d0d4], eax
test eax, eax
je 0x418574
xor esi, esi
mov eax, dword fs:[0x18]
mov dword [ebp - 0xdc], eax
mov dword [esp + 8], 8
mov dword [esp + 4], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov dword [ebp - 0xcc], eax
sub esp, 0xc
test eax, eax
je 0x4185ae
mov eax, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0xc4]
lea edx, [ebp - 0x94]
lea esi, [ebp - 0x98]
mov edi, edx
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc0]
mov dword [eax + 4], ecx
mov eax, ebx
mov ecx, 7
rep stosd dword es:[edi], eax
mov eax, dword [0x41d0d4]
mov dword [ebp - 0x98], 1
mov dword [ebp - 0x8c], 0x4076b0
mov dword [ebp - 0x90], eax
mov eax, 0xffffd8f0
mul dword [0x419064]
sub edx, dword [0x419064]
mov dword [ebp - 0x9c], edx
mov ecx, eax
mov dword [ebp - 0xa0], ecx
mov dword [esp + 8], esi
mov eax, dword [ebp - 0xcc]
mov dword [esp], 0x408eb0
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CreateThreadpoolTimer]
sub esp, 0xc
test eax, eax
je 0x41867c
xor ebx, ebx
lea edx, [ebp - 0xa0]
mov dword [esp], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_SetThreadpoolTimer]
sub esp, 0x10
mov eax, dword [ebp - 0xd8]
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 dword [esp + 4], 0xffffffff
mov eax, dword [section..bss]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [ebp - 0xc0], eax
call eax
push eax
push eax
mov edi, dword [0x41d020]
mov dword [ebp - 0x98], esi
lea ebx, [edi + 0x18]
mov dword [ebp - 0x94], esi
mov dword [ebp - 0xcc], ebx
mov dword [esp], ebx
mov eax, dword [ebp - 0xd4]
call eax
lea eax, [edi + 8]
push edx
mov edx, dword [edi + 8]
cmp eax, edx
je 0x418665
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xbc], esi
mov dword [ecx], edx
mov ecx, dword [ebp - 0x94]
mov dword [edx + 4], ecx
mov edx, dword [edi + 0xc]
mov dword [ebp - 0x94], edx
mov dword [edx], esi
mov dword [edi + 0xc], eax
mov dword [edi + 8], eax
jmp 0x418516
test esi, esi
je 0x418526
lock add dword [esi + 0xc], 1
mov dword [esp], esi
call fcn.00407850
mov dword [esp], ebx
mov eax, dword [ebp - 0xd0]
call eax
push eax
mov dword [esp + 4], 0xffffffff
mov eax, dword [esi + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc0]
call eax
push eax
push eax
mov dword [esp], ebx
mov eax, dword [ebp - 0xd4]
call eax
push eax
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc4]
mov dword [esi], eax
mov eax, dword [edi + 0xc]
mov dword [esi + 4], eax
mov dword [eax], esi
mov dword [edi + 0xc], esi
mov dword [esp], esi
call fcn.00406b30
mov esi, dword [ebp - 0x98]
mov eax, dword [ebp - 0xbc]
cmp esi, eax
jne 0x4184ae
mov eax, dword [ebp - 0xcc]
mov dword [esp], eax
mov eax, dword [ebp - 0xd0]
call eax
push ebx
mov eax, dword [0x41d0d4]
test eax, eax
je 0x41856a
xor edx, edx
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 1
call dword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroupMembers]
mov eax, dword [0x41d0d4]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroup]
push ecx
call fcn.00405a40
jmp 0x417f47
test byte [0x419070], 2
je 0x4185ae
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.CreateThreadpoolCleanupGroup_failed_with_error__lu_n
mov dword [esp + 8], str.schedule_delayed_autostart
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x419070
mov dword [esp], 1
call fcn.00405ff0
lea esi, [ebp - 0x98]
mov eax, dword [ebp - 0xc0]
call fcn.00405bb0
jmp 0x41840b
mov dword [ebp - 0xe4], eax
mov eax, dword [esi + 0x10]
call fcn.004060e0
mov ecx, dword [ebp - 0xe4]
mov dword [esp + 0xc], str.Auto_start_service__s_failed_to_start:__ld_n
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 4], 0x419070
mov dword [esp], eax
call fcn.00405ff0
jmp 0x4182ac
mov eax, dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea esi, [ebp - 0x98]
mov dword [ebp - 0xd4], eax
mov eax, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0xd0], eax
jmp 0x41841a
test byte [0x419070], 2
je 0x4180fd
mov eax, dword [ebx + 0x34]
mov dword [esp + 0xc], str.Failed_to_enumerate_devices__error__lx._n
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x419070
mov dword [esp], 1
call fcn.00405ff0
jmp 0x4180fd
mov dword [ebp - 0xc4], eax
mov ebx, dword [ebp - 0xcc]
mov dword [ebp - 0xbc], esi
jmp 0x418516
test byte [0x419070], 2
jne 0x418695
mov eax, dword [ebp - 0xcc]
call fcn.00405bb0
jmp 0x4185b4
mov eax, dword [ebp - 0xdc]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.CreateThreadpoolWait_failed:__lu_n
mov dword [esp + 8], str.schedule_delayed_autostart
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x419070
mov dword [esp], 1
call fcn.00405ff0
jmp 0x418685