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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov rax, qword [0x140295010]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0x50], r8d
mov rdi, rdx
mov qword [rsp + 0x58], rdx
mov rbx, rcx
xor r15d, r15d
nop dword [rax]
mov r12, qword [rbx + 0x28]
imul rax, qword [rbx + 0x30], 0x1c8
mov dword [rbx + 0x58], r15d
add rax, r12
mov qword [rsp + 0x90], r12
cmp r12, rax
jae 0x140016edd
lea r14, [r12 + 0xe0]
nop dword [rax]
mov eax, dword [r14 - 0xa8]
test eax, eax
je 0x140016ea7
cmp eax, 9
je 0x140016ea7
lea r13, [rbx + 0xa88]
mov word [rbx + 0x68], r15w
mov qword [r13], 1
mov qword [rbx + 0x670], r15
mov qword [rbx + 0x60], 4
mov rbp, qword [r14]
cmp rbp, r14
je 0x140016a40
lea rdi, [rbx + 0x6a]
lea r15, [rbx + 0x688]
lea r12, [rbx + 0x66a]
nop dword [rax]
cmp rdi, r12
jae 0x1400169e9
cmp r15, r13
jae 0x1400169e9
mov eax, dword [r14 - 0x10]
sub rax, qword [rbx + 0x60]
cmp rax, 8
jb 0x1400169e9
mov rsi, rbp
mov rbp, qword [rbp]
mov qword [r15 + 8], rdi
mov qword [r15], 8
add qword [rbx + 0x60], 8
movzx ecx, word [rsi + 0x16]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
mov byte [rdi], 1
movzx eax, byte [rsi + 0x15]
mov byte [rdi + 1], al
mov word [rdi + 2], cx
mov word [rdi + 4], cx
movzx ecx, word [rsi + 0x10]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rdi + 6], ax
movzx eax, byte [rsi + 0x14]
and al, 0xf
cmp al, 4
jne 0x1400169b8
mov rdx, qword [rsp + 0x90]
mov r8d, 9
mov rcx, rbx
call fcn.1400145f0
mov rdx, qword [rsi + 8]
mov rcx, rsi
mov rax, qword [rsi]
mov qword [rdx], rax
mov rdx, qword [rsi]
mov rax, qword [rsi + 8]
mov qword [rdx + 8], rax
call qword [0x140295068]
add rdi, 0x30
add r15, 0x10
cmp rbp, r14
jne 0x140016930
jmp 0x1400169f0
mov dword [rbx + 0x58], 1
mov r12, qword [rsp + 0x90]
sub rdi, rbx
mov r8d, dword [rsp + 0x50]
sub rdi, 0x6a
sub r15, rbx
movabs rax, 0x2aaaaaaaaaaaaaab
imul rdi
mov rdi, qword [rsp + 0x58]
sub r15, 0x678
sar rdx, 3
mov rax, rdx
sar r15, 4
shr rax, 0x3f
add rdx, rax
mov qword [r13], r15
mov qword [rbx + 0x670], rdx
xor r15d, r15d
test r8d, r8d
je 0x140016a86
lea rax, [r14 + 0x10]
cmp qword [rax], rax
je 0x140016a86
mov eax, dword [rbx + 0x40]
sub eax, dword [r14 - 0x70]
cmp eax, 0x5265c00
jae 0x140016a86
mov r8, rdi
mov rdx, r12
mov rcx, rbx
call fcn.140016100
cmp eax, 1
jne 0x140016a86
test rdi, rdi
je 0x140016ea2
cmp dword [rdi], 0
je 0x140016ea2
jmp 0x140016ee9
lea rax, [r14 + 0x30]
cmp qword [rax], rax
je 0x140016aa2
mov rdx, r12
mov rcx, rbx
call fcn.1400162d0
test eax, eax
je 0x140016b42
lea rax, [r14 + 0x10]
cmp qword [rax], rax
jne 0x140016b42
mov edx, dword [r14 - 0x74]
mov ecx, dword [rbx + 0x40]
sub ecx, edx
sub edx, dword [rbx + 0x40]
cmp ecx, 0x5265c00
cmovb edx, ecx
cmp edx, dword [r14 - 0x38]
jb 0x140016b42
mov eax, dword [r14 - 0x10]
sub rax, qword [rbx + 0x60]
cmp rax, 4
jb 0x140016b42
cmp dword [r14 - 0xa8], 5
jne 0x140016b37
mov ecx, 0x60
mov word [rsp + 0x60], 0xff85
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
test rax, rax
jne 0x140016b01
call qword [0x140295070]
jmp 0x140016b37
movups xmm0, xmmword [rsp + 0x60]
mov rdx, rax
mov rcx, r12
movups xmm1, xmmword [rsp + 0x70]
mov dword [rax + 0x20], r15d
movups xmmword [rax + 0x28], xmm0
mov word [rax + 0x24], r15w
movups xmm0, xmmword [rsp + 0x80]
mov qword [rax + 0x58], r15
movups xmmword [rax + 0x38], xmm1
movups xmmword [rax + 0x48], xmm0
call fcn.140013e10
mov rdx, r12
mov rcx, rbx
call fcn.1400162d0
cmp qword [rbx + 0x670], 0
je 0x140016ea2
mov ecx, dword [r14 - 0x68]
mov edx, dword [rbx + 0x40]
test ecx, ecx
jne 0x140016b61
mov dword [r14 - 0x68], edx
jmp 0x140016bce
mov eax, edx
sub eax, ecx
sub ecx, edx
cmp eax, 0x5265c00
cmovb ecx, eax
cmp ecx, 0x2710
jb 0x140016bce
mov ecx, dword [r14 - 0x64]
test ecx, ecx
je 0x140016bce
mov r8d, dword [r14 - 0x5c]
xor edx, edx
mov eax, dword [r14 - 0x60]
shl eax, 0x10
div ecx
mov edx, r8d
sub edx, eax
mov ecx, eax
mov r9d, eax
sub ecx, r8d
cmp eax, r8d
mov eax, dword [r14 - 0x58]
cmovae edx, ecx
lea ecx, [rax + rax*2]
imul eax, r8d, 7
add edx, ecx
shr edx, 2
mov dword [r14 - 0x58], edx
add eax, r9d
shr eax, 3
mov dword [r14 - 0x5c], eax
mov eax, dword [rbx + 0x40]
mov dword [r14 - 0x68], eax
mov qword [r14 - 0x64], 0
cmp word [rbx + 0x68], 0
lea rax, [rsp + 0xa8]
mov qword [rbx + 0x680], rax
jge 0x140016bfd
movzx ecx, word [rbx + 0x40]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0xaa], ax
mov eax, 4
jmp 0x140016c02
mov eax, 2
mov qword [rbx + 0x678], rax
mov rbp, r15
mov rcx, qword [rbx + 0xa98]
test rcx, rcx
je 0x140016c67
mov r10, qword [rbx + 0xaa0]
test r10, r10
je 0x140016c67
mov rdi, qword [rbx + 0x60]
lea rax, [rbx + 0x1ab8]
mov r8, qword [r13]
lea rdx, [rbx + 0x688]
sub rdi, 4
dec r8
mov qword [rsp + 0x28], rdi
mov r9, rdi
mov qword [rsp + 0x20], rax
call r10
test rax, rax
je 0x140016c67
cmp rax, rdi
jae 0x140016c67
mov ecx, 0x4000
mov rbp, rax
or word [rbx + 0x68], cx
mov eax, 0xfff
cmp word [r14 - 0xc8], ax
jae 0x140016c86
movzx eax, byte [r14 - 0xc0]
shl ax, 0xc
or word [rbx + 0x68], ax
movzx ecx, word [r14 - 0xc8]
or cx, word [rbx + 0x68]
call qword [sym.imp.WS2_32.dll_htons]
mov r8, qword [rbx + 0xa90]
mov word [rsp + 0xa8], ax
test r8, r8
je 0x140016cf6
mov rcx, qword [rbx + 0x678]
lea rdi, [rsp + 0xa8]
add rdi, rcx
mov eax, 0xfff
cmp word [r14 - 0xc8], ax
jae 0x140016cd6
mov eax, dword [r14 - 0xc4]
jmp 0x140016cd9
mov eax, r15d
mov rdx, qword [r13]
mov dword [rdi], eax
lea rax, [rcx + 4]
lea rcx, [rbx + 0x678]
mov qword [rbx + 0x678], rax
call r8
mov dword [rdi], eax
mov ecx, 2
test rbp, rbp
je 0x140016d19
lea rax, [rbx + 0x1ab8]
mov qword [rbx + 0x688], rbp
mov qword [rbx + 0x690], rax
mov qword [r13], rcx
mov eax, dword [rbx + 0x40]
lea rdi, [r14 - 0xbc]
mov dword [r14 - 0x78], eax
mov rbp, qword [r13]
xor r13d, r13d
mov r15, qword [rbx]
mov dword [rsp + 0x90], r13d
test rdi, rdi
je 0x140016d70
xorps xmm0, xmm0
movups xmmword [rsp + 0x98], xmm0
mov word [rsp + 0x98], cx
movzx ecx, word [r14 - 0xb8]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x9a], ax
mov eax, dword [rdi]
mov dword [rsp + 0x9c], eax
mov qword [rsp + 0x40], r13
lea rdx, [rbx + 0x678]
mov qword [rsp + 0x38], r13
mov rax, rdi
neg rax
mov r8d, ebp
lea rax, [rsp + 0x98]
mov rcx, r15
sbb r9d, r9d
and r9d, 0x10
mov dword [rsp + 0x30], r9d
test rdi, rdi
lea r9, [rsp + 0x90]
cmove rax, r13
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x140016dd6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb ebp, ebp
jmp 0x140016ddd
mov ebp, dword [rsp + 0x90]
mov rdi, qword [r14 + 0x20]
lea r15, [r14 + 0x20]
cmp rdi, r15
je 0x140016e92
nop
mov rcx, qword [rdi + 8]
mov rax, qword [rdi]
mov qword [rcx], rax
mov rax, qword [rdi + 8]
mov rcx, qword [rdi]
mov qword [rcx + 8], rax
mov rax, qword [rdi + 0x58]
test rax, rax
je 0x140016e56
dec qword [rax]
mov rax, qword [rdi + 0x58]
cmp qword [rax], r13
jne 0x140016e56
or dword [rax + 8], 0x100
mov rsi, qword [rdi + 0x58]
test rsi, rsi
je 0x140016e56
mov rax, qword [rsi + 0x20]
test rax, rax
je 0x140016e38
mov rcx, rsi
call rax
test byte [rsi + 8], 4
jne 0x140016e4d
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x140016e4d
call qword [0x140295068]
mov rcx, rsi
call qword [0x140295068]
mov rcx, rdi
call qword [0x140295068]
mov rdi, qword [r15]
cmp rdi, r15
jne 0x140016df0
cmp dword [r14 - 0xa8], 6
jne 0x140016e92
lea rax, [r14 + 0x30]
cmp qword [rax], rax
jne 0x140016e92
lea rax, [r14 + 0x10]
cmp qword [rax], rax
jne 0x140016e92
mov edx, dword [r14 + 0xd8]
mov rcx, r12
call fcn.140013bf0
test ebp, ebp
js 0x140016f14
add dword [rbx + 0x2ad0], ebp
inc dword [rbx + 0x2ad4]
mov r8d, dword [rsp + 0x50]
imul rax, qword [rbx + 0x30], 0x1c8
mov rdi, qword [rsp + 0x58]
add r12, 0x1c8
add rax, qword [rbx + 0x28]
add r14, 0x1c8
mov qword [rsp + 0x90], r12
mov r15d, 0
cmp r12, rax
jb 0x1400168d0
cmp dword [rbx + 0x58], 0
jne 0x1400168a0
xor eax, eax
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.1401e8230
mov rbx, qword [rsp + 0x110]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, 0xffffffff
jmp 0x140016ee9