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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x3b13f23
cmp dword [ebp + 0xc], 0
je 0x3b13f23
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x3b13f23
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x3b13f23
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x3b13f23
mov dword [eax], 0
mov eax, dword [0x3b47c00]
mov dword [ebp + 8], 0
mov dword [ebx], 0
test eax, eax
je 0x3b13d96
dec eax
mov dword [ebx], eax
mov ecx, dword [eax*4 + 0x3b47b00]
mov edx, dword [esi]
mov dword [0x3b47c00], eax
cmp ecx, edx
jbe 0x3b13d08
mov ecx, edx
jmp 0x3b13d0a
mov dword [esi], ecx
shl eax, 0xb
push ecx
add eax, 0x3b27b00
push eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.03b13640
mov eax, dword [0x3b47c00]
mov ecx, dword [eax*4 + 0x3b47b00]
mov edx, dword [esi]
add esp, 0xc
cmp ecx, edx
jbe 0x3b13d6a
sub ecx, edx
mov dword [eax*4 + 0x3b47b00], ecx
push ecx
mov ecx, dword [esi]
shl eax, 0xb
lea edx, [eax + ecx + 0x3b27b00]
push edx
lea eax, [eax + 0x3b27b00]
push eax
call fcn.03b13640
add esp, 0xc
inc dword [0x3b47c00]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov byte [eax + edi + 0x204], 1
mov dword [eax*4 + 0x3b47b00], ecx
mov dword [0x3b47c00], ecx
mov ecx, dword [ebp + 0x18]
mov dword [ecx], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
push 0xffffffffffffffff
push 0
lea eax, [edi + 0x104]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, eax
cmp esi, dword [edi]
ja 0x3b13f1d
jmp 0x3b13dc3
mov ebx, dword [ebp + 0x14]
mov eax, 1
cmp byte [edi + esi + 0x204], al
jne 0x3b13e0d
lea eax, [esi + esi*4 + 0x91]
lea ecx, [edi + eax*4]
push ecx
push 0
mov edx, esi
shl edx, 0xb
push 0x800
add edx, 0x3b27b00
mov dword [esi*4 + 0x3b47b00], 0
mov eax, dword [edi + esi*4 + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [edi + esi + 0x204], 2
mov dword [ebx], esi
cmp byte [edi + esi + 0x204], 2
jne 0x3b13edd
test eax, eax
je 0x3b13edd
mov eax, dword [edi + esi*4 + 4]
push 0
lea ecx, [esi + esi*4 + 0x91]
lea edx, [ebp - 4]
lea ebx, [edi + ecx*4]
push edx
push ebx
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x3b13edd
mov ecx, dword [ebp - 4]
add dword [esi*4 + 0x3b47b00], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [esi*4 + 0x3b47b00]
mov ecx, dword [edx]
cmp eax, ecx
jb 0x3b13eb3
mov ebx, esi
shl ebx, 0xb
lea eax, [ebx + 0x3b27b00]
push ecx
push eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.03b13640
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
sub dword [esi*4 + 0x3b47b00], ecx
mov ecx, dword [esi*4 + 0x3b47b00]
mov edx, dword [eax]
push ecx
mov ecx, dword [ebp + 8]
lea eax, [ebx + edx + 0x3b27b00]
push eax
push ecx
call fcn.03b13640
mov ebx, dword [ebp - 8]
add esp, 0x18
mov dword [ebp + 8], 1
mov eax, dword [esi*4 + 0x3b47b00]
push ebx
push 0
mov edx, 0x800
sub edx, eax
push edx
mov ecx, esi
shl ecx, 0xb
lea edx, [ecx + eax + 0x3b27b00]
mov eax, dword [edi + esi*4 + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x6d
je 0x3b13f2c
call ebx
cmp eax, 0x3e5
je 0x3b13ef5
call ebx
cmp dword [ebp + 8], 0
jne 0x3b13d8a
mov ecx, dword [edi]
push 0xffffffffffffffff
push 0
lea eax, [edi + 0x104]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, eax
cmp esi, dword [edi]
jbe 0x3b13dc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp dword [esi*4 + 0x3b47b00], ecx
je 0x3b13f40
lea edx, [esi + 1]
mov dword [0x3b47c00], edx
cmp dword [0x3b47c00], ecx
jne 0x3b13f51
mov eax, dword [ebp + 0x18]
mov dword [eax], 1
lea edx, [esi + esi*4]
lea eax, [edi + edx*4]
mov dword [eax + 0x24c], ecx
mov dword [eax + 0x250], ecx
mov eax, dword [edi + esi*4 + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov eax, dword [edi + esi*4 + 4]
lea ecx, [esi + esi*4 + 0x91]
lea edx, [edi + ecx*4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret