Function at 0x140165380
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x218]
sub rsp, 0x2f0
movaps xmmword [rax - 0x38], xmm6
mov rax, qword [0x14039ac80]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov r14, rcx
xor r15d, r15d
cmp byte [rcx + 0x49], r15b
je 0x140165720
cmp byte [rcx + 0x110], r15b
jne 0x14016573a
cmp byte [rcx + 0x190], r15b
je 0x1401653ed
add rcx, 0x160
call fcn.140142510
lea rdx, [rbp - 0x80]
lea rcx, [r14 + 0x130]
call fcn.14013f950
mov rax, qword [r14 + 0x188]
sub rax, qword [r14 + 0x158]
mov rcx, qword [rbp - 0x78]
cmp rcx, rax
cmova rcx, rax
mov qword [rbp - 0x78], rcx
test rcx, rcx
jne 0x1401654c7
lea rdi, [r14 + 0x40]
mov ebx, r15d
mov esi, 1
mov eax, esi
xchg dword [rdi], eax
test eax, eax
je 0x14016544b
inc ebx
cmp ebx, 0x32
jl 0x140165443
call sub.MSVCP140.dll__Thrd_yield
mov eax, esi
xchg dword [rdi], eax
test eax, eax
jne 0x140165437
mov qword [rsp + 0x50], rdi
cmp byte [r14 + 0x190], 0
je 0x140165466
lea rcx, [r14 + 0x160]
call fcn.140142510
lea rdx, [rsp + 0x70]
lea rcx, [r14 + 0x130]
call fcn.14013f950
mov rax, qword [r14 + 0x188]
sub rax, qword [r14 + 0x158]
mov rcx, qword [rsp + 0x78]
cmp rcx, rax
cmova rcx, rax
mov qword [rsp + 0x78], rcx
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rbp - 0x80], xmm0
test rcx, rcx
jne 0x1401654be
xchg byte [r14 + 0x111], sil
test rdi, rdi
je 0x1401656d1
nop
mov dword [rdi], r15d
jmp 0x1401656d1
test rdi, rdi
je 0x1401654c7
nop
mov dword [rdi], r15d
xorps xmm0, xmm0
movups xmmword [r14 + 0x198], xmm0
movups xmmword [r14 + 0x1a8], xmm0
movzx esi, byte [r14 + 0x190]
lea rax, [rbp + 0x30]
mov qword [rsp + 0x50], rax
lea rcx, [r14 + 0x160]
lea rdx, [rbp + 0x30]
call fcn.140145a40
mov rbx, rax
lea rdx, [rbp + 0x60]
lea rcx, [r14 + 0x130]
call fcn.140145a40
nop
movzx r9d, sil
mov r8, rbx
mov rdx, rax
lea rcx, [rbp - 0x40]
call fcn.140145140
nop
mov rdi, r15
mov qword [rsp + 0x40], r15
lea r12, [rbp + 0x98]
lea r13, str.D:_a_ton_ton_tdutils_tdutilsportSocketFd.cpp
nop dword [rax]
lea rdx, [rbp - 0x70]
lea rcx, [rbp - 0x40]
call fcn.14013f950
mov r15, qword [rbp + 0x18]
mov rsi, qword [rbp - 0x18]
sub r15, rsi
mov rbx, qword [rbp - 0x68]
cmp rbx, r15
cmova rbx, r15
mov qword [rbp - 0x68], rbx
test rbx, rbx
je 0x1401655d2
mov qword [rbp - 0x50], r13
mov dword [rbp - 0x48], 0xf2
mov qword [rsp + 0x40], rbx
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x50]
call fcn.140163580
mov dword [r12 - 8], eax
mov rax, qword [rbp - 0x70]
mov qword [r12], rax
cmp rbx, r15
ja 0x140165706
add rsi, rbx
mov qword [rbp - 0x18], rsi
mov rax, qword [rbp - 0x30]
add rax, rbx
mov qword [rbp - 0x30], rax
cmp rax, qword [rbp - 0x28]
ja 0x140165754
inc rdi
mov qword [rsp + 0x40], rdi
add r12, 0x10
cmp rdi, 0x14
jb 0x140165540
mov qword [rbp - 0x60], r13
mov dword [rbp - 0x58], 0xf7
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x60]
call fcn.140163580
mov ebx, eax
lea rcx, [r14 + 0x18]
call fcn.14015c080
lea rcx, [r14 + 0x198]
xor edx, edx
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], edx
xor r9d, r9d
mov r8d, ebx
lea rdx, [rbp + 0x90]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
je 0x140165685
lea rax, str.Failed_to_write_to_connection
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 0x1d
movaps xmm6, xmmword [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x140165685
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
movdqa xmmword [rsp + 0x60], xmm6
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.14012b920
lea rdx, [rsp + 0x48]
mov rcx, r14
call fcn.140165990
jmp 0x140165695
mov rcx, r14
call fcn.140164fc0
mov byte [r14 + 0x110], 1
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x1401656a4
call fcn.140163250
nop
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x1401656b3
call fcn.14013b470
nop
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x1401656c2
call fcn.140163250
nop
mov rcx, qword [rbp - 0x40]
test rcx, rcx
je 0x1401656d1
call fcn.14013b470
nop
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.1402c5880
lea r11, [rsp + 0x2f0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov r8d, 0x242
lea rdx, str.D:_a_ton_ton_tdutils_td_utils_buffer.h
lea rcx, str.size___this__size__
call fcn.140153ae0
nop
mov r8d, 0xd7
lea rdx, str.D:_a_ton_ton_tdutils_tdutilsportSocketFd.cpp
lea rcx, str.is_connected_
call fcn.140153ae0
int3
mov r8d, 0xd8
lea rdx, str.D:_a_ton_ton_tdutils_tdutilsportSocketFd.cpp
lea rcx, str._is_write_active_
call fcn.140153ae0
nop
mov r8d, 0xb6
lea rdx, str.D:_a_ton_ton_tdutils_td_utils_buffer.h
lea rcx, str.begin____end_
call fcn.140153ae0
int3