Function at 0x140042720
Capabilities:
Read file on windows
Read pipe
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r12
push r14
push r15
sub rsp, 0x30
movsxd rbx, ecx
mov rbp, r8
lea rcx, [0x140270f40]
mov r14, rdx
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rsi, qword [rax + rbx*8]
call fcn.14002e7d0
mov r8d, dword [rsi + 0x68]
xor r12d, r12d
mov ebx, r12d
mov r15d, r12d
test r8b, 0x28
je 0x140042a15
mov qword [rsp + 0x70], rdi
test r8b, 8
je 0x140042817
mov ecx, dword [rsi + 0x70]
call fcn.14018289c
mov rcx, rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x60]
mov r8d, ebp
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rcx, eax
call fcn.140170a40
mov ecx, dword [rsp + 0x60]
test rax, rax
jne 0x140042810
test ecx, ecx
jne 0x140042810
mov rax, qword gs:[0x58]
mov edi, 0x2fe0
add rdi, qword [rax]
mov rax, qword [rdi]
test rax, rax
jne 0x1400427d7
call fcn.140174cc4
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.140040f40
test eax, eax
jne 0x1400429fb
mov rax, qword [rdi]
test rax, rax
jne 0x140042802
call fcn.140174cc4
mov dword [rax], 0x2733
or ebx, 0xffffffff
jmp 0x1400429fb
mov ebx, ecx
jmp 0x1400429f0
test r8b, 1
je 0x140042880
movsxd rcx, dword [rsi + 0x70]
xor r9d, r9d
mov r8d, ebp
mov rdx, r14
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
call fcn.140170a40
mov rbx, rax
test rbp, rbp
jne 0x1400429f0
cmp eax, 0xffffffff
jne 0x1400429f0
mov rcx, qword gs:[0x58]
mov edi, 0x2fe0
mov rdx, qword [rcx]
mov rax, qword [rdi + rdx]
test rax, rax
jne 0x14004286c
call fcn.140174cc4
cmp dword [rax], 0x2733
jne 0x1400429fb
mov ebx, r12d
jmp 0x1400429fb
test r8b, 4
je 0x140042a39
bt r8d, 9
jae 0x140042925
movzx eax, byte [rsi + 0x164]
mov ebx, 1
mov byte [r14], al
and dword [rsi + 0x68], 0xffffbdff
inc r14
sub rbp, 1
je 0x1400429f4
movsxd rcx, dword [rsi + 0x70]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], r12
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
movsxd rcx, eax
call fcn.140170a40
mov edi, 0x2fe0
test rax, rax
jne 0x14004296a
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rdi + rcx]
test rax, rax
jne 0x140042905
call fcn.140174cc4
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.140040f40
test eax, eax
je 0x140042a27
jmp 0x14004295d
bt r8d, 0xa
jae 0x1400428b8
mov edi, 0x2fe0
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rdi + rcx]
test rax, rax
jne 0x140042802
call fcn.140174cc4
or ebx, 0xffffffff
mov dword [rax], 0x2733
jmp 0x1400429fb
mov dword [rsp + 0x68], r12d
mov r15d, 1
jmp 0x140042971
cmp dword [rsp + 0x68], r12d
jne 0x140042987
test byte [rsi + 0x68], 0x80
jne 0x14004297c
test r15d, r15d
je 0x140042987
test ebx, ebx
jne 0x1400429f2
test r15d, r15d
jne 0x1400429fb
jmp 0x140042931
movsxd rcx, dword [rsi + 0x70]
lea r9, [rsp + 0x60]
mov r8d, ebp
mov qword [rsp + 0x20], r12
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd rcx, eax
call fcn.140170a40
mov ecx, dword [rsp + 0x60]
test rax, rax
jne 0x1400429ee
test ecx, ecx
jne 0x1400429ee
mov rax, qword gs:[0x58]
add rdi, qword [rax]
mov rax, qword [rdi]
test rax, rax
jne 0x1400429cf
call fcn.140174cc4
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.140040f40
test eax, eax
jne 0x1400429f0
jmp 0x1400427f5
add ebx, ecx
test ebx, ebx
jle 0x1400429fb
movsxd rax, ebx
add qword [rsi + 0x20], rax
mov rdi, qword [rsp + 0x70]
movsxd rax, ebx
mov rbx, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r12
pop rsi
pop rbp
ret
lea rdx, str.read_from_non_streamfile_socket
mov ecx, 0x580000
call fcn.1400292e0
int3
lea rdx, str.PeekNamedPipe_failed:__m
mov ecx, 0x580000
call fcn.1400292e0
int3
lea rdx, str.invalid_vsock_type__d
mov ecx, 0x580000
call fcn.1400292e0
int3