Function at 0x1400d6ee0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
pxor xmm0, xmm0
mov eax, dword [rdx + 0x30]
mov rbx, qword [rsp + 0xb8]
mov rdi, rcx
mov r12d, r8d
movaps xmmword [rsp + 0x30], xmm0
test eax, eax
je 0x1400d71d8
mov rax, qword [rsp + 0xb0]
mov rbp, qword [rax]
mov eax, dword [rbx]
test eax, eax
jle 0x1400d725d
mov r8, qword [rbx + 0x10]
cmp eax, 1
je 0x1400d726c
mov ecx, eax
mov rdx, r8
pxor xmm0, xmm0
shr ecx, 1
shl rcx, 4
add rcx, r8
nop word cs:[rax + rax]
movdqu xmm2, xmmword [rdx]
add rdx, 0x10
paddq xmm0, xmm2
cmp rdx, rcx
jne 0x1400d6f50
movdqa xmm1, xmm0
psrldq xmm1, 8
paddq xmm0, xmm1
movq rsi, xmm0
add rsi, rbp
test al, 1
je 0x1400d6f83
and eax, 0xfffffffe
cdqe
add rsi, qword [r8 + rax*8]
cmp rsi, 0x7d
jbe 0x1400d70a8
cmp rsi, 0xffff
ja 0x1400d7220
mov r9, qword [r9]
mov edx, 8
mov r14d, 8
test r9, r9
mov qword [rsp + 0x20], r9
jne 0x1400d70c4
mov rcx, rdx
mov qword [rsp + 0x20], rdx
call sym.malloc
mov qword [rsp + 0x30], rax
mov r13, rax
test rax, rax
je 0x1400d71d8
mov rdx, qword [rsp + 0x20]
xor ebp, ebp
cmp byte [rbx + 0x20], 0
mov r15d, r14d
mov qword [rsp + 0x38], rdx
jne 0x1400d710e
call sym.rand
mov ebp, 1
mov edx, eax
cdqe
imul rax, rax, 0xffffffff80808081
mov ecx, edx
sar ecx, 0x1f
shr rax, 0x20
add eax, edx
sar eax, 7
sub eax, ecx
mov ecx, eax
shl ecx, 8
sub ecx, eax
sub edx, ecx
mov byte [rbx + 0x20], dl
call sym.rand
mov edx, eax
cdqe
imul rax, rax, 0xffffffff80808081
mov ecx, edx
sar ecx, 0x1f
shr rax, 0x20
add eax, edx
sar eax, 7
sub eax, ecx
mov ecx, eax
shl ecx, 8
sub ecx, eax
sub edx, ecx
mov byte [rbx + 0x21], dl
call sym.rand
mov edx, eax
cdqe
imul rax, rax, 0xffffffff80808081
mov ecx, edx
sar ecx, 0x1f
shr rax, 0x20
add eax, edx
sar eax, 7
sub eax, ecx
mov ecx, eax
shl ecx, 8
sub ecx, eax
sub edx, ecx
mov byte [rbx + 0x22], dl
call sym.rand
mov edx, eax
cdqe
imul rax, rax, 0xffffffff80808081
mov ecx, edx
shr rax, 0x20
sar ecx, 0x1f
add eax, edx
sar eax, 7
sub eax, ecx
mov ecx, eax
shl ecx, 8
sub ecx, eax
sub edx, ecx
mov byte [rbx + 0x23], dl
jmp 0x1400d710e
mov edx, 6
mov r14d, 6
mov r9, qword [r9]
test r9, r9
mov qword [rsp + 0x20], r9
je 0x1400d6fb6
lea r15, [rbp + rdx]
mov qword [rsp + 0x28], rdx
mov rcx, r15
mov qword [rsp + 0x38], r15
call sym.malloc
mov qword [rsp + 0x30], rax
mov r13, rax
test rax, rax
je 0x1400d71d8
mov rdx, qword [rsp + 0x28]
mov r8, rbp
xor ebp, ebp
lea rcx, [rax + rdx]
mov rdx, qword [rsp + 0x20]
call sym.memcpy
cmp byte [rbx + 0x20], 0
je 0x1400d6fed
or r12d, 0xffffff80
mov byte [r13 + 1], pe_nt_image_headers64
mov byte [r13], r12b
cmp rsi, 0x7d
ja 0x1400d71f8
or esi, 0xffffff80
mov byte [r13 + 1], sil
mov esi, 2
mov eax, dword [rbx + 0x20]
mov dword [r13 + rsi], eax
cmp r14d, r15d
jge 0x1400d7265
mov ecx, r15d
xor eax, eax
sub ecx, r14d
movsxd r14, r14d
add r13, r14
mov rdx, rax
and edx, 3
movzx edx, byte [rbx + rdx + 0x20]
xor byte [r13 + rax], dl
add rax, 1
cmp rax, rcx
jne 0x1400d7150
mov edx, dword [rbx]
test edx, edx
jle 0x1400d71d8
xor r10d, r10d
test ebp, ebp
jne 0x1400d7184
cmp r10, 2
je 0x1400d71d8
lea ecx, [rdx - 1]
cmp ecx, r10d
je 0x1400d71d8
mov rcx, qword [rbx + 0x10]
lea r8, [r10*8]
cmp qword [rcx + r10*8], 0
je 0x1400d71cf
xor edx, edx
nop dword [rax]
mov rcx, qword [rbx + 8]
mov r9, rax
add rax, 1
and r9d, 3
mov rsi, qword [rcx + r8]
movzx r9d, byte [rbx + r9 + 0x20]
add rsi, rdx
add rdx, 1
xor byte [rsi], r9b
mov rcx, qword [rbx + 0x10]
cmp rdx, qword [rcx + r8]
jb 0x1400d71a0
mov edx, dword [rbx]
add r10, 1
cmp edx, r10d
jg 0x1400d7172
movdqa xmm3, xmmword [rsp + 0x30]
mov rax, rdi
movups xmmword [rdi], xmm3
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp rsi, 0xffff
jbe 0x1400d7241
cmp rsi, 0xffffffffffffffff
je 0x1400d7276
bswap rsi
mov byte [r13 + 1], 0xff
mov qword [r13 + 2], rsi
mov esi, 0xa
jmp 0x1400d7131
cmp rsi, 0xffffffffffffffff
mov eax, 4
mov edx, 0xe
mov r14d, 0xe
cmove rdx, rax
cmove r14d, eax
jmp 0x1400d70b3
mov ecx, esi
mov esi, 4
call qword [sym.imp.WS2_32.dll_htons]
or byte [r13 + 1], 0x7e
mov word [r13 + 2], ax
jmp 0x1400d7131
mov rsi, rbp
jmp 0x1400d6f83
xor eax, eax
jmp 0x1400d7169
mov rsi, rbp
xor eax, eax
jmp 0x1400d6f7d
lea r8, str.Data_too_large_for_websocket_frame
mov edx, 1
mov ecx, 4
call sym.Log
jmp 0x1400d7131