Function at 0x1405118f0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
movdqa xmmword [rsp + 0xb0], xmm14
movdqa xmmword [rsp + 0xa0], xmm13
movdqa xmmword [rsp + 0x90], xmm12
movdqa xmmword [rsp + 0x80], xmm11
movdqa xmmword [rsp + 0x70], xmm10
movdqa xmmword [rsp + 0x60], xmm9
movdqa xmmword [rsp + 0x50], xmm8
movdqa xmmword [rsp + 0x40], xmm7
movdqa xmmword [rsp + 0x30], xmm6
mov rbx, r8
mov ebp, edx
mov rdi, rcx
movzx eax, word [rsp + 0x130]
mov dword [rsp + 0x24], eax
and eax, 0xb
cmp eax, 1
je 0x140511a8a
test eax, eax
jne 0x140511bfa
cmp r9d, ebp
jl 0x14051206f
lea rax, [rdi + 0x10]
mov ecx, ebp
jmp 0x14051199b
mov rbx, r9
test ecx, ecx
jle 0x14051207d
lea r9d, [rcx - 1]
movsxd rdx, ecx
lea r8, [rdx - 1]
movzx r10d, word [rdi + rdx*2 - 2]
and r10d, 0xfc00
cmp r10d, 0xdc00
jne 0x1405119de
cmp ecx, 2
jl 0x1405119de
add ecx, 0xfffffffe
movzx r8d, word [rdi + rcx*2]
and r8d, 0xfc00
cmp r8d, 0xd800
cmove r9d, ecx
mov r8, r9
mov ecx, r9d
lea r10, [r8 + 1]
cmp r10, rdx
cmovle r10, rdx
sub r10, r8
cmp r10, 0x10
jae 0x140511a00
mov r9, rbx
jmp 0x140511a70
lea r9, [rdi + r8*2]
mov r11, rbx
sub r11, r9
cmp r11, 0x20
jae 0x140511a20
mov r9, rbx
jmp 0x140511a70
lea r11, [r8 + r8]
add r11, rax
mov rsi, r10
and rsi, 0xfffffffffffffff0
add r8, rsi
lea r9, [rbx + rsi*2]
xor r14d, r14d
nop dword [rax + rax]
movdqu xmm0, xmmword [r11 + r14*2 - 0x10]
movdqu xmm1, xmmword [r11 + r14*2]
movdqu xmmword [rbx + r14*2], xmm0
movdqu xmmword [rbx + r14*2 + 0x10], xmm1
add r14, 0x10
cmp rsi, r14
jne 0x140511a40
cmp r10, rsi
je 0x140511990
nop dword [rax]
movzx r10d, word [rdi + r8*2]
inc r8
mov word [r9], r10w
add r9, 2
cmp r8, rdx
jl 0x140511a70
jmp 0x140511990
cmp r9d, ebp
jl 0x14051206f
lea rsi, [rdi + 0x10]
mov r14d, 0x1c0
mov r15d, ebp
jmp 0x140511abb
mov rbx, r8
test al, al
je 0x14051207d
mov r12d, r15d
jmp 0x140511ad1
mov r15d, eax
call fcn.1404c8a00
movzx eax, al
bt r14d, eax
jae 0x140511b40
lea eax, [r15 - 1]
movsxd rcx, r15d
movzx ecx, word [rdi + rcx*2 - 2]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x140511b30
cmp r15d, 2
jl 0x140511b30
add r15d, 0xfffffffe
movzx edx, word [rdi + r15*2]
mov r8d, edx
and r8d, 0xfc00
cmp r8d, 0xd800
jne 0x140511ac0
shl edx, 0xa
add ecx, edx
add ecx, 0xfca02400
test r15d, r15d
jg 0x140511ac3
jmp 0x140511b38
mov r15d, eax
test r15d, r15d
jg 0x140511ac3
xor eax, eax
jmp 0x140511b42
mov al, 1
movsxd rcx, r15d
movsxd rdx, r12d
lea r9, [rcx + 1]
cmp r9, rdx
cmovle r9, rdx
sub r9, rcx
cmp r9, 0x10
jae 0x140511b70
mov r8, rbx
jmp 0x140511be0
lea r8, [rdi + rcx*2]
mov r10, rbx
sub r10, r8
cmp r10, 0x20
jae 0x140511b90
mov r8, rbx
jmp 0x140511be0
lea r10, [rcx + rcx]
add r10, rsi
mov r11, r9
and r11, 0xfffffffffffffff0
add rcx, r11
lea r8, [rbx + r11*2]
xor r12d, r12d
nop dword [rax + rax]
movdqu xmm0, xmmword [r10 + r12*2 - 0x10]
movdqu xmm1, xmmword [r10 + r12*2]
movdqu xmmword [rbx + r12*2], xmm0
movdqu xmmword [rbx + r12*2 + 0x10], xmm1
add r12, 0x10
cmp r11, r12
jne 0x140511bb0
cmp r9, r11
je 0x140511ab0
nop dword [rax]
movzx r9d, word [rdi + rcx*2]
inc rcx
mov word [r8], r9w
add r8, 2
cmp rcx, rdx
jl 0x140511be0
jmp 0x140511ab0
test byte [rsp + 0x24], 8
jne 0x140511ea1
mov r15d, ebp
cmp r15d, r9d
jg 0x14051206c
lea rax, [rdi + 0x10]
mov qword [rsp + 0x28], rax
mov r13d, 0x1c0
jmp 0x140511c3e
mov rcx, rbx
mov rbx, rcx
test ebp, ebp
jle 0x140511ec1
mov esi, ebp
lea eax, [rsi - 1]
movsxd r12, ebp
movzx r14d, word [rdi + r12*2 - 2]
mov ecx, r14d
and ecx, 0xfc00
cmp ecx, 0xdc00
jne 0x140511c90
cmp esi, 2
jl 0x140511c90
lea ebp, [rsi - 2]
movzx ecx, word [rdi + rbp*2]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xd800
jne 0x140511c90
shl ecx, 0xa
add r14d, ecx
add r14d, 0xfca02400
test byte [rsp + 0x24], 1
jne 0x140511c99
jmp 0x140511d02
mov ebp, eax
test byte [rsp + 0x24], 1
je 0x140511d02
test ebp, ebp
jg 0x140511ca6
jmp 0x140511d02
mov ebp, eax
test ebp, ebp
jle 0x140511d00
mov ecx, r14d
call fcn.1404c8a00
movzx eax, al
bt r13d, eax
jae 0x140511d02
lea eax, [rbp - 1]
movzx r14d, word [rdi + rax*2]
mov ecx, r14d
and ecx, 0xfc00
cmp ecx, 0xdc00
jne 0x140511ca0
cmp ebp, 2
jl 0x140511d00
add ebp, 0xfffffffe
movzx ecx, word [rdi + rbp*2]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xd800
jne 0x140511ca0
shl ecx, 0xa
add r14d, ecx
add r14d, 0xfca02400
test ebp, ebp
jg 0x140511ca6
nop dword [rax]
xor ebp, ebp
test byte [rsp + 0x24], 8
je 0x140511d3a
mov eax, r14d
and eax, 0xfffffffc
cmp eax, 0x200c
je 0x140511c30
lea eax, [r14 - 0x202a]
cmp eax, 5
jb 0x140511c30
lea eax, [r14 - 0x2066]
cmp eax, 4
jb 0x140511c30
test byte [rsp + 0x24], 2
jne 0x140511d50
mov ecx, ebp
cmp ecx, esi
jge 0x140511c30
jmp 0x140511d99
mov ecx, r14d
call fcn.140508580
cmp eax, 0xffff
ja 0x140511d66
mov ecx, 1
jmp 0x140511d86
mov edx, eax
shr edx, 0xa
add edx, 0xffffd7c0
and eax, 0x3ff
or eax, 0xdc00
mov word [rbx + 2], ax
mov ecx, 2
mov eax, edx
mov word [rbx], ax
mov eax, ecx
lea rbx, [rbx + rax*2]
add ecx, ebp
cmp ecx, esi
jge 0x140511c30
movsxd rax, ecx
mov rdx, r12
sub rdx, rax
cmp rdx, 0x10
jb 0x140511dbc
lea rcx, [rdi + rax*2]
mov r8, rbx
sub r8, rcx
cmp r8, 0x20
jae 0x140511e48
mov rcx, rbx
sub esi, eax
mov rdx, rax
not rdx
add rdx, r12
and rsi, 7
je 0x140511de5
movzx r8d, word [rdi + rax*2]
inc rax
mov word [rcx], r8w
add rcx, 2
dec rsi
jne 0x140511dd0
cmp rdx, 7
jb 0x140511c33
nop
movzx edx, word [rdi + rax*2]
mov word [rcx], dx
movzx edx, word [rdi + rax*2 + 2]
mov word [rcx + 2], dx
movzx edx, word [rdi + rax*2 + 4]
mov word [rcx + 4], dx
movzx edx, word [rdi + rax*2 + 6]
mov word [rcx + 6], dx
movzx edx, word [rdi + rax*2 + 8]
mov word [rcx + 8], dx
movzx edx, word [rdi + rax*2 + 0xa]
mov word [rcx + 0xa], dx
movzx edx, word [rdi + rax*2 + 0xc]
mov word [rcx + 0xc], dx
movzx edx, word [rdi + rax*2 + 0xe]
add rax, 8
mov word [rcx + 0xe], dx
add rcx, 0x10
cmp r12, rax
jne 0x140511df0
jmp 0x140511c33
lea r8, [rax + rax]
add r8, qword [rsp + 0x28]
mov r9, rdx
and r9, 0xfffffffffffffff0
add rax, r9
lea rcx, [rbx + r9*2]
xor r10d, r10d
nop word cs:[rax + rax]
movdqu xmm0, xmmword [r8 + r10*2 - 0x10]
movdqu xmm1, xmmword [r8 + r10*2]
movdqu xmmword [rbx + r10*2], xmm0
movdqu xmmword [rbx + r10*2 + 0x10], xmm1
add r10, 0x10
cmp r9, r10
jne 0x140511e70
cmp rdx, r9
je 0x140511c33
jmp 0x140511dbf
test ebp, ebp
mov eax, 1
cmovle eax, ebp
mov edx, ebp
sub edx, eax
xor r15d, r15d
cmp edx, 7
jae 0x140511ec9
mov rax, rdi
mov ecx, ebp
jmp 0x14051200b
mov ebp, r15d
jmp 0x14051207d
inc rdx
mov r8, rdx
and r8, 0xfffffffffffffff8
lea rax, [rdi + r8*2]
mov ecx, ebp
sub ecx, r8d
pxor xmm0, xmm0
xor r10d, r10d
movdqa xmm1, xmmword [0x140644f70]
movdqa xmm2, xmmword [0x140644f80]
movdqa xmm3, xmmword [0x14066a510]
movdqa xmm4, xmmword [0x140599730]
movdqa xmm6, xmmword [0x14066a520]
movdqa xmm7, xmmword [0x14066a530]
movdqa xmm9, xmmword [0x14066a540]
pxor xmm8, xmm8
pxor xmm5, xmm5
nop word cs:[rax + rax]
movq xmm11, qword [rdi + r10*2]
movq xmm10, qword [rdi + r10*2 + 8]
punpcklwd xmm11, xmm0
punpcklwd xmm10, xmm0
movdqa xmm12, xmm11
pand xmm12, xmm1
pcmpeqd xmm12, xmm2
movdqa xmm13, xmm11
paddd xmm13, xmm3
pxor xmm13, xmm4
movdqa xmm14, xmm6
pcmpgtd xmm14, xmm13
movdqa xmm13, xmm10
paddd xmm13, xmm3
pandn xmm12, xmm14
pxor xmm13, xmm4
movdqa xmm14, xmm6
pcmpgtd xmm14, xmm13
movdqa xmm13, xmm10
pand xmm13, xmm1
pcmpeqd xmm13, xmm2
pandn xmm13, xmm14
paddd xmm11, xmm7
pxor xmm11, xmm4
movdqa xmm14, xmm9
pcmpgtd xmm14, xmm11
pand xmm14, xmm12
paddd xmm10, xmm7
psubd xmm8, xmm14
pxor xmm10, xmm4
movdqa xmm11, xmm9
pcmpgtd xmm11, xmm10
pand xmm11, xmm13
psubd xmm5, xmm11
add r10, 8
cmp r8, r10
jne 0x140511f30
paddd xmm5, xmm8
pshufd xmm0, xmm5, 0xee
paddd xmm0, xmm5
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd r15d, xmm1
cmp rdx, r8
je 0x140512057
inc ecx
nop dword [rax]
movzx edx, word [rax]
add rax, 2
mov r8d, edx
and r8d, 0xfffffffc
cmp r8d, 0x200c
setne r8b
lea r10d, [rdx - 0x202f]
cmp r10d, 0xfffffffb
setb r10b
and r10b, r8b
add edx, 0xffffdf96
cmp edx, 0xfffffffc
setb dl
and dl, r10b
movzx edx, dl
add r15d, edx
dec ecx
cmp ecx, 1
jg 0x140512010
movsxd rcx, ebp
add rcx, rcx
sub rax, rcx
mov rdi, rax
cmp r15d, r9d
jle 0x140511c11
mov ebp, r15d
mov rax, qword [rsp + 0x138]
mov dword [rax], 0xf
mov eax, ebp
movaps xmm6, xmmword [rsp + 0x30]
movaps xmm7, xmmword [rsp + 0x40]
movaps xmm8, xmmword [rsp + 0x50]
movaps xmm9, xmmword [rsp + 0x60]
movaps xmm10, xmmword [rsp + 0x70]
movaps xmm11, xmmword [rsp + 0x80]
movaps xmm12, xmmword [rsp + 0x90]
movaps xmm13, xmmword [rsp + 0xa0]
movaps xmm14, xmmword [rsp + 0xb0]
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret