Function at 0x5975c0
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
cmp dword [eax - 4], 0
lea ecx, [eax - 8]
push edi
mov dword [ebp + 0xc], ecx
mov edi, dword [eax + 0x18]
jne 0x5975e7
push ecx
push dword [ecx]
call fcn.004d84f0
add esp, 8
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x10], 0xc0000120
jne 0x5975f9
mov byte [ecx + 0x58], 0
pop edi
mov esp, ebp
pop ebp
ret
push esi
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x597637
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x597637
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_named_pipe_listening_event_received
push 0x402
mov eax, dword [eax]
push 5
push esi
call eax
add esp, 0x18
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [edi + 0x244]
test eax, eax
je 0x597725
cmp eax, 0xc000014b
jne 0x5976a1
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x59768d
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 2
jl 0x59768d
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_named_pipe_is_closed
push 0x402
mov eax, dword [eax]
push 2
push esi
call eax
add esp, 0x18
push 0x41b
call fcn.004d86d0
add esp, 4
mov eax, 0x100
jmp 0x597700
call fcn.004db1d0
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x5976ea
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 2
jl 0x5976ea
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_named_pipe_error__d
push 0x402
push 2
push dword [ebp - 4]
call eax
add esp, 0x1c
push dword [ebp + 0x10]
call fcn.00596e30
push eax
call fcn.004d86d0
add esp, 8
mov eax, 0x200
mov dword [edi + 0x22c], eax
mov esi, dword [ebx]
call fcn.004d8660
push eax
mov eax, dword [esi + 4]
push edi
call eax
mov eax, dword [ebp + 0xc]
add esp, 8
pop ebx
pop esi
mov byte [eax + 0x58], 0
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x597762
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x597762
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_incoming_connection
push 0x402
mov eax, dword [eax]
push 5
push esi
call eax
add esp, 0x18
push 0x248
push dword [edi]
call fcn.004d8110
mov esi, eax
add esp, 8
test esi, esi
je 0x597a62
push 0
lea ecx, [edi + 0x208]
push ecx
push dword [edi]
push esi
call fcn.00597c90
add esp, 0x10
test eax, eax
jne 0x597a31
lea edx, [esi + 0x21c]
mov dword [esi + 0x22c], 0xc
mov eax, dword [edi + 0x21c]
mov ecx, dword [edi + 0x220]
push edx
push dword [ebp + 8]
mov dword [edx], eax
mov dword [edx + 4], ecx
call fcn.005882b0
add esp, 8
mov dword [esi + 0x224], 0
lea eax, [edi + 4]
push 0
push 0
push 0x200
push 0x200
push 0xff
push 0
push 0x40000003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov dword [edi + 0x21c], eax
cmp eax, 0xffffffff
je 0x5979bf
mov eax, dword [ebx + 4]
push edi
add eax, 8
push fcn.005975c0
push eax
call fcn.00592ce0
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x21c]
push eax
push ecx
mov dword [edi + 0x224], ecx
call fcn.00587de0
add esp, 0x14
test eax, eax
jne 0x597990
push dword [edi + 0x240]
push esi
push eax
mov eax, dword [edi + 0x23c]
push edi
call eax
mov eax, dword [ebp + 0xc]
add esp, 0x10
cmp dword [eax + 4], 0
je 0x597970
mov eax, dword [ebx + 4]
mov byte [eax + 0x58], 1
mov eax, dword [ebx + 4]
add eax, 8
push eax
call fcn.004815b0
add esp, 4
push eax
push dword [edi + 0x21c]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x597a80
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, 0x3e5
je 0x597924
cmp eax, 0x217
jne 0x5978af
cmp byte [ebx + 0x140], 0
je 0x597725
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004db1d0
mov esi, eax
mov dword [ebp + 0xc], esi
test esi, esi
je 0x5978f8
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 2
jl 0x5978f8
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_named_pipe_connect_failed_with_error__d
push 0x402
push 2
push dword [ebp + 0xc]
call eax
add esp, 0x1c
push dword [ebp - 4]
mov dword [edi + 0x22c], 0x200
mov eax, dword [ebx + 4]
mov byte [eax + 0x58], 0
mov ecx, dword [ebx]
call fcn.00596e30
push eax
mov eax, dword [ecx + 4]
push edi
call eax
add esp, 0xc
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x597a80
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 6
jl 0x597a80
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_no_pending_connections_exiting_accept_loop.
push 0x402
mov eax, dword [eax]
push 6
push esi
call eax
add esp, 0x18
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x22c], 0x200
push eax
push dword [eax]
mov byte [eax + 0x58], 0
call fcn.004d84f0
add esp, 8
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x22c], 0x200
push esi
mov byte [eax + 0x58], 0
call fcn.005965d0
mov esi, dword [ebx]
call fcn.004d8660
push eax
mov eax, dword [esi + 4]
push edi
call eax
add esp, 0xc
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004db1d0
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x597a08
mov ecx, dword [esi]
push 0x402
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 2
jl 0x597a08
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_error_rebinding_named_pipe_with_error__d
push 0x402
push 2
push dword [ebp - 4]
call eax
add esp, 0x1c
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x22c], 0x200
mov byte [eax + 0x58], 0
mov esi, dword [ebx]
call fcn.004d8660
push eax
mov eax, dword [esi + 4]
push edi
call eax
add esp, 8
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push esi
push dword [edi]
call fcn.004d84f0
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x22c], 0x200
mov byte [eax + 0x58], 0
mov esi, dword [ebx]
call fcn.004d8660
push eax
mov eax, dword [esi + 4]
push edi
call eax
add esp, 0x10
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x22c], 0x200
push 1
push edi
mov byte [eax + 0x58], 0
mov eax, dword [ebx]
mov eax, dword [eax + 4]
call eax
add esp, 8
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret