Function at 0x140041250
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, [0x14027dfa0]
mov r14, rdx
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rsi, qword [rax + rbx*8]
call sub.KERNEL32.dll_LeaveCriticalSection
mov r8d, dword [rsi + 0x68]
xor r12d, r12d
mov ebx, r12d
mov r15d, r12d
test r8b, 0x28
je 0x140041545
mov qword [rsp + 0x70], rdi
test r8b, 8
je 0x140041347
mov ecx, dword [rsi + 0x70]
call fcn.14017f368
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.140171260
mov ecx, dword [rsp + 0x60]
test rax, rax
jne 0x140041340
test ecx, ecx
jne 0x140041340
mov rax, qword gs:[0x58]
mov edi, 0x2f80
add rdi, qword [rax]
mov rax, qword [rdi]
test rax, rax
jne 0x140041307
call fcn.1401762d4
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.14003fba0
test eax, eax
jne 0x14004152b
mov rax, qword [rdi]
test rax, rax
jne 0x140041332
call fcn.1401762d4
mov dword [rax], 0x2733
or ebx, 0xffffffff
jmp 0x14004152b
mov ebx, ecx
jmp 0x140041520
test r8b, 1
je 0x1400413b0
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.140171260
mov rbx, rax
test rbp, rbp
jne 0x140041520
cmp eax, 0xffffffff
jne 0x140041520
mov rcx, qword gs:[0x58]
mov edi, 0x2f80
mov rdx, qword [rcx]
mov rax, qword [rdi + rdx]
test rax, rax
jne 0x14004139c
call fcn.1401762d4
cmp dword [rax], 0x2733
jne 0x14004152b
mov ebx, r12d
jmp 0x14004152b
test r8b, 4
je 0x140041569
bt r8d, 9
jae 0x140041455
movzx eax, byte [rsi + 0x164]
mov ebx, 1
mov byte [r14], al
and dword [rsi + 0x68], 0xffffbdff
inc r14
sub rbp, 1
je 0x140041524
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.140171260
mov edi, 0x2f80
test rax, rax
jne 0x14004149a
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rdi + rcx]
test rax, rax
jne 0x140041435
call fcn.1401762d4
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.14003fba0
test eax, eax
je 0x140041557
jmp 0x14004148d
bt r8d, 0xa
jae 0x1400413e8
mov edi, 0x2f80
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rdi + rcx]
test rax, rax
jne 0x140041332
call fcn.1401762d4
or ebx, 0xffffffff
mov dword [rax], 0x2733
jmp 0x14004152b
mov dword [rsp + 0x68], r12d
mov r15d, 1
jmp 0x1400414a1
cmp dword [rsp + 0x68], r12d
jne 0x1400414b7
test byte [rsi + 0x68], 0x80
jne 0x1400414ac
test r15d, r15d
je 0x1400414b7
test ebx, ebx
jne 0x140041522
test r15d, r15d
jne 0x14004152b
jmp 0x140041461
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.140171260
mov ecx, dword [rsp + 0x60]
test rax, rax
jne 0x14004151e
test ecx, ecx
jne 0x14004151e
mov rax, qword gs:[0x58]
add rdi, qword [rax]
mov rax, qword [rdi]
test rax, rax
jne 0x1400414ff
call fcn.1401762d4
mov ecx, dword [rax]
mov edx, 2
mov r9d, 0xe8
lea r8d, [rdx + 0x6b]
call fcn.14003fba0
test eax, eax
jne 0x140041520
jmp 0x140041325
add ebx, ecx
test ebx, ebx
jle 0x14004152b
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, 0x4b0000
call fcn.14002d920
int3
lea rdx, str.PeekNamedPipe_failed:__m
mov ecx, 0x4b0000
call fcn.14002d920
int3
lea rdx, str.invalid_vsock_type__d
mov ecx, 0x4b0000
call fcn.14002d920
int3