Function at 0x407aa0
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 0x407ae0
test byte [0x417070], 8
jne 0x407d16
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 [0x417070], 8
jne 0x407e88
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 0x407d70
cmp word [edi], 0
je 0x407fa0
mov edx, edi
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x407b38
sub edx, edi
sar edx, 1
add edx, 1
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
test esi, esi
je 0x407b8c
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 0x407d60
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x407b70
sub eax, ebx
sar eax, 1
add eax, 1
add edx, eax
add ecx, 4
mov dword [ebp - 0x2c], edx
cmp esi, ecx
jne 0x407b60
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 0x407fe7
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [edi + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x407bb0
cmp word [edi], 0
je 0x407fb0
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x407bd0
sub eax, edi
add eax, 2
mov ebx, dword [ebp + 0xc]
add eax, esi
test ebx, ebx
je 0x407c43
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 0x407c08
cmp word [eax], 0
je 0x407d50
mov ecx, eax
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x407c28
sub ecx, eax
add ecx, 2
add eax, ecx
add edx, 4
cmp dword [ebp - 0x38], edx
jne 0x407c00
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 0x407de0
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 0x407cdb
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x18], 1
mov dword [eax + 0x68], 0
sub dword [edx + 0x10], 1
je 0x407fc0
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 [0x417070], 8
je 0x407ad1
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.returning__ld_n
mov dword [esp + 8], str.service_start
mov dword [esp + 4], 0x417070
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 0x407c36
mov eax, 1
jmp 0x407b80
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x407ef0
cmp dword [eax + 0x34], 0x217
je 0x407b26
test byte [0x417070], 2
je 0x407c89
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], 0x417070
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 0x407c9a
mov ebx, dword [ebp - 0x28]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
test ebx, ebx
jne 0x407c8e
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 [0x41706c]
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 0x407ed8
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 0x407cec
mov ebx, 0x41d
jmp 0x407c9a
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], 0x417070
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x407aff
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x407e79
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 [0x41706c]
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 0x407fd0
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 0x407b26
test byte [0x417070], 2
je 0x407c89
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], 0x417070
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x407c89
mov edx, 1
jmp 0x407b48
mov eax, 2
jmp 0x407bde
mov dword [esp], edx
call sym._process_terminate
mov edx, dword [ebp - 0x34]
jmp 0x407cd3
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 0x407f2f
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ebx, 0x46a
jmp 0x407c9a