Function at 0x140041320
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, [0x14027dfa0]
mov r14, rdx
xor edi, edi
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea r15, [rbp*8]
lea rcx, [0x14027dfa0]
mov rbx, qword [r15 + rax]
call sub.KERNEL32.dll_LeaveCriticalSection
mov r8d, dword [rbx + 0x68]
test r8b, 0x28
je 0x1400415fb
bt r8d, 0x10
jb 0x14004160d
test rsi, rsi
je 0x140041504
test r8b, 8
je 0x1400413df
test r8b, r8b
js 0x140041629
mov ecx, dword [rbx + 0x70]
call fcn.14017f118
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.140171010
mov edi, eax
jmp 0x1400415e7
test r8b, 1
je 0x1400414bd
cmp qword [rbx + 0x40], rdi
je 0x140041449
cmp dword [rbx + 0x2c], edi
jne 0x140041449
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rdi, qword [r15 + rax]
call sub.KERNEL32.dll_LeaveCriticalSection
cmp dword [rdi + 0x2c], 0
jne 0x140041449
cmp dword [0x14027df78], 0
jne 0x140041449
lea rdx, [rsp + 0x30]
mov ecx, ebp
call fcn.140043de0
test eax, eax
jne 0x140041449
cmp dword [rdi + 0x2c], eax
jne 0x140041449
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.140171010
mov edi, eax
test eax, eax
jns 0x1400415e7
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x14004148d
call fcn.140176084
cmp dword [rax], 0x2747
jne 0x1400415e7
cmp rsi, 0x400
jbe 0x1400415e7
shr rsi, 1
mov rdx, r14
mov r8, rsi
mov ecx, ebp
call fcn.140041320
mov edi, eax
jmp 0x1400415e7
test r8b, 4
je 0x14004163b
test r8b, r8b
js 0x1400414d5
movsxd rcx, dword [rbx + 0x70]
jmp 0x1400413ad
bt r8d, 0x1a
jae 0x140041524
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x1400414fb
call fcn.140176084
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.14005a2c0
mov ecx, eax
mov edx, esi
cmp rcx, rsi
cmovb edx, eax
movsxd rdi, edx
test edx, edx
jne 0x140041568
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140041560
call fcn.140176084
mov dword [rax], 0x2733
jmp 0x140041501
mov rcx, qword [rbx + 0x88]
mov r8d, edi
mov rdx, r14
call fcn.14005a4c0
mov rcx, qword [rbx + 0x88]
call fcn.14005a2c0
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 0x1400415a8
mov rcx, rbx
call fcn.140048dc0
cmp rdi, rsi
je 0x1400415d2
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x1400415cc
call fcn.140176084
mov dword [rax], 0x2733
mov rcx, rbx
call fcn.140044250
test dword [rbx + 0x68], 0x4000000
jne 0x140041501
test edi, edi
jle 0x140041504
movsxd rax, edi
add qword [rbx + 0x18], rax
jmp 0x140041504
lea rdx, str.write_to_non_streamfile_socket
mov ecx, 0x4b0000
call fcn.14002d6c0
int3
mov r9d, dword [rbx + 0x180]
lea rdx, str.sock_write_fd_d_with_ASSERT_CLOSE:__x
mov r8d, ebp
mov ecx, 0x4b0000
call fcn.14002d6c0
int3
lea rdx, str.vsock_type_file_does_not_support_non_blocking_mode
mov ecx, 0x4b
call fcn.140028ae0
int3
lea rdx, str.invalid_fd_type_0x_x
mov ecx, 0x4b0000
call fcn.14002d6c0
int3