Function at 0x140041380
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 0x14004165b
bt r8d, 0x10
jb 0x14004166d
test rsi, rsi
je 0x140041564
test r8b, 8
je 0x14004143f
test r8b, r8b
js 0x140041689
mov ecx, dword [rbx + 0x70]
call fcn.14017f178
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.140171070
mov edi, eax
jmp 0x140041647
test r8b, 1
je 0x14004151d
cmp qword [rbx + 0x40], rdi
je 0x1400414a9
cmp dword [rbx + 0x2c], edi
jne 0x1400414a9
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 0x1400414a9
cmp dword [0x14027df78], 0
jne 0x1400414a9
lea rdx, [rsp + 0x30]
mov ecx, ebp
call fcn.140043e40
test eax, eax
jne 0x1400414a9
cmp dword [rdi + 0x2c], eax
jne 0x1400414a9
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.140171070
mov edi, eax
test eax, eax
jns 0x140041647
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x1400414ed
call fcn.1401760e4
cmp dword [rax], 0x2747
jne 0x140041647
cmp rsi, 0x400
jbe 0x140041647
shr rsi, 1
mov rdx, r14
mov r8, rsi
mov ecx, ebp
call fcn.140041380
mov edi, eax
jmp 0x140041647
test r8b, 4
je 0x14004169b
test r8b, r8b
js 0x140041535
movsxd rcx, dword [rbx + 0x70]
jmp 0x14004140d
bt r8d, 0x1a
jae 0x140041584
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x14004155b
call fcn.1401760e4
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.14005a320
mov ecx, eax
mov edx, esi
cmp rcx, rsi
cmovb edx, eax
movsxd rdi, edx
test edx, edx
jne 0x1400415c8
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x1400415c0
call fcn.1401760e4
mov dword [rax], 0x2733
jmp 0x140041561
mov rcx, qword [rbx + 0x88]
mov r8d, edi
mov rdx, r14
call fcn.14005a520
mov rcx, qword [rbx + 0x88]
call fcn.14005a320
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 0x140041608
mov rcx, rbx
call fcn.140048e20
cmp rdi, rsi
je 0x140041632
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x14004162c
call fcn.1401760e4
mov dword [rax], 0x2733
mov rcx, rbx
call fcn.1400442b0
test dword [rbx + 0x68], 0x4000000
jne 0x140041561
test edi, edi
jle 0x140041564
movsxd rax, edi
add qword [rbx + 0x18], rax
jmp 0x140041564
lea rdx, str.write_to_non_streamfile_socket
mov ecx, 0x4b0000
call fcn.14002d720
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.14002d720
int3
lea rdx, str.vsock_type_file_does_not_support_non_blocking_mode
mov ecx, 0x4b
call fcn.140028b40
int3
lea rdx, str.invalid_fd_type_0x_x
mov ecx, 0x4b0000
call fcn.14002d720
int3