Function at 0x406610
Capabilities:
Check mutex on windows
Create pipe
Create process on windows
Create process suspended
Get common file path
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x390
mov eax, dword [eax + 8]
mov dword [ebp - 0x36c], edx
mov dword [ebp - 0x364], ecx
add eax, 0x18
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebp - 0x370], eax
call eax
mov ebx, dword [esi + 0x68]
sub esp, 4
test ebx, ebx
je 0x40667f
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
sub esp, 8
cmp eax, 0x102
je 0x406f00
mov dword [esi + 0x68], 0
sub dword [ebx + 0x10], 1
mov dword [esp], ebx
call dbg.release_process
mov dword [esi + 0x70], 0
mov ebx, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov edi, eax
lea eax, [eax + eax]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x368], eax
call eax
mov dword [ebp - 0x360], eax
test eax, eax
je 0x406ce5
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esi + 0x40]
mov dword [esp], eax
call ebx
mov edx, dword [esi + 0x78]
mov ecx, dword [sym.imp.ucrtbase.dll_free]
sub esp, 0xc
mov eax, dword [esi + 0x34]
test edx, edx
lea edx, [ebp - 0x214]
mov dword [ebp - 0x35c], ecx
mov dword [ebp - 0x358], edx
je 0x40670a
mov edi, eax
and edi, 3
je 0x406d10
sub eax, 1
cmp eax, 1
jbe 0x406a30
lea eax, [ebp - 0x348]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x340]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x358]
mov dword [ebp - 0x340], 0xffffffff
mov dword [esp + 0xc], eax
mov eax, dword [0x41c0c0]
mov dword [ebp - 0x348], 4
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x40677a
cmp dword [ebp - 0x214], 4
je 0x406ed0
mov eax, dword [0x41c0c0]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 0x41c070
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov eax, dword [0x41c070]
sub esp, 0x18
mov dword [esp + 0xc], eax
mov dword [esp + 8], str..pipe_netNtControlPipe_u
mov dword [esp + 4], 0x27
mov dword [esp], 0x41c020
call dbg.swprintf
add dword [0x41c070], 1
mov dword [esp + 4], 0x28
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov ebx, eax
test eax, eax
je 0x406f20
mov dword [eax + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateMutexW]
sub esp, 0xc
mov dword [ebx + 0x1c], eax
test eax, eax
je 0x406ef0
mov dword [esp + 0xc], 0
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 [ebx + 0x24], eax
test eax, eax
je 0x406e51
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x2710
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], 0x100
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000003
mov dword [esp], 0x41c020
call dword [sym.imp.kernel32.dll_CreateNamedPipeW]
sub esp, 0x20
mov dword [ebx + 0x20], eax
cmp eax, 0xffffffff
je 0x407370
lea edx, [ebp - 0x210]
mov ecx, 0x10
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x214], 0x44
test byte [esi + 0x35], 1
jne 0x4068e2
mov dword [ebp - 0x20c], str.__wineservice_winstationDefault
mov eax, dword [0x41c0c4]
test eax, eax
je 0x407390
mov eax, dword [esi + 0x30]
mov dword [esi + 0x18], 2
mov dword [esi + 0x1c], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ResetEvent]
mov eax, dword [esi + 8]
sub esp, 4
lea edx, [eax + 8]
mov dword [ebx + 8], eax
mov dword [ebx], edx
mov edx, dword [eax + 0xc]
mov dword [ebx + 4], edx
mov dword [edx], ebx
mov dword [eax + 0xc], ebx
lock add dword [ebx + 0xc], 1
mov eax, dword [ebp - 0x364]
add dword [ebx + 0x10], 1
mov dword [esi + 0x68], ebx
mov dword [eax], 0
mov eax, dword [esi + 8]
mov dword [esi + 0x6c], 0
add eax, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x340]
mov esi, dword [ebp - 0x360]
sub esp, 4
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x358]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], eax
mov eax, dword [0x41c0c4]
mov dword [esp + 0x14], 0x408
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessW]
sub esp, 0x28
mov edi, eax
mov eax, dword [ebp - 0x35c]
mov dword [esp], esi
call eax
test edi, edi
je 0x406ff0
mov eax, dword [ebp - 0x340]
mov dword [esp + 4], eax
mov eax, dword [0x41c0bc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_AssignProcessToJobObject]
sub esp, 8
test eax, eax
jne 0x4069f3
test byte [0x417070], 2
jne 0x407035
mov eax, dword [ebp - 0x338]
xor edi, edi
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x340]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x33c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x36c]
sub esp, 4
mov dword [eax], ebx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x358]
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
mov eax, dword [ebp - 0x360]
sub esp, 8
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 0x20]
mov dword [esp], eax
mov eax, dword [ebp - 0x368]
call eax
mov ecx, eax
mov dword [ebp - 0x368], eax
test eax, eax
je 0x406ce5
xor eax, eax
movzx edx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x406a85
mov edx, dword [ebp - 0x368]
cmp word [edx], 0
je 0x4074c3
add edx, 2
cmp word [edx], 0
jne 0x406aa5
xor eax, eax
mov ecx, 0x5c
jmp 0x406ac7
movzx ecx, word [eax + str.winedevice.exe]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406ac0
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x360], ecx
lea ebx, [ecx + 0x10]
test eax, eax
je 0x406c33
mov edi, dword [ecx + 0x10]
cmp ebx, edi
je 0x406c33
mov eax, dword [edi + 0x18]
sub eax, 2
and eax, 0xfffffffd
jne 0x406c20
mov eax, dword [edi + 0x68]
test eax, eax
je 0x406c20
mov ebx, dword [edi + 0x78]
test ebx, ebx
jne 0x406c20
mov eax, dword [edi + 0x40]
test eax, eax
je 0x406c20
mov edx, dword [ebp - 0x368]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x406c14
mov eax, dword [edi + 0x44]
test eax, eax
je 0x406c14
mov edx, dword [esi + 0x44]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x406c14
mov ebx, dword [edi + 0x68]
test ebx, ebx
je 0x407024
lea edi, [ebx + 0xc]
lock add dword [edi], 1
mov eax, dword [ebp - 0x368]
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
mov eax, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0x360], eax
mov eax, dword [esi + 0x30]
mov dword [esi + 0x18], 2
mov dword [esi + 0x1c], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ResetEvent]
sub esp, 4
lock add dword [edi], 1
mov eax, dword [ebp - 0x364]
mov dword [esi + 0x68], ebx
mov dword [eax], 1
mov dword [esi + 0x6c], 1
add dword [ebx + 0x10], 1
mov eax, dword [esi + 8]
add eax, 0x18
mov dword [esp], eax
mov eax, dword [ebp - 0x360]
call eax
sub esp, 4
mov dword [esp + 4], 0x7530
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
sub esp, 8
mov edi, eax
test eax, eax
jne 0x4071b0
mov eax, dword [ebp - 0x36c]
mov dword [eax], ebx
jmp 0x406a21
mov ecx, dword [esi + 8]
lea esi, [esi]
nop
mov edi, dword [edi]
lea ebx, [ecx + 0x10]
cmp edi, ebx
jne 0x406af5
mov dword [ebp - 0x360], ecx
mov eax, dword [0x41c0b0]
mov dword [esp + 8], str.Winedevice_u
mov dword [esp + 4], 0x17
add eax, 1
mov dword [esp], 0x41c080
mov dword [esp + 0xc], eax
mov dword [0x41c0b0], eax
call dbg.swprintf
mov eax, dword [ebp - 0x360]
mov edi, dword [eax + 0x10]
cmp edi, ebx
je 0x406c8e
lea esi, [esi]
mov eax, dword [edi + 0x10]
mov dword [esp], 0x41c080
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
je 0x406c33
mov edi, dword [edi]
cmp edi, ebx
jne 0x406c70
lea eax, [ebp - 0x340]
mov dword [esp], 0x41c080
mov dword [esp + 4], eax
call dbg.service_create
mov edi, eax
test eax, eax
je 0x4071c2
mov eax, dword [ebp - 0x368]
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
mov eax, dword [esi + 8]
add eax, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x406a21
mov eax, dword [ebp - 0x360]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [esi + 8]
mov edi, 0x46a
add eax, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 0x104
mov ebx, edx
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
sub esp, 8
cmp word [ebp - 0x214], 0
je 0x4075c0
mov ecx, ebx
lea esi, [esi]
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x406d40
sub ecx, dword [ebp - 0x358]
mov dword [ebp - 0x35c], ecx
mov eax, ecx
sar eax, 1
mov dword [esp + 8], eax
mov ebx, dword [ebp - 0x358]
mov eax, dword [ebp - 0x360]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x407010
mov dword [ebp - 0x358], ebx
mov dword [esp], ebx
mov dword [esp + 4], 0x104
call dword [sym.imp.kernel32.dll_GetSystemWow64DirectoryW]
mov eax, dword [ebp - 0x360]
mov ebx, dword [sym.imp.ucrtbase.dll_wcslen]
sub esp, 8
mov dword [esp], eax
call ebx
mov ecx, dword [ebp - 0x358]
mov dword [ebp - 0x374], eax
mov dword [esp], ecx
call ebx
mov ebx, dword [ebp - 0x374]
add ebx, eax
mov eax, dword [ebp - 0x368]
add ebx, ebx
mov dword [esp], ebx
call eax
mov ecx, dword [ebp - 0x358]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x406cd6
movzx edx, word [ecx + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x406de1
mov ecx, dword [ebp - 0x35c]
add ecx, dword [ebp - 0x360]
mov eax, ebx
cmp word [ebx], 0
je 0x406e10
add eax, 2
cmp word [eax], 0
jne 0x406e05
nop
movzx edx, word [ecx + edi]
mov word [eax + edi], dx
add edi, 2
test dx, dx
jne 0x406e10
mov eax, dword [ebp - 0x360]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x35c], eax
call eax
test byte [0x417070], 8
jne 0x4070a4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x360], ebx
jmp 0x40670a
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x406e80
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x406e80
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], ebx
mov eax, dword [ebp - 0x35c]
call eax
test edi, edi
je 0x4068b7
test byte [0x417070], 2
jne 0x406f30
mov eax, dword [esi + 8]
add eax, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x360]
sub esp, 4
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x340]
mov edx, dword [0x41c070]
add eax, 1
cmp eax, edx
cmovb eax, edx
mov dword [0x41c070], eax
jmp 0x40677a
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
jmp 0x406e6d
mov eax, dword [esi + 8]
mov edi, 0x420
add eax, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x406a21
mov edi, 0x46a
jmp 0x406e93
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x4075d1
mov eax, ebx
shr eax, 0x10
je 0x407060
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x419c2d
test ecx, ecx
jne 0x407073
cmp word [ebx], 0
je 0x406f7a
nop
add ecx, 1
cmp word [ebx + ecx*2], 0
jne 0x406f70
mov eax, 0x224c
mov dword [ebp - 0x364], edi
lea edx, [ebp - 0x212]
mov word [ebp - 0x214], ax
lea edi, [ecx - 1]
test ecx, ecx
jle 0x4074d0
lea eax, [ebp - 0xf2]
cmp edx, eax
ja 0x4074d0
add ebx, 2
movzx eax, word [ebx - 2]
cmp ax, 0xd
je 0x407420
ja 0x407154
cmp ax, 9
je 0x407450
cmp ax, 0xa
jne 0x407463
mov eax, 0x6e5c
add edx, 2
mov ecx, edi
mov word [edx - 2], ax
jmp 0x406f92
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov dword [esp], ebx
call dbg.process_terminate
mov dword [esp], ebx
call dbg.release_process
jmp 0x406a21
mov edx, dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x35c], edx
jmp 0x40670a
mov eax, dword [esi + 8]
mov dword [ebp - 0x360], eax
lea ebx, [eax + 0x10]
jmp 0x406c33
mov dword [esp + 0xc], str.Could_not_add_object_to_job._n
mov dword [esp + 8], str.service_start_process
mov dword [esp + 4], 0x417070
mov dword [esp], 1
call sym._wine_dbg_log.constprop.17
jmp 0x4069f3
movzx ebx, bx
mov dword [esp], 0x419c20
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.19
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_create_process_object_for__s__error___lu_n
mov dword [esp + 8], str.service_start_process
mov dword [esp + 4], 0x417070
mov dword [esp], 1
call sym._wine_dbg_log.constprop.17
jmp 0x406ea0
mov eax, ebx
shr eax, 0x10
je 0x407693
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x419c2d
test edx, edx
jne 0x407590
cmp word [ebx], 0
je 0x4070ea
lea esi, [esi]
nop
add edx, 1
cmp word [ebx + edx*2], 0
jne 0x4070e0
mov eax, 0x224c
mov dword [ebp - 0x360], ebx
mov edi, ebx
lea ecx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
lea eax, [ebp - 0x21e]
lea ebx, [edx - 1]
cmp ecx, eax
ja 0x40755c
test edx, edx
jle 0x40755c
add edi, 2
movzx eax, word [edi - 2]
cmp ax, 0xd
je 0x407603
ja 0x407180
cmp ax, 9
je 0x407680
cmp ax, 0xa
jne 0x407620
mov eax, 0x6e5c
add ecx, 2
mov edx, ebx
mov word [ecx - 2], ax
jmp 0x407104
cmp ax, 0x22
je 0x407433
cmp ax, 0x5c
jne 0x407463
mov eax, 0x5c5c
add edx, 2
mov ecx, edi
mov word [edx - 2], ax
jmp 0x406f92
cmp ax, 0x22
je 0x4075f0
cmp ax, 0x5c
jne 0x407620
mov eax, 0x5c5c
add ecx, 2
mov edx, ebx
mov word [ecx - 2], ax
jmp 0x407104
mov dword [esp], ebx
mov edi, 0x41d
call dbg.release_process
jmp 0x406a21
mov edx, dword [ebp - 0x340]
mov eax, dword [ebp - 0x368]
mov edi, dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [edx + 0x78], 0
mov dword [edx + 0x34], 0x10
mov dword [edx + 0x38], 3
mov dword [edx + 0x14], 0x10
mov dword [ebp - 0x374], edx
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x374]
mov dword [edx + 0x40], eax
test eax, eax
je 0x407523
mov edx, dword [ebp - 0x340]
mov dword [esp], str.LocalSystem
mov dword [ebp - 0x374], edx
call edi
mov edx, dword [ebp - 0x374]
mov dword [edx + 0x50], eax
test eax, eax
je 0x407523
mov edx, dword [ebp - 0x340]
mov dword [esp], 0x41c080
mov dword [ebp - 0x374], edx
call edi
mov edx, dword [ebp - 0x374]
mov dword [edx + 0x54], eax
test eax, eax
je 0x407523
mov eax, dword [esi + 0x44]
mov edx, dword [ebp - 0x340]
test eax, eax
je 0x407287
mov dword [ebp - 0x374], edx
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x374]
mov dword [edx + 0x44], eax
test eax, eax
je 0x407523
mov edx, dword [ebp - 0x340]
mov ecx, dword [ebp - 0x360]
mov dword [edx], ebx
mov dword [edx + 8], ecx
mov eax, dword [ecx + 0x14]
mov dword [edx + 4], eax
mov dword [eax], edx
mov eax, dword [ebp - 0x368]
mov dword [ecx + 0x14], edx
mov ebx, dword [ebp - 0x340]
mov dword [ebx + 0x74], 1
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
mov eax, dword [ebx + 0x44]
mov dword [esp], eax
call edi
mov edx, dword [esi + 8]
mov dword [ebp - 0x214], eax
lea eax, [edx + 0x18]
mov edx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [esp], eax
mov dword [ebp - 0x360], edx
call edx
mov edx, dword [ebp - 0x358]
xor eax, eax
sub esp, 4
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x214]
test edx, edx
setne al
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call dbg.service_start
mov edi, eax
mov eax, dword [ebp - 0x214]
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
test edi, edi
jne 0x407510
mov eax, dword [esi + 8]
add eax, 0x18
mov dword [esp], eax
mov eax, dword [ebp - 0x370]
call eax
mov eax, dword [ebp - 0x340]
sub esp, 4
mov ebx, dword [eax + 0x68]
test ebx, ebx
je 0x407710
lea edi, [ebx + 0xc]
lock add dword [edi], 1
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call dbg.release_service
jmp 0x406b97
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, dword [ebx + 0x1c]
test eax, eax
jne 0x406e61
jmp 0x406e6d
lea eax, [ebp - 0x354]
mov dword [esp + 4], 0xa
mov dword [esp + 8], eax
mov dword [esp], 0xffffffff
call dword [sym.imp.advapi32.dll_OpenProcessToken]
sub esp, 0xc
test eax, eax
je 0x4068ef
mov eax, dword [ebp - 0x354]
mov dword [esp + 8], 0
mov dword [esp], 0x41c0c4
mov dword [esp + 4], eax
call dword [sym.imp.userenv.dll_CreateEnvironmentBlock]
lea eax, [ebp - 0x340]
sub esp, 0xc
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], str.WINEBOOTSTRAPMODE
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
jne 0x4076b7
mov eax, dword [ebp - 0x354]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x4068ef
mov eax, 0x725c
add edx, 2
mov ecx, edi
mov word [edx - 2], ax
jmp 0x406f92
mov eax, 0x225c
add edx, 2
mov ecx, edi
mov word [edx - 2], ax
jmp 0x406f92
mov eax, 0x745c
add edx, 2
mov ecx, edi
mov word [edx - 2], ax
jmp 0x406f92
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x407550
mov ecx, eax
mov byte [edx], 0x5c
add edx, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefvalidate_service_config]
mov byte [edx - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefvalidate_service_config]
mov byte [edx - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefvalidate_service_config]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefvalidate_service_config]
mov byte [edx - 1], al
mov byte [edx - 2], cl
mov ecx, edi
jmp 0x406f92
mov edx, dword [ebp - 0x368]
jmp 0x406aae
mov eax, edi
mov byte [edx], 0x22
mov edi, dword [ebp - 0x364]
test eax, eax
jle 0x4075e0
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
mov eax, dword [ebp - 0x358]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
jmp 0x407073
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call dbg.release_service
jmp 0x406a21
mov eax, dword [ebp - 0x340]
mov edi, 0x46a
mov dword [esp], eax
call dbg.free_service_entry
mov eax, dword [ebp - 0x368]
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
jmp 0x406cbf
mov byte [edx], al
mov ecx, edi
add edx, 1
jmp 0x406f92
mov eax, ebx
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x360]
test eax, eax
jle 0x407736
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x340]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.redirected_to__s_n
mov dword [esp + 8], str.get_service_binary_path
mov dword [esp + 4], 0x417070
mov dword [esp], 3
call sym._wine_dbg_log.constprop.17
jmp 0x406e43
mov dword [ebp - 0x35c], 0
xor eax, eax
jmp 0x406d59
mov eax, 0x419c26
jmp 0x407073
lea eax, [edx + 1]
jmp 0x4074f3
mov eax, 0x225c
add ecx, 2
mov edx, ebx
mov word [ecx - 2], ax
jmp 0x407104
mov eax, 0x725c
add ecx, 2
mov edx, ebx
mov word [ecx - 2], ax
jmp 0x407104
lea edx, [eax - 0x20]
cmp dx, 0x5e
jbe 0x4076ab
mov edx, eax
mov byte [ecx], 0x5c
add ecx, 5
shr dx, 0xc
movzx edx, dx
movzx edx, byte [edx + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 4], dl
mov edx, eax
shr dx, 8
and edx, 0xf
movzx edx, byte [edx + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 3], dl
mov edx, eax
and eax, 0xf
shr dx, 4
movzx eax, byte [eax + str.0123456789abcdefvalidate_service_config]
and edx, 0xf
movzx edx, byte [edx + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 1], al
mov byte [ecx - 2], dl
mov edx, ebx
jmp 0x407104
mov eax, 0x745c
add ecx, 2
mov edx, ebx
mov word [ecx - 2], ax
jmp 0x407104
movzx eax, bx
mov dword [esp], 0x419c20
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.19
jmp 0x407590
mov byte [ecx], al
mov edx, ebx
add ecx, 1
jmp 0x407104
mov dword [ebp - 0x350], 0x240022
lea eax, [ebp - 0x340]
mov dword [esp + 4], eax
lea eax, [ebp - 0x348]
mov dword [esp], eax
mov dword [ebp - 0x34c], str.WINEBOOTSTRAPMODE
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 0x348]
sub esp, 8
mov dword [esp + 8], eax
lea eax, [ebp - 0x350]
mov dword [esp + 4], eax
mov dword [esp], 0x41c0c4
call dword [sym.imp.ntdll.dll_RtlSetEnvironmentVariable]
sub esp, 0xc
jmp 0x407406
mov dword [esp], eax
mov edi, 0x41d
call dbg.release_service
mov eax, dword [esi + 8]
add eax, 0x18
mov dword [esp], eax
mov eax, dword [ebp - 0x360]
call eax
sub esp, 4
jmp 0x406a21
lea eax, [ecx + 1]
jmp 0x40757f