Function at 0x407bf0
Capabilities:
Connect pipe

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x34]
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], 0
call sym._service_start_process.constprop.0
mov ebx, eax
test eax, eax
je 0x407c30
test byte [0x40b070], 8
jne 0x407e66
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x10]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x3c], eax
test byte [0x40b070], 8
jne 0x407fd8
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ConnectNamedPipe]
sub esp, 8
test eax, eax
je 0x407ec0
cmp word [edi], 0
je 0x4080f0
mov edx, edi
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x407c88
sub edx, edi
sar edx, 1
add edx, 1
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
test esi, esi
je 0x407cdc
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
lea esi, [ecx + ebx*4]
lea esi, [esi]
nop
mov ebx, dword [ecx]
cmp word [ebx], 0
je 0x407eb0
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x407cc0
sub eax, ebx
sar eax, 1
add eax, 1
add edx, eax
add ecx, 4
mov dword [ebp - 0x2c], edx
cmp esi, ecx
jne 0x407cb0
lea eax, [edx + edx + 2]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x2c], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x408137
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [edi + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x407d00
cmp word [edi], 0
je 0x408100
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x407d20
sub eax, edi
add eax, 2
mov ebx, dword [ebp + 0xc]
add eax, esi
test ebx, ebx
je 0x407d93
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x48], edi
lea ebx, [edx + ebx*4]
mov dword [ebp - 0x38], ebx
lea esi, [esi]
lea esi, [esi]
mov edi, dword [edx]
xor ecx, ecx
lea esi, [esi]
movzx ebx, word [edi + ecx]
mov word [eax + ecx], bx
add ecx, 2
test bx, bx
jne 0x407d58
cmp word [eax], 0
je 0x407ea0
mov ecx, eax
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x407d78
sub ecx, eax
add ecx, 2
add eax, ecx
add edx, 4
cmp dword [ebp - 0x38], edx
jne 0x407d50
mov edi, dword [ebp - 0x48]
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], edi
mov dword [esp], eax
call sym._process_send_control
test eax, eax
jne 0x407f30
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
mov ebx, 0x41d
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [ebp - 0x38], eax
add eax, 0x18
mov dword [esp], eax
call edi
mov eax, dword [ebp + 8]
sub esp, 4
mov edx, dword [eax + 0x68]
test edx, edx
je 0x407e2b
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x18], 1
mov dword [eax + 0x68], 0
sub dword [edx + 0x10], 1
je 0x408110
mov dword [esp], edx
call sym._release_process
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
add eax, 0x18
mov dword [esp], eax
call esi
sub esp, 4
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
mov eax, dword [ebp - 0x34]
sub esp, 4
mov dword [esp], eax
call sym._release_process
test byte [0x40b070], 8
je 0x407c21
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.returning__ld_n
mov dword [esp + 8], str.service_start
mov dword [esp + 4], 0x40b070
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 2
jmp 0x407d86
mov eax, 1
jmp 0x407cd0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x408040
cmp dword [eax + 0x34], 0x217
je 0x407c76
test byte [0x40b070], 2
je 0x407dd9
mov dword [esp + 0xc], str.pipe_connect_failed_n
mov ebx, 0x41d
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x40b070
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x407dea
mov ebx, dword [ebp - 0x28]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
test ebx, ebx
jne 0x407dde
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [edi + 0x30]
mov dword [esp + 8], 0
mov dword [esp], 2
mov dword [ebp - 0x1c], eax
mov eax, dword [0x40b06c]
mov dword [ebp - 0x20], edx
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
jne 0x408028
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [eax + 8]
mov dword [ebp - 0x38], eax
add eax, 0x18
mov dword [esp], eax
call edi
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
mov ebx, dword [eax + 0x18]
mov eax, dword [eax + 8]
mov dword [ebp - 0x38], eax
add eax, 0x18
sub ebx, 2
mov dword [esp], eax
call esi
sub esp, 4
and ebx, 0xfffffffd
je 0x407e3c
mov ebx, 0x41d
jmp 0x407dea
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0_1
mov esi, dword [ebp + 0xc]
mov dword [esp + 0xc], str._p__s__p__ld_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x1c], esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x40b070
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x407c4f
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x407fc9
mov esi, dword [ebp - 0x3c]
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x18]
mov dword [esp + 8], 0
mov dword [ebp - 0x24], eax
mov eax, dword [0x40b06c]
mov dword [esp], 2
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
jne 0x408120
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
jne 0x407c76
test byte [0x40b070], 2
je 0x407dd9
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0_1
mov dword [esp + 0xc], str.service__s_failed_to_start_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x40b070
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x407dd9
mov edx, 1
jmp 0x407c98
mov eax, 2
jmp 0x407d2e
mov dword [esp], edx
call sym._process_terminate
mov edx, dword [ebp - 0x34]
jmp 0x407e23
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CancelIo]
sub esp, 4
jmp 0x40807f
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ebx, 0x46a
jmp 0x407dea