Function at 0x400021c0
Capabilities:
Connect pipe
Read file on windows

Disassembly:
sub esp, 0x24
push ebx
push ebp
push edi
xor ebx, ebx
push ebx
push ebx
push 1
push ebx
mov edi, eax
xor ebp, ebp
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esp + 0x2c], eax
cmp eax, ebx
jne 0x400021f3
pop edi
pop ebp
mov eax, 0x7dff
pop ebx
add esp, 0x24
ret
push esi
cmp byte [edi + 0x60], bl
je 0x400022ab
mov ecx, dword [edi + 0x28]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40002261
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi + 0x38]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp esi, 0x3e5
jne 0x40002253
mov eax, dword [esp + 0x30]
mov ecx, dword [edi + 0x34]
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x20]
push edx
push 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x400023d0
jmp 0x4000226b
cmp esi, 0x217
jne 0x400023d0
jmp 0x4000226b
mov eax, dword [edi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [0x40477438]
push 0x10
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [esi + 4], 1
mov dword [esi], 0x10
mov dword [esi + 0xc], 2
mov edx, dword [edi + 0x5c]
push esi
push edi
call edx
mov eax, dword [0x40477438]
add esp, 8
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x400022b5
mov ecx, dword [edi + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [edi + 0x34]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [edi + 0x28]
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x24], eax
push 4
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40002343
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xea
je 0x4000231d
cmp eax, 0x3e5
jne 0x400023d0
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x20]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x400023d0
mov edx, dword [edi + 0x28]
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x40002343
call esi
cmp eax, 0xea
jne 0x400023d0
mov eax, dword [esp + 0x10]
mov ecx, dword [0x40477438]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [esp + 0x10]
mov ebp, eax
mov dword [ebp], edx
mov edx, dword [esp + 0x10]
lea eax, [ebp + 4]
add edx, 0xfffffffc
push eax
lea esi, [esp + 0x24]
lea ebx, [esp + 0x18]
call fcn.40002140
test al, al
je 0x400023ce
mov ecx, dword [esp + 0x14]
add ecx, 4
cmp ecx, dword [esp + 0x10]
jne 0x400023b5
test byte [ebp + 8], 1
je 0x400023a7
mov edx, dword [ebp + 0xc]
cmp edx, dword [edi + 0xc]
jne 0x400023b5
mov eax, dword [edi + 4]
mov dword [edi + 8], ebp
push eax
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x400023b5
mov ecx, dword [edi + 0x5c]
push ebp
push edi
call ecx
add esp, 8
test al, al
je 0x400023ce
mov edx, dword [0x40477438]
push ebp
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebp, ebp
xor ebx, ebx
jmp 0x400022b5
xor ebx, ebx
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
cmp ebp, ebx
je 0x400023ef
mov ecx, dword [0x40477438]
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop ebp
mov eax, 0x7d00
pop ebx
add esp, 0x24
ret