Function at 0x4fbc10
Capabilities:
Connect pipe
Create pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
cmp dword [eax + 4], 0
je 0x4fbe10
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
je 0x4fbe0b
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x10], 0xffffffff
jne 0x4fbca3
mov eax, dword [ebp - 0x38]
add eax, 0x270
push eax
push 0x1388
push 0x800
push 0x800
push 0xff
push 6
push 3
mov ecx, dword [ebp - 0x38]
add ecx, 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x38]
mov byte [edx + 0x27c], 1
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4fbc84
xor eax, eax
jmp 0x4fbf96
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov ecx, dword [ebp - 0x38]
mov byte [ecx + 0x27c], 0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 0x38]
add ecx, 0x230
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004fc460
movzx edx, al
test edx, edx
je 0x4fbcf1
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x27c], 1
mov ecx, dword [ebp - 0x38]
add ecx, 0x230
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4fbc26
mov edx, dword [ebp - 0x38]
mov byte [edx + 0x27c], 0
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004fc480
mov eax, dword [eax]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004fc4e0
mov ecx, dword [ebp - 0x38]
add ecx, 0x230
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 0
push 0
lea ecx, [ebp - 0xc]
push ecx
push 4
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0xc], 4
jne 0x4fbdb6
push 0
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 8]
cmp dword [edx + 8], 0
je 0x4fbd8e
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.0050d6e3
add esp, 4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0050c4ec
add esp, 4
jmp 0x4fbe06
mov ecx, dword [ebp - 0x38]
add ecx, 0x230
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [ebp - 8]
push edx
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004fc4a0
mov eax, dword [ebp - 0x38]
add eax, 0x230
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov eax, dword [ebp - 0x38]
mov dword [eax + 0x10], 0xffffffff
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4fbc26
jmp 0x4fbf94
mov byte [ebp - 0x11], 1
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
je 0x4fbf94
movzx edx, byte [ebp - 0x11]
test edx, edx
je 0x4fbe46
push 1
mov eax, dword [ebp - 0x38]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x4fbe46
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4fbe14
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x10], 0xffffffff
jne 0x4fbe74
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
mov edx, dword [ebp - 0x38]
add edx, 0x14
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x38]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x10], 0xffffffff
jne 0x4fbe87
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4fbe14
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4fbf79
cmp dword [ebp - 0x20], 0
je 0x4fbf79
push 0xc
call fcn.0050cb21
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0050acfa
add esp, 4
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x24]
cmp dword [ecx], 0
je 0x4fbf77
push 0
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x20]
jne 0x4fbf5c
mov eax, dword [ebp - 0x38]
add eax, 0x230
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004fc520
mov edx, dword [ebp - 0x38]
add edx, 0x230
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4fbf77
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x38]
mov dword [edx + 0x10], 0xffffffff
jmp 0x4fbf8f
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 0x38]
mov dword [eax + 0x10], 0xffffffff
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4fbe14
xor eax, eax
mov esp, ebp
pop ebp
ret