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

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x40
movaps xmmword [rsp + 0x30], xmm6
mov rdi, r8
mov ebp, ecx
mov rax, qword [0x1400cb080]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov rsi, qword [r8 + 0xe8]
test ecx, ecx
jne 0x140020f9a
mov r15, qword [rdi + 0x20]
test r15, r15
je 0x140020f81
xor ebx, ebx
xorps xmm6, xmm6
xor r12d, r12d
jmp 0x140020e23
mov rax, r12
mov r15, qword [r15 + 0x40]
mov r12, rax
test r15, r15
je 0x140020f7a
mov rcx, qword [r15 + 0x18]
test rcx, rcx
je 0x140020e40
call fcn.140094ec8
mov r14, rax
inc r14
cmp dword [r15 + 4], 2
jne 0x140020e10
jmp 0x140020e4a
xor r14d, r14d
cmp dword [r15 + 4], 2
jne 0x140020e10
cmp qword [r15 + 0x20], 0
je 0x140020e10
cmp qword [r15 + 0x10], 0x10
jb 0x140020e10
lea rcx, [r14 + 0x40]
call qword [case.0x1400315e4.5]
test rax, rax
je 0x140021138
mov ecx, dword [r15]
mov dword [rax], ecx
mov ecx, dword [r15 + 4]
mov dword [rax + 4], ecx
mov ecx, dword [r15 + 8]
mov dword [rax + 8], ecx
mov ecx, dword [r15 + 0xc]
mov dword [rax + 0xc], ecx
mov dword [rax + reloc.WS2_32.dll_recv], 0x10
lea rcx, [rax + 0x30]
movups xmmword [rax + 0x18], xmm6
mov qword [rax + 0x28], 0
mov qword [rax + 0x20], rcx
mov rcx, qword [r15 + 0x20]
movups xmm0, xmmword [rcx]
movups xmmword [rax + 0x30], xmm0
test r14, r14
je 0x140020f60
lea rcx, [rax + 0x18]
lea rdx, [rax + 0x40]
mov qword [rax + 0x18], rdx
mov edx, r14d
and edx, 3
cmp r14, 4
jae 0x140020ed1
xor r8d, r8d
jmp 0x140020f2f
mov r9, r14
and r9, 0xfffffffffffffffc
xor r8d, r8d
nop dword [rax + rax]
mov r10, qword [r15 + 0x18]
movzx r10d, byte [r10 + r8*2]
mov r11, qword [rcx]
mov byte [r11 + r8], r10b
mov r10, qword [r15 + 0x18]
movzx r10d, byte [r10 + r8*2 + 2]
mov r11, qword [rcx]
mov byte [r11 + r8 + 1], r10b
mov r10, qword [r15 + 0x18]
movzx r10d, byte [r10 + r8*2 + 4]
mov r11, qword [rcx]
mov byte [r11 + r8 + 2], r10b
mov r10, qword [r15 + 0x18]
movzx r10d, byte [r10 + r8*2 + 6]
mov r11, qword [rcx]
mov byte [r11 + r8 + 3], r10b
add r8, 4
cmp r9, r8
jne 0x140020ee0
test rdx, rdx
je 0x140020f58
nop word cs:[rax + rax]
mov r9, qword [r15 + 0x18]
movzx r9d, byte [r9 + r8*2]
mov r10, qword [rcx]
mov byte [r10 + r8], r9b
inc r8
dec rdx
jne 0x140020f40
mov rcx, qword [rcx]
mov byte [rcx + r14], 0
test rbx, rbx
cmove rbx, rax
test r12, r12
je 0x140020e13
mov qword [r12 + 0x28], rax
jmp 0x140020e13
xor ebp, ebp
test rbx, rbx
jne 0x140020f93
mov ebp, 0x2af9
mov ecx, 0x2af9
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor ebx, ebx
mov qword [rdi + 0xb0], rbx
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x140020fb1
call qword [0x1400ccb08]
mov qword [rdi + 0x20], 0
test ebp, ebp
je 0x140020fd7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x140020fc7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
test ebp, ebp
mov eax, 8
cmovne eax, ebp
mov dword [rdi + 0xa8], eax
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [rdi + 0x80], 0
je 0x1400210bf
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rdi + 0x78]
test rcx, rcx
je 0x140021011
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [rdi + 0x78]
call qword [fcn.140092c88]
mov rcx, qword [rdi + 0x88]
call qword [fcn.140092c88]
mov rcx, qword [rdi + 0xb0]
test rcx, rcx
je 0x14002102f
call fcn.140049270
mov rcx, qword [rdi + 0xa0]
cmp rcx, 0xffffffffffffffff
je case.default.0x1400210b8
call qword [sym.imp.WS2_32.dll_closesocket]
xorps xmm0, xmm0
movups xmmword [rdi + 0xe0], xmm0
movups xmmword [rdi + 0xd0], xmm0
movups xmmword [rdi + 0xc0], xmm0
movups xmmword [rdi + 0xb0], xmm0
movups xmmword [rdi + 0xa0], xmm0
movups xmmword [rdi + 0x90], xmm0
movups xmmword [rdi + 0x80], xmm0
movups xmmword [rdi + 0x70], xmm0
movups xmmword [rdi + 0x60], xmm0
movups xmmword [rdi + 0x50], xmm0
movups xmmword [rdi + 0x40], xmm0
movups xmmword [rdi + 0x30], xmm0
movups xmmword [rdi + 0x20], xmm0
movups xmmword [rdi + 0x10], xmm0
movups xmmword [rdi], xmm0
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140080da0
mov rcx, rsi
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x40
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp qword [fcn.140092c88]
mov rcx, qword [rdi + 0xa0]
cmp rcx, 0xffffffffffffffff
je 0x1400210f5
mov byte [rsp + 0x27], 1
lea rdx, [rsp + 0x27]
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1400210f5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0xa8], eax
mov dword [rdi + 0x80], 1
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsi]
test rcx, rcx
je 0x140021117
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140080da0
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x40
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rcx, rbx
call fcn.140049270
mov ebp, 8
jmp 0x140020f91