Function at 0x140042dc0
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, [0x140272f60]
mov r14, rdx
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140272fe0]
lea rcx, [0x140272f60]
mov rsi, qword [rax + rbx*8]
call fcn.14002ec90
mov r8d, dword [rsi + 0x68]
xor r12d, r12d
mov ebx, r12d
mov r15d, r12d
test r8b, 0x28
je 0x1400430b5
mov qword [rsp + 0x70], rdi
test r8b, 8
je 0x140042eb7
mov ecx, dword [rsi + 0x70]
call fcn.14018423c
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.140172320
mov ecx, dword [rsp + 0x60]
test rax, rax
jne 0x140042eb0
test ecx, ecx
jne 0x140042eb0
mov rax, qword gs:[0x58]
mov edi, 0x2fe0
add rdi, qword [rax]
mov rax, qword [rdi]
test rax, rax
jne 0x140042e77
call fcn.140176664
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.1400415e0
test eax, eax
jne 0x14004309b
mov rax, qword [rdi]
test rax, rax
jne 0x140042ea2
call fcn.140176664
mov dword [rax], 0x2733
or ebx, 0xffffffff
jmp 0x14004309b
mov ebx, ecx
jmp 0x140043090
test r8b, 1
je 0x140042f20
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.140172320
mov rbx, rax
test rbp, rbp
jne 0x140043090
cmp eax, 0xffffffff
jne 0x140043090
mov rcx, qword gs:[0x58]
mov edi, 0x2fe0
mov rdx, qword [rcx]
mov rax, qword [rdi + rdx]
test rax, rax
jne 0x140042f0c
call fcn.140176664
cmp dword [rax], 0x2733
jne 0x14004309b
mov ebx, r12d
jmp 0x14004309b
test r8b, 4
je 0x1400430d9
bt r8d, 9
jae 0x140042fc5
movzx eax, byte [rsi + 0x164]
mov ebx, 1
mov byte [r14], al
and dword [rsi + 0x68], 0xffffbdff
inc r14
sub rbp, 1
je 0x140043094
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.140172320
mov edi, 0x2fe0
test rax, rax
jne 0x14004300a
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rdi + rcx]
test rax, rax
jne 0x140042fa5
call fcn.140176664
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.1400415e0
test eax, eax
je 0x1400430c7
jmp 0x140042ffd
bt r8d, 0xa
jae 0x140042f58
mov edi, 0x2fe0
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rdi + rcx]
test rax, rax
jne 0x140042ea2
call fcn.140176664
or ebx, 0xffffffff
mov dword [rax], 0x2733
jmp 0x14004309b
mov dword [rsp + 0x68], r12d
mov r15d, 1
jmp 0x140043011
cmp dword [rsp + 0x68], r12d
jne 0x140043027
test byte [rsi + 0x68], 0x80
jne 0x14004301c
test r15d, r15d
je 0x140043027
test ebx, ebx
jne 0x140043092
test r15d, r15d
jne 0x14004309b
jmp 0x140042fd1
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.140172320
mov ecx, dword [rsp + 0x60]
test rax, rax
jne 0x14004308e
test ecx, ecx
jne 0x14004308e
mov rax, qword gs:[0x58]
add rdi, qword [rax]
mov rax, qword [rdi]
test rax, rax
jne 0x14004306f
call fcn.140176664
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.1400415e0
test eax, eax
jne 0x140043090
jmp 0x140042e95
add ebx, ecx
test ebx, ebx
jle 0x14004309b
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.140029170
int3
lea rdx, str.PeekNamedPipe_failed:__m
mov ecx, 0x580000
call fcn.140029170
int3
lea rdx, str.invalid_vsock_type__d
mov ecx, 0x580000
call fcn.140029170
int3