Function at 0x4181d0
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
xor edi, edi
push esi
mov esi, 1
push ebx
mov ebx, 3
push ecx
sub esp, 0x108
call fcn.00418110
mov eax, str.__wine_SvcctlStarted
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
xor ecx, ecx
mov edx, 0x4200b8
mov dword [ebp - 0xbc], eax
sub esp, 0x10
xor eax, eax
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, str.SYSTEMCurrentControlSetControlServiceCurrent
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov dword [esp], 0x80000002
call sub.advapi32.dll_RegCreateKeyExW
sub esp, 0x24
test eax, eax
je 0x418275
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 4], str.SystemCurrentControlSetControl
lea eax, [ebp - 0xac]
mov dword [esp + 8], eax
mov dword [esp], 0x80000002
call sub.advapi32.dll_RegOpenKeyW
sub esp, 0xc
test eax, eax
jne 0x418394
mov eax, dword [ebp - 0xac]
lea edi, [ebp - 0xa4]
mov dword [esp + 0x14], edi
lea esi, [ebp - 0x98]
mov dword [esp + 0x10], esi
lea ebx, [ebp - 0xa8]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
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 0x4182f8
cmp dword [ebp - 0xa8], 1
je 0x418555
mov dword [esp + 0x14], edi
mov eax, dword [ebp - 0xac]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
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 0x418340
cmp dword [ebp - 0xa8], 1
je 0x418586
mov dword [esp + 0x14], edi
lea eax, [ebp - 0xa0]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xac]
mov dword [esp + 0xc], ebx
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 0x418507
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
push eax
mov ebx, dword fs:[0x18]
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0
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 [0x420164], eax
sub esp, 0xc
test eax, eax
je 0x418549
mov dword [eax + 4], 0
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]
mov eax, dword [0x420164]
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 [0x420164]
test esi, esi
jne 0x418524
call fcn.00406eb0
test eax, eax
jne 0x418269
lea esi, [esi]
call fcn.00405aa0
mov ecx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0xc4], ecx
mov dword [ebp - 0xc8], eax
test eax, eax
je 0x4185ea
mov ebx, dword [0x420164]
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]
mov eax, dword fs:[0x18]
push ecx
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 - 0xc4]
call eax
mov eax, dword [0x4200bc]
sub esp, 0xc
test eax, eax
je 0x4184ef
mov dword [esp], eax
call sub.userenv.dll_DestroyEnvironmentBlock
push eax
test byte [0x419090], 8
jne 0x4185b7
mov eax, dword [ebp - 0xc8]
jmp 0x418269
cmp dword [ebp - 0xa8], 4
jne 0x418385
mov eax, dword [ebp - 0xa0]
mov dword [0x419084], eax
jmp 0x418385
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 0x418269
mov esi, 0x46a
mov eax, esi
jmp 0x418269
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x4182f8
mov dword [0x41908c], eax
jmp 0x4182f8
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x418340
mov dword [0x419088], eax
jmp 0x418340
mov dword [esp + 0xc], str.services.exe_exited_with_code__d_n
mov eax, dword [ebp - 0xc8]
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
jmp 0x4184fc
mov dword [esp + 8], pe_nt_image_headers32
mov eax, dword [0x420164]
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 - 0xdc], eax
sub esp, 0xc
test eax, eax
je 0x418b6c
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 - 0xd8], eax
sub esp, 0x10
inc eax
je 0x418b8d
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 - 0xd4], 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 - 0xc4], edi
mov edi, ecx
mov ecx, dword [ebp - 0xdc]
cmp ebx, dword [ebp - 0xc4]
je 0x418749
cmp dword [ebx + 0x38], 2
jbe 0x4186da
mov eax, dword [ebp - 0xd8]
cmp eax, 0xffffffff
je 0x418742
mov dword [ebp - 0xcc], ecx
lea edx, [ebx + 0x10]
call fcn.00405f50
mov ecx, dword [ebp - 0xcc]
test eax, eax
je 0x418742
lea edx, [esi + 1]
cmp edx, edi
jb 0x418739
mov dword [esp + 8], ecx
lea eax, [edi + edi]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xe0]
shl edi, 3
mov dword [esp + 0xc], edi
mov dword [esp + 4], 0
mov dword [ebp - 0xd0], edx
mov dword [ebp - 0xcc], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov ecx, dword [ebp - 0xcc]
mov edx, dword [ebp - 0xd0]
sub esp, 0x10
test eax, eax
je 0x418749
mov edi, dword [ebp - 0xdc]
mov ecx, eax
lock inc dword [ebx + 0xc]
mov dword [ecx + esi*4], ebx
mov esi, edx
mov ebx, dword [ebx]
jmp 0x4186a1
mov dword [ebp - 0xdc], ecx
mov eax, dword [ebp - 0xe8]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0xd0], eax
call eax
mov edi, dword [ebp - 0xdc]
push ebx
xor ebx, ebx
mov dword [esp + 0xc], 0x405e60
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.00407970
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xcc], esi
cmp dword [ebp - 0xcc], ebx
je 0x418848
mov esi, dword [edi + ebx*4]
cmp dword [esi + 0x7c], 0
je 0x4187e2
test byte [0x419090], 8
jne 0x418816
mov eax, dword [ebp - 0xc4]
inc ebx
mov dword [edi + eax*4], esi
inc eax
mov dword [ebp - 0xc4], eax
jmp 0x4187b1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.00408e50
test eax, eax
je 0x41880b
test byte [0x419090], 1
jne 0x418b27
mov dword [esp], esi
inc ebx
call fcn.00406e20
jmp 0x4187b1
mov eax, dword [esi + 0x10]
call fcn.00406120
mov dword [esp + 0xc], str.delayed_starting__s_n
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
jmp 0x4187cf
mov ecx, dword [ebp - 0xe4]
xor ebx, ebx
mov eax, 1
lock cmpxchg dword [ecx + 4], ebx
cmp dword [ebp - 0xc4], 0
je 0x418ae5
call dword [sym.imp.kernel32.dll_CreateThreadpoolCleanupGroup]
mov dword [0x4200b4], eax
test eax, eax
je 0x418bdb
mov dword [esp + 8], 8
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0xcc], 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 0x418ae5
mov eax, dword [ebp - 0xc0]
lea edx, [ebp - 0x94]
mov ecx, dword [ebp - 0xc4]
lea esi, [ebp - 0x98]
mov edi, edx
mov dword [eax], ecx
mov ecx, dword [ebp - 0xdc]
mov dword [eax + 4], ecx
mov eax, ebx
mov ecx, 7
rep stosd dword es:[edi], eax
mov eax, dword [0x4200b4]
mov ecx, 0xffffd8f0
mov dword [esp + 8], esi
mov dword [esp], 0x4093b0
mov dword [ebp - 0x98], 1
mov dword [ebp - 0x90], eax
mov eax, ecx
mul dword [0x419084]
mov dword [ebp - 0x8c], 0x4078e0
sub edx, dword [0x419084]
mov ecx, eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0x9c], edx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CreateThreadpoolTimer]
sub esp, 0xc
test eax, eax
je 0x418c2f
mov dword [esp], eax
lea edx, [ebp - 0xa0]
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]
mov dword [ebp - 0xc4], eax
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 eax, dword [0x420160]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [ebp - 0xcc], eax
call eax
mov edi, dword [0x420164]
mov dword [ebp - 0x98], esi
mov dword [ebp - 0x94], esi
lea ebx, [edi + 0x18]
mov dword [ebp - 0xd8], ebx
push eax
push eax
mov eax, dword [ebp - 0xd4]
mov dword [esp], ebx
call eax
push edx
mov eax, dword [edi + 8]
lea edx, [edi + 8]
mov dword [ebp - 0xc0], edx
cmp edx, eax
je 0x418bca
mov dword [ebp - 0xbc], esi
mov ecx, dword [ebp - 0x94]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x94]
mov dword [eax + 4], ecx
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x94], eax
mov dword [eax], esi
mov dword [edi + 0xc], edx
mov dword [edi + 8], edx
jmp 0x418a87
test esi, esi
je 0x418a95
lock inc dword [esi + 0xc]
mov dword [esp], esi
call fcn.00407a80
mov eax, dword [ebp - 0xd0]
mov dword [esp], ebx
call eax
push eax
mov dword [esp + 4], 0xffffffff
mov eax, dword [esi + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xcc]
call eax
push eax
push eax
mov eax, dword [ebp - 0xd4]
mov dword [esp], ebx
call eax
push eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [ecx + 4], eax
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc0]
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.00406bd0
mov esi, dword [ebp - 0x98]
cmp esi, dword [ebp - 0xbc]
jne 0x418a20
mov eax, dword [ebp - 0xd8]
mov dword [esp], eax
mov eax, dword [ebp - 0xd0]
call eax
mov eax, dword [0x4200b4]
test eax, eax
push esi
je 0x418adb
mov dword [esp], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 1
call dword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroupMembers]
mov eax, dword [0x4200b4]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseThreadpoolCleanupGroup]
push ebx
call fcn.00405d30
jmp 0x41848f
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
lea esi, [ebp - 0x98]
mov dword [ebp - 0xc4], eax
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0xdc]
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0xc4]
call eax
sub esp, 0xc
jmp 0x41897d
mov dword [ebp - 0xe0], eax
mov eax, dword [esi + 0x10]
call fcn.00406120
mov ecx, dword [ebp - 0xe0]
mov dword [esp + 0xc], str.Auto_start_service__s_failed_to_start:__d_n
mov dword [esp + 8], str.scmdatabase_autostart_services
mov dword [esp + 4], 0x419090
mov dword [esp + 0x14], ecx
mov dword [esp], 0
mov dword [esp + 0x10], eax
call fcn.00406030
jmp 0x41880b
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 0x41898c
test byte [0x419090], 2
je 0x41865b
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 + 4], 0x419090
mov dword [esp + 0x10], eax
mov dword [esp], 1
call fcn.00406030
jmp 0x41865b
mov dword [ebp - 0xbc], esi
mov ebx, dword [ebp - 0xd8]
jmp 0x418a87
test byte [0x419090], 2
je 0x418ae5
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
lea esi, [ebp - 0x98]
mov dword [esp + 0xc], str.CreateThreadpoolCleanupGroup_failed_with_error__u_n
mov dword [esp + 8], str.schedule_delayed_autostart
mov dword [esp + 4], 0x419090
mov dword [esp + 0x10], eax
mov dword [esp], 1
call fcn.00406030
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0xc4], eax
jmp 0x418af6
test byte [0x419090], 2
jne 0x418c6e
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0xc0]
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
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 - 0xc4], eax
call eax
sub esp, 0xc
jmp 0x418af6
mov eax, dword [ebp - 0xcc]
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 + 4], 0x419090
mov dword [esp + 0x10], eax
mov dword [esp], 1
call fcn.00406030
jmp 0x418c38