Function at 0x406880
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 - 0x368], 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 0x4068ef
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 0x4071e8
mov dword [esi + 0x68], 0
sub dword [ebx + 0x10], 1
mov dword [esp], ebx
call sym._release_process
mov dword [esi + 0x70], 0
mov edx, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [esi + 0x40]
mov dword [ebp - 0x358], edx
mov dword [esp], eax
call edx
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
sub esp, 0xc
mov ebx, eax
lea eax, [eax + eax]
mov dword [esp], eax
call edi
mov dword [ebp - 0x360], eax
test eax, eax
je 0x406f65
mov dword [esp + 8], ebx
mov edx, dword [ebp - 0x358]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x40]
mov dword [esp], eax
call edx
mov eax, dword [esi + 0x78]
lea ecx, [ebp - 0x214]
mov dword [ebp - 0x358], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_free]
sub esp, 0xc
test eax, eax
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x35c], ecx
je 0x406981
mov ebx, eax
and ebx, 3
je 0x406f90
sub eax, 1
cmp eax, 1
jbe 0x406ca8
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 [0x41b0c0]
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 0x4069f1
cmp dword [ebp - 0x214], 4
je 0x407110
mov eax, dword [0x41b0c0]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 0x41b070
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 [0x41b070]
sub esp, 0x18
mov dword [esp + 0xc], eax
mov dword [esp + 8], str..pipe_netNtControlPipe_u
mov dword [esp + 4], 0x27
mov dword [esp], 0x41b020
call sym._swprintf
add dword [0x41b070], 1
mov dword [esp + 4], 0x28
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov ebx, eax
test eax, eax
je 0x407a68
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]
mov dword [ebx + 0x1c], eax
sub esp, 0xc
test eax, eax
je 0x407150
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]
mov dword [ebx + 0x24], eax
sub esp, 0x10
test eax, eax
je 0x4071c0
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], 0x41b020
call dword [sym.imp.kernel32.dll_CreateNamedPipeW]
mov dword [ebx + 0x20], eax
sub esp, 0x20
cmp eax, 0xffffffff
je 0x407338
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 0x406b59
mov dword [ebp - 0x20c], str.__wineservice_winstationDefault
mov edi, dword [0x41b0c4]
test edi, edi
je 0x407358
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 edi, 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 [0x41b0c4]
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], edi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessW]
sub esp, 0x28
mov esi, eax
mov eax, dword [ebp - 0x35c]
mov dword [esp], edi
call eax
test esi, esi
je 0x407130
mov eax, dword [ebp - 0x340]
mov dword [esp + 4], eax
mov eax, dword [0x41b0bc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_AssignProcessToJobObject]
sub esp, 8
test eax, eax
jne 0x406c6b
test byte [0x417070], 2
jne 0x4074f0
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 - 0x368]
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
call edi
mov dword [ebp - 0x36c], eax
mov ecx, eax
test eax, eax
je 0x406f65
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x406d00
mov edx, dword [ebp - 0x36c]
cmp word [edx], 0
je 0x4077d0
add edx, 2
cmp word [edx], 0
jne 0x406d20
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + str.winedevice.exe]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406d30
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x360], ecx
lea ebx, [ecx + 0x10]
test eax, eax
je 0x406eb0
mov edi, dword [ecx + 0x10]
cmp ebx, edi
je 0x406eb0
lea esi, [esi]
mov eax, dword [edi + 0x18]
sub eax, 2
and eax, 0xfffffffd
jne 0x406e98
mov eax, dword [edi + 0x68]
test eax, eax
je 0x406e98
mov ebx, dword [edi + 0x78]
test ebx, ebx
jne 0x406e98
mov eax, dword [edi + 0x40]
test eax, eax
je 0x406e98
mov ecx, dword [ebp - 0x36c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x406e90
mov eax, dword [edi + 0x44]
test eax, eax
je 0x406e90
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 0x406e90
mov ebx, dword [edi + 0x68]
test ebx, ebx
je 0x407320
lea edi, [ebx + 0xc]
lock add dword [edi], 1
mov eax, dword [ebp - 0x36c]
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 0x407570
mov eax, dword [ebp - 0x368]
mov dword [eax], ebx
jmp 0x406c99
mov ecx, dword [esi + 8]
lea esi, [esi]
nop
mov edi, dword [edi]
lea ebx, [ecx + 0x10]
cmp edi, ebx
jne 0x406d68
mov dword [ebp - 0x360], ecx
lea esi, [esi]
nop
mov eax, dword [0x41b0b0]
mov dword [esp + 8], str.Winedevice_u
mov dword [esp + 4], 0x17
add eax, 1
mov dword [esp], 0x41b080
mov dword [esp + 0xc], eax
mov dword [0x41b0b0], eax
call sym._swprintf
mov eax, dword [ebp - 0x360]
mov edi, dword [eax + 0x10]
cmp edi, ebx
je 0x406f0e
lea esi, [esi]
mov eax, dword [edi + 0x10]
mov dword [esp], 0x41b080
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
je 0x406eb0
mov edi, dword [edi]
cmp edi, ebx
jne 0x406ef0
lea eax, [ebp - 0x340]
mov dword [esp], 0x41b080
mov dword [esp + 4], eax
call sym._service_create
mov edi, eax
test eax, eax
je 0x407588
mov eax, dword [ebp - 0x36c]
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 0x406c99
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 eax, dword [ebp - 0x358]
mov dword [esp + 4], 0x104
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
sub esp, 8
cmp word [ebp - 0x214], 0
je 0x4078a8
mov ecx, dword [ebp - 0x358]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x406fc0
sub ecx, dword [ebp - 0x358]
mov dword [ebp - 0x35c], ecx
mov eax, ecx
sar eax, 1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x360]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x358]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x407208
mov eax, dword [ebp - 0x358]
mov dword [esp + 4], 0x104
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetSystemWow64DirectoryW]
mov edx, dword [ebp - 0x360]
sub esp, 8
mov dword [esp], edx
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [ebp - 0x374], edx
call edx
mov ecx, dword [ebp - 0x358]
mov edx, dword [ebp - 0x374]
mov dword [ebp - 0x36c], eax
mov dword [esp], ecx
call edx
add eax, dword [ebp - 0x36c]
add eax, eax
mov dword [esp], eax
call edi
mov dword [ebp - 0x36c], eax
test eax, eax
je 0x406f56
mov dword [ebp - 0x374], ebx
mov ecx, dword [ebp - 0x36c]
xor eax, eax
mov ebx, dword [ebp - 0x358]
lea esi, [esi]
movzx edx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x407078
mov eax, dword [ebp - 0x36c]
mov ecx, dword [ebp - 0x35c]
add ecx, dword [ebp - 0x360]
mov ebx, dword [ebp - 0x374]
cmp word [eax], 0
je 0x407992
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4070b0
lea esi, [esi]
movzx edx, word [ecx + ebx]
mov word [eax + ebx], dx
add ebx, 2
test dx, dx
jne 0x4070c0
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 0x4073e8
mov ecx, dword [ebp - 0x36c]
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x360], ecx
jmp 0x406981
mov eax, dword [ebp - 0x340]
mov edx, dword [0x41b070]
add eax, 1
cmp eax, edx
cmovb eax, edx
mov dword [0x41b070], eax
jmp 0x4069f1
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov dword [esp], ebx
call sym._process_terminate
mov dword [esp], ebx
call sym._release_process
jmp 0x406c99
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x40716c
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 0x406b2e
test byte [0x417070], 2
jne 0x407220
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 fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40716c
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x407159
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 0x406c99
mov ecx, dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x35c], ecx
jmp 0x406981
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x4078c0
mov eax, ebx
shr eax, 0x10
je 0x407520
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x418c4d
sub esp, 8
test eax, eax
jne 0x407535
cmp word [ebx], 0
je 0x407971
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x407268
mov ecx, 0x224c
mov dword [ebp - 0x364], ebx
mov word [ebp - 0x214], cx
lea ecx, [ebp - 0x212]
mov dword [ebp - 0x368], edi
jmp 0x4072db
cmp ax, 9
je 0x407730
cmp ax, 0xa
jne 0x40774e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [edx - 1]
test edx, edx
jle 0x407840
lea edi, [ebp - 0xf2]
cmp ecx, edi
ja 0x407840
mov edx, eax
add dword [ebp - 0x364], 2
mov eax, dword [ebp - 0x364]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x4077b8
jbe 0x407298
cmp ax, 0x22
je 0x4077a0
cmp ax, 0x5c
jne 0x407741
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4072c0
mov eax, dword [esi + 8]
mov dword [ebp - 0x360], eax
lea ebx, [eax + 0x10]
jmp 0x406eb0
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, dword [ebx + 0x1c]
test eax, eax
jne 0x4071d0
jmp 0x407159
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 0x406b67
mov eax, dword [ebp - 0x354]
mov dword [esp + 8], 0
mov dword [esp], 0x41b0c4
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 0x4079c5
mov eax, dword [ebp - 0x354]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x406b67
mov eax, dword [ebp - 0x36c]
shr eax, 0x10
je 0x40799d
mov ebx, dword [ebp - 0x36c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x418c4d
sub esp, 8
test eax, eax
jne 0x407811
cmp word [ebx], 0
je 0x407a46
mov edx, ebx
lea esi, [esi]
mov ecx, eax
lea eax, [eax + 1]
cmp word [edx + ecx*2 + 2], 0
jne 0x407430
mov edx, dword [ebp - 0x36c]
mov eax, 0x224c
mov dword [ebp - 0x374], esi
lea ebx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
mov dword [ebp - 0x360], edx
jmp 0x4074ab
cmp ax, 9
je 0x407960
cmp ax, 0xa
jne 0x4078d7
mov eax, 0x6e5c
add ebx, 2
mov word [ebx - 2], ax
lea esi, [esi]
nop
lea esi, [ebp - 0x21e]
lea eax, [ecx - 1]
cmp ebx, esi
ja 0x4077db
test ecx, ecx
jle 0x4077db
mov ecx, eax
add dword [ebp - 0x360], 2
mov eax, dword [ebp - 0x360]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x407948
jbe 0x407468
cmp ax, 0x22
je 0x407930
cmp ax, 0x5c
jne 0x4078ca
mov esi, 0x5c5c
add ebx, 2
mov word [ebx - 2], si
jmp 0x407490
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.0_1
jmp 0x406c6b
movzx ebx, bx
mov dword [esp], 0x418c40
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0_1
mov edx, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], edx
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.0_1
jmp 0x40718c
mov dword [esp], ebx
mov edi, 0x41d
call sym._release_process
jmp 0x406c99
mov edx, dword [ebp - 0x340]
mov eax, dword [ebp - 0x36c]
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 0x407a72
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 0x407a72
mov edx, dword [ebp - 0x340]
mov dword [esp], 0x41b080
mov dword [ebp - 0x374], edx
call edi
mov edx, dword [ebp - 0x374]
mov dword [edx + 0x54], eax
test eax, eax
je 0x407a72
mov eax, dword [esi + 0x44]
mov edx, dword [ebp - 0x340]
test eax, eax
je 0x40764d
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 0x407a72
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 - 0x36c]
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 edi, dword [esi + 8]
mov dword [ebp - 0x214], eax
lea eax, [edi + 0x18]
mov edi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [esp], eax
mov dword [ebp - 0x360], edi
call edi
mov edx, dword [ebp - 0x214]
xor eax, eax
mov edi, dword [ebp - 0x358]
sub esp, 4
test edx, edx
mov dword [esp + 8], edi
setne al
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call sym._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 0x407880
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 0x407a20
lea edi, [ebx + 0xc]
lock add dword [edi], 1
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call sym._release_service
jmp 0x406e0a
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4072c0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x407898
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefvalidate_service_config]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefvalidate_service_config]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefvalidate_service_config]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4072c0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4072c0
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4072c0
mov edx, dword [ebp - 0x36c]
jmp 0x406d29
mov byte [ebx], 0x22
mov esi, dword [ebp - 0x374]
mov ecx, ebx
test eax, eax
jle 0x407a5e
mov edx, 0x2e2e
mov byte [ebx + 3], 0x2e
lea eax, [ebx + 4]
mov word [ebx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x340]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
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.0_1
jmp 0x4070f3
mov byte [ecx], 0x22
mov edi, dword [ebp - 0x368]
test eax, eax
jle 0x40798a
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
mov eax, dword [ebp - 0x358]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
jmp 0x407535
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call sym._release_service
jmp 0x406c99
mov byte [ecx], al
add ecx, 1
jmp 0x4072c0
mov dword [ebp - 0x35c], 0
xor eax, eax
jmp 0x406fd9
mov edx, 0x418c46
jmp 0x407535
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x4079bb
mov esi, eax
mov byte [ebx], 0x5c
add ebx, 5
shr si, 0xc
movzx esi, si
movzx edx, byte [esi + str.0123456789abcdefvalidate_service_config]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ebx - 4], dl
movzx edx, byte [esi + str.0123456789abcdefvalidate_service_config]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefvalidate_service_config]
and esi, 0xf
mov byte [ebx - 3], dl
movzx edx, byte [esi + str.0123456789abcdefvalidate_service_config]
mov byte [ebx - 1], al
mov byte [ebx - 2], dl
jmp 0x407490
mov eax, 0x225c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x407490
mov eax, 0x725c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x407490
mov eax, 0x745c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x407490
mov ebx, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], bx
lea eax, [ecx + 1]
jmp 0x407861
mov eax, dword [ebp - 0x36c]
jmp 0x4070c0
movzx eax, word [ebp - 0x36c]
mov dword [esp], 0x418c40
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov edx, eax
jmp 0x407811
mov byte [ebx], al
add ebx, 1
jmp 0x407490
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], 0x41b0c4
call dword [sym.imp.ntdll.dll_RtlSetEnvironmentVariable]
sub esp, 0xc
jmp 0x4073ce
mov dword [esp], eax
mov edi, 0x41d
call sym._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 0x406c99
mov word [ebp - 0x340], 0x224c
lea eax, [ebp - 0x33e]
mov byte [ebp - 0x33e], 0x22
mov ecx, eax
mov eax, ecx
add eax, 1
jmp 0x4077fe
mov edi, 0x46a
jmp 0x40717f
mov eax, dword [ebp - 0x340]
mov edi, 0x46a
mov dword [esp], eax
call sym._free_service_entry
mov eax, dword [ebp - 0x36c]
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
jmp 0x406f3f