Function at 0x4dd080
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 0x4dd280
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
je 0x4dd27b
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x10], 0xffffffff
jne 0x4dd113
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 0x4dd0f4
xor eax, eax
jmp 0x4dd406
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.004dd8d0
movzx edx, al
test edx, edx
je 0x4dd161
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 0x4dd096
mov edx, dword [ebp - 0x38]
mov byte [edx + 0x27c], 0
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004dd8f0
mov eax, dword [eax]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x38]
add ecx, 0x214
call fcn.004dd950
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 0x4dd226
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 0x4dd1fe
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.004f7a71
add esp, 4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004f755c
add esp, 4
jmp 0x4dd276
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.004dd910
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 0x4dd096
jmp 0x4dd404
mov byte [ebp - 0x11], 1
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
je 0x4dd404
movzx edx, byte [ebp - 0x11]
test edx, edx
je 0x4dd2b6
push 1
mov eax, dword [ebp - 0x38]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x4dd2b6
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4dd284
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x10], 0xffffffff
jne 0x4dd2e4
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 0x4dd2f7
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4dd284
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 0x4dd3e9
cmp dword [ebp - 0x20], 0
je 0x4dd3e9
push 0xc
call fcn.004f8259
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.004f5e5a
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 0x4dd3e7
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 0x4dd3cc
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.004dd990
mov edx, dword [ebp - 0x38]
add edx, 0x230
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4dd3e7
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 0x4dd3ff
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 0x4dd284
xor eax, eax
mov esp, ebp
pop ebp
ret