Function at 0x140512720
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb0
movdqa xmmword [rsp + 0xa0], xmm14
movdqa xmmword [rsp + 0x90], xmm13
movdqa xmmword [rsp + 0x80], xmm12
movdqa xmmword [rsp + 0x70], xmm11
movdqa xmmword [rsp + 0x60], xmm10
movdqa xmmword [rsp + 0x50], xmm9
movdqa xmmword [rsp + 0x40], xmm8
movdqa xmmword [rsp + 0x30], xmm7
movdqa xmmword [rsp + 0x20], xmm6
mov edi, r9d
mov r14, r8
mov ebx, edx
mov rsi, rcx
mov r12, qword [rsp + 0x118]
movzx eax, word [rsp + 0x110]
and eax, 0xa
je 0x140512811
cmp eax, 2
je 0x140512891
cmp eax, 8
jne 0x1405128a9
lea eax, [rbx + 1]
mov ecx, edi
jmp 0x1405127c6
mov r8d, ecx
lea edx, [rbx - 1]
dec eax
mov ecx, r8d
cmp ebx, 1
mov ebx, edx
jle 0x140512e02
mov rdx, rsi
add rsi, 2
movzx r9d, word [rdx]
mov r8d, r9d
and r8d, 0xfffffffc
cmp r8d, 0x200c
je 0x1405127b0
lea r8d, [r9 - 0x202a]
cmp r8d, 5
jb 0x1405127b0
lea r8d, [r9 - 0x2066]
cmp r8d, 4
jb 0x1405127b0
lea r8d, [rcx - 1]
test ecx, ecx
jle 0x140512a5f
mov word [r14], r9w
add r14, 2
jmp 0x1405127b3
cmp edi, ebx
jl 0x140512899
test ebx, ebx
mov eax, 1
cmovle eax, ebx
mov r8d, ebx
sub r8d, eax
cmp r8d, 0xf
jb 0x140512c43
mov rax, r14
sub rax, rsi
cmp rax, 0x20
jb 0x140512c43
inc r8
mov r9, r8
and r9, 0xfffffffffffffff0
lea rax, [rsi + r9*2]
mov ecx, ebx
sub ecx, r9d
lea rdx, [r14 + r9*2]
xor r10d, r10d
nop dword [rax]
movdqu xmm0, xmmword [rsi + r10*2]
movdqu xmm1, xmmword [rsi + r10*2 + 0x10]
movdqu xmmword [r14 + r10*2], xmm0
movdqu xmmword [r14 + r10*2 + 0x10], xmm1
add r10, 0x10
cmp r9, r10
jne 0x140512860
cmp r8, r9
jne 0x140512c4b
jmp 0x140512c65
cmp edi, ebx
jge 0x14051299d
mov dword [r12], 0xf
mov r15d, ebx
jmp 0x140512e08
xor r15d, r15d
mov ebp, edi
jmp 0x1405128e9
mov edx, eax
shr edx, 0xa
add edx, 0xffffd7c0
lea ecx, [r15 + 1]
movsxd r8, r15d
mov word [r14 + r8*2], dx
and eax, 0x3ff
or eax, 0xdc00
mov edx, 2
add r15d, edx
movsxd rcx, ecx
mov word [r14 + rcx*2], ax
test ebx, ebx
jle 0x140512e08
mov rdx, rsi
mov eax, ebx
movzx ecx, word [rsi]
mov r9d, ecx
and r9d, 0xfc00
mov r8d, 1
cmp r9d, 0xd800
jne 0x140512939
cmp eax, 1
je 0x140512939
movzx r9d, word [rdx + 2]
mov r10d, r9d
and r10d, 0xfc00
cmp r10d, 0xdc00
jne 0x140512939
shl ecx, 0xa
add ecx, r9d
add ecx, 0xfca02400
mov r8d, 2
mov r9d, r8d
lea rsi, [rdx + r9*2]
mov ebx, eax
sub ebx, r8d
mov r10d, ecx
and r10d, 0xfffffffc
cmp r10d, 0x200c
je 0x1405128e1
lea r10d, [rcx - 0x202a]
cmp r10d, 5
jb 0x1405128e1
lea r10d, [rcx - 0x2066]
cmp r10d, 4
jb 0x1405128e1
sub ebp, r8d
js 0x140512a8e
call fcn.140508580
cmp eax, 0xffff
ja 0x1405128b0
mov edx, 1
mov ecx, r15d
jmp 0x1405128d6
xor r15d, r15d
xor edi, edi
jmp 0x1405129e8
mov edx, eax
shr edx, 0xa
add edx, 0xffffd7c0
lea ecx, [rdi + 1]
mov r8d, edi
mov word [r14 + r8*2], dx
and eax, 0x3ff
or eax, 0xdc00
mov edx, 2
add edi, edx
movsxd rcx, ecx
mov word [r14 + rcx*2], ax
cmp r15d, ebx
jge 0x140512c65
lea eax, [r15 + 1]
movsxd rcx, r15d
movzx ecx, word [rsi + rcx*2]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xd800
jne 0x140512a40
cmp eax, ebx
je 0x140512a40
movsxd rdx, eax
movzx edx, word [rsi + rdx*2]
mov r8d, edx
and r8d, 0xfc00
cmp r8d, 0xdc00
jne 0x140512a40
add r15d, 2
shl ecx, 0xa
add ecx, edx
add ecx, 0xfca02400
jmp 0x140512a43
mov r15d, eax
call fcn.140508580
cmp eax, 0xffff
ja 0x1405129b0
mov edx, 1
mov ecx, edi
jmp 0x1405129d5
mov dword [r12], 0xf
cmp ebx, 2
jl 0x140512e02
xor ecx, ecx
mov r9d, ebx
sub r9d, 2
cmovb r9d, ecx
cmp r9d, 7
jae 0x140512c6d
mov ecx, ebx
jmp 0x140512dbb
mov dword [r12], 0xf
test ebx, ebx
jle 0x140512c3c
xor ecx, ecx
sub eax, r8d
setne cl
sub eax, ecx
cmp eax, 7
jb 0x140512bf9
inc rax
mov rcx, rax
and rcx, 0xfffffffffffffff8
lea rsi, [rsi + rcx*2]
sub ebx, ecx
movd xmm0, ebp
lea rdx, [rdx + r9*2]
add rdx, 8
pxor xmm1, xmm1
xor r8d, r8d
movdqa xmm2, xmmword [0x140644f70]
movdqa xmm3, xmmword [0x140644f80]
movdqa xmm4, xmmword [0x14066a510]
movdqa xmm5, xmmword [0x140599730]
movdqa xmm7, xmmword [0x14066a520]
movdqa xmm8, xmmword [0x14066a530]
movdqa xmm9, xmmword [0x14066a540]
pxor xmm6, xmm6
nop word cs:[rax + rax]
movq xmm11, qword [rdx + r8*2 - 8]
movq xmm10, qword [rdx + r8*2]
punpcklwd xmm11, xmm1
punpcklwd xmm10, xmm1
movdqa xmm12, xmm11
pand xmm12, xmm2
pcmpeqd xmm12, xmm3
movdqa xmm13, xmm11
paddd xmm13, xmm4
pxor xmm13, xmm5
movdqa xmm14, xmm7
pcmpgtd xmm14, xmm13
movdqa xmm13, xmm10
paddd xmm13, xmm4
pandn xmm12, xmm14
pxor xmm13, xmm5
movdqa xmm14, xmm7
pcmpgtd xmm14, xmm13
movdqa xmm13, xmm10
pand xmm13, xmm2
pcmpeqd xmm13, xmm3
pandn xmm13, xmm14
paddd xmm11, xmm8
pxor xmm11, xmm5
movdqa xmm14, xmm9
pcmpgtd xmm14, xmm11
pand xmm14, xmm12
paddd xmm10, xmm8
paddd xmm0, xmm14
pxor xmm10, xmm5
movdqa xmm11, xmm9
pcmpgtd xmm11, xmm10
pand xmm11, xmm13
paddd xmm6, xmm11
add r8, 8
cmp rcx, r8
jne 0x140512b20
paddd xmm6, xmm0
pshufd xmm0, xmm6, 0xee
paddd xmm0, xmm6
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ebp, xmm1
cmp rax, rcx
je 0x140512c3c
inc ebx
nop dword [rax + rax]
movzx eax, word [rsi]
add rsi, 2
mov ecx, eax
and ecx, 0xfffffffc
cmp ecx, 0x200c
setne cl
lea edx, [rax - 0x202f]
cmp edx, 0xfffffffb
setb dl
and dl, cl
add eax, 0xffffdf96
cmp eax, 0xfffffffc
setb al
and al, dl
movzx eax, al
sub ebp, eax
dec ebx
cmp ebx, 1
ja 0x140512c00
sub edi, ebp
jmp 0x140512e05
mov rax, rsi
mov ecx, ebx
mov rdx, r14
inc ecx
xor r8d, r8d
movzx r9d, word [rax + r8]
mov word [rdx + r8], r9w
add r8, 2
dec ecx
cmp ecx, 1
jg 0x140512c50
mov r15d, ebx
jmp 0x140512e08
inc r9d
mov r10d, r9d
and r10d, 0xfffffff8
lea rsi, [rsi + r10*2]
mov ecx, ebx
sub ecx, r10d
movd xmm0, r8d
cmp ebx, 2
mov r8d, 2
cmovb r8d, ebx
sub eax, r8d
and eax, 0xfffffff8
pxor xmm1, xmm1
xor r8d, r8d
movdqa xmm2, xmmword [0x140644f70]
movdqa xmm3, xmmword [0x140644f80]
movdqa xmm4, xmmword [0x14066a510]
movdqa xmm5, xmmword [0x140599730]
movdqa xmm7, xmmword [0x14066a520]
movdqa xmm8, xmmword [0x14066a530]
movdqa xmm9, xmmword [0x14066a540]
pxor xmm6, xmm6
nop dword [rax]
movq xmm11, qword [rdx + r8*2 + 2]
movq xmm10, qword [rdx + r8*2 + 0xa]
punpcklwd xmm11, xmm1
punpcklwd xmm10, xmm1
movdqa xmm12, xmm11
pand xmm12, xmm2
pcmpeqd xmm12, xmm3
movdqa xmm13, xmm11
paddd xmm13, xmm4
pxor xmm13, xmm5
movdqa xmm14, xmm7
pcmpgtd xmm14, xmm13
movdqa xmm13, xmm10
paddd xmm13, xmm4
pandn xmm12, xmm14
pxor xmm13, xmm5
movdqa xmm14, xmm7
pcmpgtd xmm14, xmm13
movdqa xmm13, xmm10
pand xmm13, xmm2
pcmpeqd xmm13, xmm3
pandn xmm13, xmm14
paddd xmm11, xmm8
pxor xmm11, xmm5
movdqa xmm14, xmm9
pcmpgtd xmm14, xmm11
pand xmm14, xmm12
paddd xmm10, xmm8
paddd xmm0, xmm14
pxor xmm10, xmm5
movdqa xmm11, xmm9
pcmpgtd xmm11, xmm10
pand xmm11, xmm13
paddd xmm6, xmm11
add r8, 8
cmp rax, r8
jne 0x140512ce0
paddd xmm6, xmm0
pshufd xmm0, xmm6, 0xee
paddd xmm0, xmm6
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd r8d, xmm1
cmp r10, r9
je 0x140512e02
inc ecx
nop dword [rax]
movzx eax, word [rsi]
add rsi, 2
mov edx, eax
and edx, 0xfffffffc
cmp edx, 0x200c
setne dl
lea r9d, [rax - 0x202f]
cmp r9d, 0xfffffffb
setb r9b
and r9b, dl
add eax, 0xffffdf96
cmp eax, 0xfffffffc
setb al
and al, r9b
movzx eax, al
sub r8d, eax
dec ecx
cmp ecx, 2
ja 0x140512dc0
sub edi, r8d
mov r15d, edi
mov eax, r15d
movaps xmm6, xmmword [rsp + 0x20]
movaps xmm7, xmmword [rsp + 0x30]
movaps xmm8, xmmword [rsp + 0x40]
movaps xmm9, xmmword [rsp + 0x50]
movaps xmm10, xmmword [rsp + 0x60]
movaps xmm11, xmmword [rsp + 0x70]
movaps xmm12, xmmword [rsp + 0x80]
movaps xmm13, xmmword [rsp + 0x90]
movaps xmm14, xmmword [rsp + 0xa0]
add rsp, 0xb0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret