Function at 0x140004770
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
movdqa xmmword [rbp - 0x10], xmm6
mov rdi, rdx
mov rax, qword [rcx]
mov rdx, qword [rcx + 0x10]
mov r9, rax
or r9, rdx
je 0x140004da0
test rdx, rdx
je 0x1400048bf
mov r9, qword [rcx + 0x18]
lea rsi, [rdi + r8]
xor edx, edx
test r9, r9
je 0x140004851
xor r10d, r10d
mov r11, rdi
jmp 0x1400047e5
lea rbx, [r11 + 1]
inc r10
sub rdx, r11
add rdx, rbx
mov r11, rbx
cmp r9, r10
je 0x140004854
cmp r11, rsi
je 0x1400048bf
movzx ebx, byte [r11]
test bl, bl
jns 0x1400047d0
cmp bl, 0xe0
jb 0x140004845
cmp bl, 0xf0
jb 0x14000484b
movzx r14d, byte [r11 + 1]
and r14d, 0x3f
movzx r15d, byte [r11 + 2]
and r15d, 0x3f
movzx r12d, byte [r11 + 3]
and ebx, 7
shl ebx, 0x12
shl r14d, 0xc
shl r15d, 6
or r15d, r14d
and r12d, 0x3f
or r12d, r15d
or r12d, ebx
cmp r12d, 0x110000
je 0x1400048bf
lea rbx, [r11 + 4]
jmp 0x1400047d4
lea rbx, [r11 + 2]
jmp 0x1400047d4
lea rbx, [r11 + 3]
jmp 0x1400047d4
mov rbx, rdi
cmp rbx, rsi
je 0x1400048bf
movzx esi, byte [rbx]
test sil, sil
jns 0x1400048a8
cmp sil, 0xe0
jb 0x1400048a8
cmp sil, 0xf0
jb 0x1400048a8
movzx r9d, byte [rbx + 1]
and r9d, 0x3f
movzx r10d, byte [rbx + 2]
and r10d, 0x3f
movzx r11d, byte [rbx + 3]
and esi, 7
shl esi, 0x12
shl r9d, 0xc
shl r10d, 6
or r10d, r9d
and r11d, 0x3f
or r11d, r10d
or r11d, esi
cmp r11d, 0x110000
je 0x1400048bf
test rdx, rdx
je 0x1400048bc
cmp rdx, r8
jae 0x1400048ba
cmp byte [rdi + rdx], 0xc0
jge 0x1400048bc
jmp 0x1400048bf
jne 0x1400048bf
mov r8, rdx
test rax, rax
je 0x140004da0
mov rbx, qword [rcx + 8]
cmp r8, 0x20
jae 0x1400048ed
mov rdx, r8
test r8, r8
je 0x140004d7c
cmp r8, 1
jne 0x140004925
xor edx, edx
xor eax, eax
jmp 0x140004d66
lea r14, [rdi + 7]
and r14, 0xfffffffffffffff8
mov rdx, r14
sub rdx, rdi
mov rax, r8
sub rax, rdx
mov edx, eax
and edx, 7
mov r9, r14
sub r9, rdi
jne 0x140004915
xor esi, esi
jmp 0x140004a17
cmp r9, 4
jae 0x140004990
xor esi, esi
xor r10d, r10d
jmp 0x140004a00
mov eax, r8d
and eax, 0x1e
pxor xmm0, xmm0
xor edx, edx
movdqa xmm1, xmmword [0x140007130]
movdqa xmm2, xmmword [0x140007140]
nop word cs:[rax + rax]
movzx r9d, word [rdi + rdx]
movd xmm3, r9d
pcmpgtb xmm3, xmm1
punpcklbw xmm3, xmm3
pshuflw xmm3, xmm3, 0xd4
pshufd xmm3, xmm3, 0xd4
pand xmm3, xmm2
paddq xmm0, xmm3
add rdx, 2
cmp rax, rdx
jne 0x140004950
pshufd xmm1, xmm0, 0xee
paddq xmm1, xmm0
movq rdx, xmm1
jmp 0x140004d77
movzx r10d, word [rdi + 2]
movd xmm0, r10d
movdqa xmm1, xmmword [0x140007130]
pcmpgtb xmm0, xmm1
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0xd4
pshufd xmm0, xmm0, 0xd4
movdqa xmm2, xmmword [0x140007140]
pand xmm0, xmm2
movzx r10d, word [rdi]
movd xmm3, r10d
pcmpgtb xmm3, xmm1
punpcklbw xmm3, xmm3
pshuflw xmm1, xmm3, 0xd4
pshufd xmm1, xmm1, 0xd4
pand xmm1, xmm2
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rsi, xmm0
mov r10d, 4
je 0x140004a17
nop dword [rax]
xor r11d, r11d
cmp byte [rdi + r10], 0xc0
setge r11b
add rsi, r11
inc r10
cmp r9, r10
jne 0x140004a00
test rdx, rdx
mov qword [rbp - 0x20], rbx
mov qword [rbp - 0x18], r8
je 0x140004ab9
mov r9, rax
and r9, 0xfffffffffffffff8
xor r10d, r10d
cmp byte [r14 + r9], 0xc0
setge r10b
cmp edx, 1
je 0x140004abc
xor r11d, r11d
cmp byte [r14 + r9 + 1], 0xc0
setge r11b
add r10, r11
cmp edx, 2
je 0x140004abc
xor r11d, r11d
cmp byte [r14 + r9 + 2], 0xc0
setge r11b
add r10, r11
cmp edx, 3
je 0x140004abc
xor r11d, r11d
cmp byte [r14 + r9 + 3], 0xc0
setge r11b
add r10, r11
cmp edx, 4
je 0x140004abc
xor r11d, r11d
cmp byte [r14 + r9 + 4], 0xc0
setge r11b
add r10, r11
cmp edx, 5
je 0x140004abc
xor r11d, r11d
cmp byte [r14 + r9 + 5], 0xc0
setge r11b
add r10, r11
cmp edx, 6
je 0x140004abc
xor edx, edx
cmp byte [r14 + r9 + 6], 0xc0
setge dl
add r10, rdx
jmp 0x140004abc
xor r10d, r10d
add r10, rsi
shr rax, 3
movabs r9, 0xff00ff00ff00ff
movabs rsi, 0x1000100010001
pcmpeqd xmm0, xmm0
movdqa xmm1, xmmword [0x140007150]
jmp 0x140004b28
xor r10d, r10d
mov r8d, ebx
lea r14, [r11 + r8*8]
sub rax, rbx
mov r8d, ebx
and r8d, 3
mov r15, r10
and r15, r9
shr r10, 8
and r10, r9
add r10, r15
imul r10, rsi
shr r10, 0x30
add r10, rdx
test r8, r8
jne 0x140004cd3
mov rdx, r10
test rax, rax
je 0x140004d5c
mov r11, r14
cmp rax, 0xc0
mov ebx, 0xc0
cmovb rbx, rax
cmp rax, 4
jb 0x140004af0
mov r14d, ebx
shr r14d, 2
movabs r8, 0x7ffffffffffffff
lea r15, [r14 + r8]
and r15, r8
je 0x140004c61
inc r15
mov r12, r15
and r12, 0xfffffffffffffffe
mov r13, r12
shl r13, 5
pxor xmm4, xmm4
mov r10, r11
mov r8, r12
nop word cs:[rax + rax]
movdqu xmm2, xmmword [r10]
movdqu xmm5, xmmword [r10 + 0x20]
movdqa xmm3, xmm2
punpcklqdq xmm3, xmm5
movdqa xmm6, xmm3
pxor xmm6, xmm0
psrlq xmm6, 7
psrlq xmm3, 6
por xmm3, xmm6
pand xmm3, xmm1
paddq xmm3, xmm4
movdqu xmm4, xmmword [r10 + 0x10]
movdqu xmm6, xmmword [r10 + 0x30]
punpckhqdq xmm2, xmm5
movdqa xmm5, xmm4
punpcklqdq xmm5, xmm6
punpckhqdq xmm4, xmm6
movdqa xmm6, xmm2
pxor xmm6, xmm0
psrlq xmm6, 7
psrlq xmm2, 6
por xmm2, xmm6
pand xmm2, xmm1
movdqa xmm6, xmm5
pxor xmm6, xmm0
psrlq xmm6, 7
psrlq xmm5, 6
por xmm5, xmm6
pand xmm5, xmm1
paddq xmm5, xmm2
paddq xmm5, xmm3
movdqa xmm2, xmm4
pxor xmm2, xmm0
psrlq xmm2, 7
psrlq xmm4, 6
por xmm4, xmm2
pand xmm4, xmm1
paddq xmm4, xmm5
add r10, 0x40
add r8, 0xfffffffffffffffe
jne 0x140004b90
pshufd xmm2, xmm4, 0xee
paddq xmm2, xmm4
movq r10, xmm2
cmp r15, r12
je 0x140004af3
add r13, r11
jmp 0x140004c67
xor r10d, r10d
mov r13, r11
shl r14d, 5
add r14, r11
nop
movdqu xmm2, xmmword [r13]
movdqu xmm3, xmmword [r13 + 0x10]
movdqa xmm4, xmm2
pxor xmm4, xmm0
movdqa xmm5, xmm3
pxor xmm5, xmm0
psrlq xmm5, 7
psrlq xmm4, 7
psrlq xmm3, 6
por xmm3, xmm5
psrlq xmm2, 6
por xmm2, xmm4
pand xmm3, xmm1
pand xmm2, xmm1
paddq xmm2, xmm3
pshufd xmm3, xmm2, 0xee
paddq xmm3, xmm2
movq r8, xmm3
add r10, r8
add r13, 0x20
cmp r13, r14
jne 0x140004c70
jmp 0x140004af3
movabs rax, 0x101010101010101
and ebx, 0xfc
mov edx, ebx
mov rdx, qword [r11 + rdx*8]
mov r14, rdx
not r14
shr r14, 7
shr rdx, 6
or rdx, r14
and rdx, rax
cmp r8d, 1
je 0x140004d41
mov r14, qword [r11 + rbx*8 + 8]
mov r15, r14
not r15
shr r15, 7
shr r14, 6
or r14, r15
and r14, rax
add rdx, r14
cmp r8d, 2
je 0x140004d41
mov r8, qword [r11 + rbx*8 + 0x10]
mov r11, r8
not r11
shr r11, 7
shr r8, 6
or r8, r11
and r8, rax
add rdx, r8
mov rax, rdx
and rax, r9
shr rdx, 8
and rdx, r9
add rdx, rax
imul rdx, rsi
shr rdx, 0x30
add rdx, r10
mov rbx, qword [rbp - 0x20]
mov r8, qword [rbp - 0x18]
jmp 0x140004d7c
xor r9d, r9d
cmp byte [rdi + rax], 0xc0
setge r9b
add rdx, r9
inc rax
cmp r8, rax
jne 0x140004d66
sub rbx, rdx
jbe 0x140004da0
mov rsi, r8
movzx eax, byte [rcx + 0x38]
lea rdx, [0x140007160]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov r13, rbx
xor r12d, r12d
jmp 0x140004de0
mov rax, qword [rcx + 0x20]
mov rcx, qword [rcx + 0x28]
mov r9, qword [rcx + 0x18]
mov rcx, rax
mov rdx, rdi
movaps xmm6, xmmword [rbp - 0x10]
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp r9
mov r12, rbx
xor r13d, r13d
jmp 0x140004de0
mov r12, rbx
shr r12, 1
inc rbx
shr rbx, 1
mov r13, rbx
mov rbx, qword [rcx + 0x20]
mov r15, qword [rcx + 0x28]
mov r14d, dword [rcx + 0x30]
inc r12
nop
mov rcx, rbx
dec r12
je 0x140004e07
mov edx, r14d
call qword [r15 + 0x20]
test al, al
je 0x140004df0
mov al, 1
jmp 0x140004e56
mov rdx, rdi
mov r8, rsi
call qword [r15 + 0x18]
mov ecx, eax
mov al, 1
test cl, cl
jne 0x140004e56
mov rdi, r13
neg rdi
mov rsi, 0xffffffffffffffff
nop word cs:[rax + rax]
lea rax, [rdi + rsi]
cmp rax, 0xffffffffffffffff
je 0x140004e4d
mov rcx, rbx
mov edx, r14d
call qword [r15 + 0x20]
inc rsi
test al, al
je 0x140004e30
jmp 0x140004e50
mov rsi, r13
cmp rsi, r13
setb al
movaps xmm6, xmmword [rbp - 0x10]
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret