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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xa0]
sub rsp, 0x1a0
mov rax, qword [0x14009e7a0]
xor rax, rsp
mov qword [rbp + 0x90], rax
mov rax, qword [rbp + 0x100]
lea r15, [rbp - 0x10]
xor r14d, r14d
mov dword [rsp + 0x60], r8d
mov qword [rsp + 0x78], rdx
mov esi, r14d
mov byte [rsp + 0x30], sil
mov ebx, r9d
mov dword [rsp + 0x58], ebx
mov r12d, 0xa
mov qword [rsp + 0x68], rcx
mov rdi, rcx
mov qword [rbp - 0x80], rax
mov dword [rsp + 0x38], r14d
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x34], r12d
mov dword [rsp + 0x48], r14d
test rcx, rcx
je 0x140021985
cmp dword [rcx], 0xbab1e
jne 0x140021985
cmp byte [rcx + 0x1cb], sil
je 0x1400212cf
lea eax, [r14 + 8]
jmp 0x1400216c4
test ebx, ebx
jns 0x1400212db
mov eax, r12d
jmp 0x1400216c4
lea rdx, [rsp + 0x50]
call fcn.140021140
mov eax, dword [rsp + 0x50]
test eax, eax
js 0x1400212f6
cmp eax, ebx
cmovl ebx, eax
mov dword [rsp + 0x58], ebx
xor edx, edx
mov qword [rsp + 0x1f0], r13
mov r8d, 0xa0
lea rcx, [rbp - 0x10]
call fcn.14007c528
xor eax, eax
xorps xmm0, xmm0
mov qword [rbp - 0x48], rax
mov rax, qword [rdi + 8]
mov qword [rsp + 0x70], rax
movups xmmword [rbp - 0x78], xmm0
movups xmmword [rbp - 0x68], xmm0
movups xmmword [rbp - 0x58], xmm0
test rax, rax
je 0x1400214de
nop word [rax + rax]
lea rdx, [rbp - 0x78]
mov rcx, rax
call fcn.14001fc40
cmp dword [rbp - 0x50], 0
mov r13, r14
jbe 0x1400214c2
nop dword [rax]
movzx edx, byte [rbp + r13 - 0x4c]
lea r15, [r13*8]
movzx ecx, dl
and cl, 1
movzx eax, cl
neg al
sbb r14d, r14d
and r14d, 0x29
neg cl
sbb bx, bx
and bx, 0x300
test dl, 2
je 0x1400213e3
mov rdi, qword [rbp + r15 - 0x78]
lea rax, [rsp + 0x50]
mov rcx, rdi
mov dword [rsp + 0x50], 4
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1008
or r14d, 0x32
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1400213df
cmp dword [rsp + 0x5c], 1
jne 0x1400213df
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
or bx, 0x10
test bx, bx
je 0x140021489
mov rdx, qword [rsp + 0x40]
lea rdi, [rbp - 0x78]
test esi, esi
je 0x140021410
lea ecx, [rsi - 1]
add rcx, rcx
mov rax, qword [rdx + rcx*8]
cmp qword [rdi + r15], rax
jne 0x140021410
or word [rdx + rcx*8 + 8], bx
jmp 0x140021489
cmp esi, r12d
jb 0x140021471
add r12d, 0x64
mov edx, reloc.WS2_32.dll_recv
mov ecx, r12d
call qword [case.0x14002593b.3]
mov rsi, rax
test rax, rax
je 0x140021680
mov r8d, dword [rsp + 0x34]
mov rcx, rax
mov rdx, qword [rsp + 0x40]
shl r8, 4
call sub.VCRUNTIME140.dll_memcpy
cmp byte [rsp + 0x30], 0
je 0x14002145b
mov rcx, qword [rsp + 0x40]
call qword [case.0x14002593b.0]
mov rdx, rsi
mov dword [rsp + 0x34], r12d
mov esi, dword [rsp + 0x48]
mov qword [rsp + 0x40], rdx
mov byte [rsp + 0x30], 1
mov rax, qword [rdi + r15]
mov ecx, esi
add rcx, rcx
inc esi
mov dword [rsp + 0x48], esi
mov qword [rdx + rcx*8], rax
mov word [rdx + rcx*8 + 8], bx
mov rdi, qword [rsp + 0x68]
test r14d, r14d
je 0x1400214b0
mov rdx, qword [rdi + 0x1b8]
mov r8d, r14d
mov rcx, qword [rbp + r15 - 0x78]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x14002168e
mov eax, dword [rbp - 0x50]
inc r13
cmp r13, rax
jb 0x140021360
xor r14d, r14d
mov rax, qword [rsp + 0x70]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x70], rax
test rax, rax
jne 0x140021340
mov r15, qword [rsp + 0x40]
mov ebx, dword [rsp + 0x60]
lea r13, [rdi + 0x1b8]
xor r9d, r9d
mov dword [rsp + 0x34], esi
mov qword [rsp + 0x70], r9
mov r14d, esi
mov qword [rsp + 0x50], rbx
test rbx, rbx
je 0x140021660
mov rbx, qword [rsp + 0x78]
add rbx, 8
nop
movzx edx, word [rbx]
movzx eax, dl
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x29
mov edi, ecx
or edi, 4
test dl, 2
cmove edi, ecx
test dl, 4
je 0x14002157d
mov r14, qword [rbx - 8]
lea rax, [rsp + 0x60]
mov rcx, r14
mov dword [rsp + 0x60], 4
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1008
or edi, 0x32
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14002157d
cmp dword [rsp + 0x5c], 1
jne 0x14002157d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
mov rdx, qword [r13]
mov r8d, edi
mov rcx, qword [rbx - 8]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x1400216e5
cmp esi, r12d
jb 0x1400215ea
lea r14d, [r12 + 0x64]
mov ecx, r14d
lea edx, [rax + 0x10]
call qword [case.0x14002593b.3]
mov rdi, rax
test rax, rax
je 0x1400216a7
mov r8d, r12d
mov rdx, r15
shl r8, 4
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
cmp byte [rsp + 0x30], 0
je 0x1400215da
mov rcx, r15
call qword [case.0x14002593b.0]
mov r15, rdi
mov qword [rsp + 0x40], rdi
mov r12d, r14d
mov byte [rsp + 0x30], 1
mov rax, qword [rbx - 8]
xor r9d, r9d
mov ecx, esi
shl rcx, 4
add rcx, r15
mov qword [rcx], rax
movzx eax, r9w
mov word [rcx + 8], r9w
test byte [rbx], 1
je 0x140021616
mov edx, 0x300
mov word [rcx + 8], dx
mov eax, edx
test byte [rbx], 2
je 0x140021627
mov edx, 0x400
or ax, dx
mov word [rcx + 8], ax
test byte [rbx], 4
je 0x140021634
or ax, 0x10
mov word [rcx + 8], ax
mov r8, qword [rsp + 0x70]
inc esi
inc r8
mov dword [rsp + 0x48], esi
add rbx, 0x10
mov qword [rsp + 0x70], r8
cmp r8, qword [rsp + 0x50]
jb 0x140021510
mov rbx, qword [rsp + 0x50]
mov r14d, dword [rsp + 0x34]
movzx edi, byte [rbp + 0x110]
test esi, esi
jne 0x1400216fc
test dil, dil
je 0x140021901
mov edi, r9d
jmp 0x140021721
cmp byte [rsp + 0x30], 0
je 0x1400216b7
mov rcx, qword [rsp + 0x40]
jmp 0x1400216b1
cmp byte [rsp + 0x30], 0
je 0x1400216f5
mov rcx, qword [rsp + 0x40]
call qword [case.0x14002593b.0]
mov eax, 4
jmp 0x1400216bc
cmp byte [rsp + 0x30], 0
je 0x1400216b7
mov rcx, r15
call qword [case.0x14002593b.0]
mov eax, 3
mov r13, qword [rsp + 0x1f0]
mov rcx, qword [rbp + 0x90]
xor rcx, rsp
call fcn.14007b5d0
add rsp, 0x1a0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
cmp byte [rsp + 0x30], 0
je 0x1400216f5
mov rcx, r15
call qword [case.0x14002593b.0]
mov eax, 4
jmp 0x1400216bc
xor r8d, r8d
mov edx, esi
mov rcx, r15
call fcn.140046360
mov edi, eax
test eax, eax
jns 0x140021716
mov eax, ntohs
jmp 0x1400216bc
jle 0x14002171e
mov dword [rsp + 0x38], eax
jmp 0x14002173b
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], r9d
mov r9d, dword [rsp + 0x58]
mov rdx, r13
lea ecx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
test rbx, rbx
je 0x140021830
mov rcx, qword [rsp + 0x78]
mov r12d, r14d
shl r12, 4
sub r12, rcx
add r12, r15
lea rsi, [rcx + 0xa]
nop word [rax + rax]
mov r14, qword [rsi - 0xa]
lea r8, [rbp - 0x40]
movsx r15d, word [r12 + rsi]
xor eax, eax
mov rcx, r14
mov dword [rbp - 0x40], eax
xor edx, edx
movzx ebx, ax
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x1400217d8
mov r8d, dword [rbp - 0x40]
mov ecx, eax
test r8b, 0x29
setne cl
movzx edx, cx
or dx, 4
test r8b, 0x32
cmove dx, cx
movzx ecx, dx
or cx, 2
test r8b, 4
cmove cx, dx
cmp qword [rbp - 0x80], 0
movzx ebx, cx
je 0x1400217d8
test edi, edi
jne 0x1400217d8
test r8d, r8d
je 0x1400217d8
inc dword [rsp + 0x38]
xor r8d, r8d
mov rdx, qword [r13]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x14002181d
mov rdx, qword [r13]
xor r8d, r8d
mov rcx, r14
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test edi, edi
je 0x14002181d
movzx ecx, bx
or cx, 1
test r15d, 0x300
cmove cx, bx
movzx edx, cx
or dx, 4
test r15b, 0x10
cmove dx, cx
movzx ebx, dx
or bx, 2
bt r15d, 0xa
cmovae bx, dx
mov word [rsi], bx
add rsi, 0x10
sub qword [rsp + 0x50], 1
jne 0x140021760
cmp dword [rsp + 0x34], 0
mov r14, qword [rsp + 0x68]
je 0x1400218ea
mov rsi, qword [r14 + 8]
mov qword [rsp + 0x78], rsi
test rsi, rsi
je 0x1400218ea
mov r14, qword [rbp - 0x80]
nop word [rax + rax]
lea rdx, [rbp - 0x78]
mov rcx, rsi
call fcn.14001fc40
xor eax, eax
mov ebx, eax
cmp dword [rbp - 0x50], eax
jbe 0x1400218d3
mov esi, dword [rsp + 0x38]
nop dword [rax]
mov rcx, qword [rbp + rbx*8 - 0x78]
lea r8, [rbp - 0x40]
xor edx, edx
mov dword [rbp - 0x40], eax
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x1400218a8
test r14, r14
je 0x1400218a8
test edi, edi
jne 0x1400218a8
cmp dword [rbp - 0x40], edi
je 0x1400218a8
inc esi
mov rdx, qword [r13]
xor r8d, r8d
mov rcx, qword [rbp + rbx*8 - 0x78]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [rbp - 0x50]
inc rbx
cmp rbx, rax
mov eax, 0
jb 0x140021880
mov dword [rsp + 0x38], esi
mov rsi, qword [rsp + 0x78]
mov rsi, qword [rsi + 0x10]
mov qword [rsp + 0x78], rsi
test rsi, rsi
jne 0x140021860
mov r14, qword [rsp + 0x68]
mov rcx, qword [r13]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
mov esi, dword [rsp + 0x48]
movzx edi, byte [rbp + 0x110]
jmp 0x140021906
mov r14, qword [rsp + 0x68]
cmp byte [rsp + 0x30], 0
je 0x140021918
mov rcx, qword [rsp + 0x40]
call qword [case.0x14002593b.0]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140021927
mov eax, dword [rsp + 0x38]
mov dword [rcx], eax
cmp byte [rbp + 0x108], 0
je 0x14002197e
test esi, esi
jne 0x14002197e
test dil, dil
jne 0x14002197e
cmp dword [r14], 0xbab1e
mov dword [rsp + 0x34], esi
jne 0x14002197e
cmp byte [r14 + 0x1cb], dil
jne 0x14002197e
lea rdx, [rsp + 0x34]
mov rcx, r14
call fcn.140021140
test eax, eax
jne 0x14002197e
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x14002197e
mov ecx, dword [rsp + 0x58]
cmp eax, ecx
jg 0x140021974
test eax, eax
jns 0x140021976
mov eax, ecx
movsxd rcx, eax
call fcn.1400468c0
xor eax, eax
jmp 0x1400216bc
mov eax, 1
jmp 0x1400216c4