Function at 0x506600
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
mov edx, eax
push ebx
and edx, 2
mov ebx, ecx
sub esp, 0x4c
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], 0xc
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 1
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x1770
mov dword [esp + 0x10], 0x1388
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40000003
mov dword [esp], str..PiPe_tests_pipe.c
call dword [sym.imp.kernel32.dll_CreateNamedPipeA]
mov dword [ebx], eax
sub esp, 0x20
call fcn.0057d110
mov dword [eax], 0x5ead94
mov edx, dword fs:[0x18]
mov dword [eax + 4], 0xc89
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x38], edx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], str.CreateNamedPipe_failed:__lu_n
cmp dword [ebx], 0xffffffff
setne al
mov dword [esp], eax
call fcn.004f6800
mov dword [esp + 4], 0
mov eax, dword [ebx]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [ebp - 0x34], eax
call eax
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0xc8a
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], 0x5eaed4
mov dword [esp], eax
call fcn.004f6800
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
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 [ebp - 0x10], eax
sub esp, 0x10
lea eax, [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ConnectNamedPipe]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov edx, dword [ebp - 0x38]
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0xc8f
xor eax, eax
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x506782
xor eax, eax
cmp ecx, 0x3e5
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.WriteFile_returned__x__lu__n
call fcn.004f6800
mov edx, dword [ebx]
mov eax, 0xc90
call fcn.004f6820
mov edx, dword [ebp - 0x10]
mov eax, 0xc91
call fcn.004f6820
lea eax, [ebp - 0x2c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x40000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str..PiPe_tests_pipe.c
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esi], eax
sub esp, 0x1c
call fcn.0057d110
mov dword [eax], 0x5ead94
mov edx, dword fs:[0x18]
mov dword [eax + 4], 0xc94
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x38], edx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], 0x5ed755
cmp dword [esi], 0xffffffff
setne al
mov dword [esp], eax
call fcn.004f6800
lea eax, [ebp - 0x30]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetNamedPipeHandleState]
sub esp, 0x10
mov edi, eax
call fcn.0057d110
mov edx, dword [ebp - 0x38]
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0xc97
mov eax, dword [edx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.SetNamedPipeHandleState_failed:__lu_n
call fcn.004f6800
mov dword [esp + 4], 0
mov eax, dword [esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x34]
call eax
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0xc99
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x5eaed4
call fcn.004f6800
mov edx, dword [ebx]
mov eax, 0xc9a
call fcn.004f6820
mov edx, dword [ebx]
lea ecx, [ebp - 0x20]
mov eax, 0xc9b
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00504970
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret