Function at 0x407740
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.15
mov ebx, eax
test eax, eax
je 0x407780
test byte [0x40b070], 8
jne 0x4079a6
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 0x407b10
mov esi, dword [ebp - 0x3c]
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ConnectNamedPipe]
sub esp, 8
test eax, eax
je 0x407a00
cmp word [edi], 0
je 0x407c10
mov edx, edi
add edx, 2
cmp word [edx], 0
jne 0x4077d2
sub edx, edi
sar edx, 1
add edx, 1
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
test esi, esi
je 0x40781f
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
lea esi, [ecx + esi*4]
mov ebx, dword [ecx]
cmp word [ebx], 0
je 0x4079e0
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x407803
sub eax, ebx
sar eax, 1
add eax, 1
add edx, eax
add ecx, 4
mov dword [ebp - 0x2c], edx
cmp esi, ecx
jne 0x4077f5
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
mov dword [ebp - 0x38], eax
xor eax, eax
mov ecx, dword [ebp - 0x38]
test esi, esi
je 0x407c20
movzx edx, word [edi + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x407844
cmp word [edi], 0
je 0x407c40
mov eax, edi
add eax, 2
cmp word [eax], 0
jne 0x407860
sub eax, edi
sar eax, 1
lea eax, [eax + eax + 2]
mov ebx, dword [ebp + 0xc]
add eax, dword [ebp - 0x38]
test ebx, ebx
je 0x4078cd
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x48], edi
lea esi, [edx + ebx*4]
mov edi, esi
lea esi, [esi]
mov esi, dword [edx]
xor ecx, ecx
movzx ebx, word [esi + ecx]
mov word [eax + ecx], bx
add ecx, 2
test bx, bx
jne 0x407894
cmp word [eax], 0
je 0x4079f0
mov ecx, eax
add ecx, 2
cmp word [ecx], 0
jne 0x4078b0
sub ecx, eax
sar ecx, 1
lea ecx, [ecx + ecx + 2]
add edx, 4
add eax, ecx
cmp edi, edx
jne 0x407890
mov edi, dword [ebp - 0x48]
xor ecx, ecx
mov esi, dword [ebp - 0x38]
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 dbg.process_send_control
test eax, eax
jne 0x407a60
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
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 0x40796b
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x18], 1
mov dword [eax + 0x68], 0
sub dword [edx + 0x10], 1
je 0x407c50
mov dword [esp], edx
call dbg.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 dbg.release_process
test byte [0x40b070], 8
je 0x407771
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.returning__ld_n
mov dword [esp + 8], global___func__.18
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.17
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 1
jmp 0x407813
mov ecx, 2
jmp 0x4078c1
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x407b60
cmp dword [eax + 0x34], 0x217
je 0x4077c6
test byte [0x40b070], 2
je 0x407919
mov dword [esp + 0xc], str.pipe_connect_failed_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.17
jmp 0x407919
mov ebx, dword [ebp - 0x28]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
test ebx, ebx
jne 0x40791e
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [ebx + 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]
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 0x10
test eax, eax
jne 0x407b01
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 0x40797c
mov ebx, 0x41d
jmp 0x40792a
mov eax, edi
call sym._wine_dbgstr_wn.constprop.16
mov ebx, 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], ebx
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.17
jmp 0x40779f
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 0x407c60
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 0x4077c6
test byte [0x40b070], 2
je 0x407919
mov eax, edi
call sym._wine_dbgstr_wn.constprop.16
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], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.17
jmp 0x407919
mov edx, 1
jmp 0x4077e2
mov ebx, 0x46a
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x40792a
mov eax, 2
jmp 0x407871
mov dword [esp], edx
call dbg.process_terminate
mov edx, dword [ebp - 0x34]
jmp 0x407963
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 0x407b9f