Function at 0x49ef90
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 0x49f190
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
je 0x49f18b
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x10], 0xffffffff
jne 0x49f023
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 0x49f004
xor eax, eax
jmp 0x49f316
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.0049f7e0
movzx edx, al
test edx, edx
je 0x49f071
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 0x49efa6
mov edx, dword [ebp - 0x38]
mov byte [edx + 0x27c], 0
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.0049f800
mov eax, dword [eax]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.0049f860
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 0x49f136
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 0x49f10e
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.004c6761
add esp, 4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004c6248
add esp, 4
jmp 0x49f186
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.0049f820
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 0x49efa6
jmp 0x49f314
mov byte [ebp - 0x11], 1
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
je 0x49f314
movzx edx, byte [ebp - 0x11]
test edx, edx
je 0x49f1c6
push 1
mov eax, dword [ebp - 0x38]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x49f1c6
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x49f194
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x10], 0xffffffff
jne 0x49f1f4
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 0x49f207
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x49f194
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 0x49f2f9
cmp dword [ebp - 0x20], 0
je 0x49f2f9
push 0xc
call fcn.004c6aff
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.004c4a2a
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 0x49f2f7
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 0x49f2dc
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.0049f8a0
mov edx, dword [ebp - 0x38]
add edx, 0x230
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x49f2f7
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 0x49f30f
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 0x49f194
xor eax, eax
mov esp, ebp
pop ebp
ret