Function at 0x140042a50
Capabilities:
Send data
Send data on socket
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x90
movsxd rbp, ecx
mov rsi, r8
lea rcx, [0x140270f40]
mov r14, rdx
xor edi, edi
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea r15, [rbp*8]
lea rcx, [0x140270f40]
mov rbx, qword [r15 + rax]
call fcn.14002e7d0
mov r8d, dword [rbx + 0x68]
test r8b, 0x28
je 0x140042d2b
bt r8d, 0x10
jb 0x140042d3d
test rsi, rsi
je 0x140042c34
test r8b, 8
je 0x140042b0f
test r8b, r8b
js 0x140042d59
mov ecx, dword [rbx + 0x70]
call fcn.14018289c
mov rcx, rax
lea r9, [rsp + 0xb0]
mov qword [rsp + 0x20], rdi
mov r8d, esi
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
or ecx, 0xffffffff
test eax, eax
cmovne ecx, dword [rsp + 0xb0]
call fcn.140170a40
mov edi, eax
jmp 0x140042d17
test r8b, 1
je 0x140042bed
cmp qword [rbx + 0x40], rdi
je 0x140042b79
cmp dword [rbx + 0x2c], edi
jne 0x140042b79
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rdi, qword [r15 + rax]
call fcn.14002e7d0
cmp dword [rdi + 0x2c], 0
jne 0x140042b79
cmp dword [0x140270f20], 0
jne 0x140042b79
lea rdx, [rsp + 0x30]
mov ecx, ebp
call fcn.140045510
test eax, eax
jne 0x140042b79
cmp dword [rdi + 0x2c], eax
jne 0x140042b79
mov eax, dword [rsp + 0x4c]
mov dword [rdi + 0x28], eax
mov dword [rdi + 0x2c], 1
movsxd rcx, dword [rbx + 0x70]
xor r9d, r9d
mov r8d, esi
mov rdx, r14
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
call fcn.140170a40
mov edi, eax
test eax, eax
jns 0x140042d17
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140042bbd
call fcn.140174cc4
cmp dword [rax], 0x2747
jne 0x140042d17
cmp rsi, 0x400
jbe 0x140042d17
shr rsi, 1
mov rdx, r14
mov r8, rsi
mov ecx, ebp
call fcn.140042a50
mov edi, eax
jmp 0x140042d17
test r8b, 4
je 0x140042d6b
test r8b, r8b
js 0x140042c05
movsxd rcx, dword [rbx + 0x70]
jmp 0x140042add
bt r8d, 0x1a
jae 0x140042c54
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140042c2b
call fcn.140174cc4
mov dword [rax], 0x20
or edi, 0xffffffff
lea r11, [rsp + 0x90]
movsxd rax, edi
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
mov rcx, qword [rbx + 0x88]
call fcn.14004e270
mov ecx, eax
mov edx, esi
cmp rcx, rsi
cmovb edx, eax
movsxd rdi, edx
test edx, edx
jne 0x140042c98
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140042c90
call fcn.140174cc4
mov dword [rax], 0x2733
jmp 0x140042c31
mov rcx, qword [rbx + 0x88]
mov r8d, edi
mov rdx, r14
call fcn.14004e470
mov rcx, qword [rbx + 0x88]
call fcn.14004e270
and dword [rbx + 0x68], 0xffff7fff
mov ecx, eax
neg ecx
sbb edx, edx
and edx, 0x8000
or dword [rbx + 0x68], edx
test eax, eax
je 0x140042cd8
mov rcx, rbx
call fcn.14004a390
cmp rdi, rsi
je 0x140042d02
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140042cfc
call fcn.140174cc4
mov dword [rax], 0x2733
mov rcx, rbx
call fcn.140045980
test dword [rbx + 0x68], 0x4000000
jne 0x140042c31
test edi, edi
jle 0x140042c34
movsxd rax, edi
add qword [rbx + 0x18], rax
jmp 0x140042c34
lea rdx, str.write_to_non_streamfile_socket
mov ecx, 0x580000
call fcn.1400292e0
int3
mov r9d, dword [rbx + 0x180]
lea rdx, str.sock_write_fd_d_with_ASSERT_CLOSE:__x
mov r8d, ebp
mov ecx, 0x580000
call fcn.1400292e0
int3
lea rdx, str.vsock_type_file_does_not_support_non_blocking_mode
mov ecx, 0x58
call fcn.14003e580
int3
lea rdx, str.invalid_fd_type_0x_x
mov ecx, 0x580000
call fcn.1400292e0
int3