Function at 0x14005d150
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
test r8b, 3
je 0x14005d188
mov byte [rcx + 8], 0
mov qword [rcx], 0
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r14, rdx
cmp r8, 2
jb 0x14005d206
mov r11, r9
movzx edx, byte [r8 + r14 - 1]
movzx eax, byte [r8 + r14 - 2]
mov r9d, 0x3c
mov r10d, 0x3c
sub r10d, eax
add eax, 0x1c2
and eax, r10d
sub r9d, edx
add edx, 0x1c2
and edx, r9d
mov r10d, edx
shr r10d, 8
and r10d, 1
bt eax, 8
mov r9d, r10d
adc r9w, 0
movzx r9d, r9w
mov rsi, r8
sub rsi, r9
test r9w, r9w
je 0x14005d20d
cmp r9d, 2
je 0x14005d211
cmp r9d, 1
jne 0x14005d169
mov r9, r11
movzx ebp, r10w
xor ebp, 1
jmp 0x14005d227
xor ebp, ebp
mov rsi, r8
jmp 0x14005d227
xor ebp, ebp
jmp 0x14005d224
movzx edx, dx
movzx eax, ax
and eax, edx
xor ebp, ebp
test eax, 0x100
sete bpl
mov r9, r11
mov rax, rsi
shr rax, 2
mov edx, esi
and edx, 3
lea rax, [rax + rax*2]
lea r10d, [rdx + rdx*2]
shr r10d, 2
add r10, rax
cmp r10, qword [rsp + 0xf0]
jbe 0x14005d255
mov byte [rcx + 8], 1
jmp 0x14005d16d
mov qword [rsp + 0x78], rdx
and rsi, 0xfffffffffffffffc
movabs rdx, 0xaaaaaaaaaaaaaaab
mov rax, r10
mul rdx
mov rax, rdx
lea rdx, [r14 + rsi]
mov qword [rsp + 0x60], rdx
shr rax, 1
lea rdx, [rax + rax*2]
mov rax, r10
sub rax, rdx
lea r11, [r9 + rdx]
test rsi, rsi
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x40], r9
mov qword [rsp + 0x50], r10
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x68], r11
je 0x14005d59c
xor r8d, r8d
mov qword [rsp + 0x80], rsi
nop dword [rax]
sub rdx, 3
jb 0x14005d59c
movzx r10d, byte [r14 + r8]
mov r11d, 0x2a
sub r11d, r10d
lea edi, [r10 + 0x3fd4]
and edi, r11d
shr edi, 8
and edi, 0x3f
lea r11d, [r10 - 0x3a]
mov esi, 0x2f
sub esi, r10d
and esi, r11d
movsx r11d, si
shr r11d, 8
lea esi, [r10 + 5]
and esi, r11d
add esi, edi
lea r11d, [r10 - 0x7b]
mov edi, 0x60
sub edi, r10d
and edi, r11d
movsx r11d, di
sar r11d, 8
lea edi, [r10 - 0x46]
and edi, r11d
lea r11d, [r10 - 0x5b]
mov ebx, 0x40
sub ebx, r10d
and ebx, r11d
movsx ebx, bx
sar ebx, 8
lea r11d, [r10 - 0x40]
and r11d, ebx
add r11d, edi
add r11d, esi
movzx ebx, byte [r14 + r8 + 1]
mov esi, 0x2e
sub esi, ebx
lea r15d, [rbx + 0x7fd0]
and r15d, esi
shr r15d, 8
and r15d, 0x40
mov esi, 0x2a
sub esi, ebx
lea r12d, [rbx + 0x3fd4]
and r12d, esi
shr r12d, 8
and r12d, 0x3f
lea esi, [rbx - 0x3a]
mov edi, 0x2f
sub edi, ebx
and edi, esi
movsx edi, di
shr edi, 8
lea esi, [rbx + 5]
and esi, edi
lea edi, [rbx - 0x7b]
mov r13d, 0x60
sub r13d, ebx
and r13d, edi
movsx edi, r13w
sar edi, 8
lea r13d, [rbx - 0x46]
and r13d, edi
lea edi, [rbx - 0x5b]
mov ecx, 0x40
sub ecx, ebx
and ecx, edi
movsx ecx, cx
sar ecx, 8
add ebx, 0xffffffc0
and ebx, ecx
add ebx, r13d
add ebx, esi
lea esi, [r12 + rbx]
dec esi
add ebx, r12d
mov r13, rdx
lea edx, [r15 + rbx]
dec edx
mov dword [rsp + 0x34], edx
movzx ebx, byte [r14 + r8 + 2]
mov ecx, 0x2e
sub ecx, ebx
lea r15d, [rbx + 0x7fd0]
and r15d, ecx
mov ecx, 0x2a
sub ecx, ebx
lea edi, [rbx + 0x3fd4]
and edi, ecx
lea ecx, [rbx - 0x3a]
mov r12d, 0x2f
sub r12d, ebx
and r12d, ecx
movsx ecx, r12w
shr ecx, 8
lea r12d, [rbx + 5]
and r12d, ecx
lea ecx, [rbx - 0x7b]
mov rax, r14
mov r14d, 0x60
sub r14d, ebx
and r14d, ecx
movsx ecx, r14w
sar ecx, 8
lea r14d, [rbx - 0x46]
and r14d, ecx
lea ecx, [rbx - 0x5b]
mov dword [rsp + 0x38], ebp
mov ebp, 0x40
sub ebp, ebx
and ebp, ecx
movsx ecx, bp
sar ecx, 8
add ebx, 0xffffffc0
and ebx, ecx
movzx ecx, dx
mov rdx, r13
shr r15d, 8
and r15d, 0x40
shr edi, 8
and edi, 0x3f
add ebx, r14d
mov r14, rax
add ebx, r12d
lea r12d, [rdi + rbx]
dec r12d
add ebx, edi
add ebx, r15d
dec ebx
movzx edi, bx
movzx r15d, byte [rax + r8 + 3]
lea ebp, [r11*4 - 4]
shr ecx, 4
or ecx, ebp
mov byte [r9], cl
shl esi, 4
shr edi, 2
or edi, esi
mov byte [r9 + 1], dil
mov ecx, 0x2e
sub ecx, r10d
add r10d, 0x7fd0
and r10d, ecx
shr r10d, 8
and r10d, 0x40
add r10d, r11d
dec r10d
mov ecx, 0x2e
sub ecx, r15d
lea r11d, [r15 + 0x7fd0]
and r11d, ecx
mov ecx, 0x2a
sub ecx, r15d
lea edi, [r15 + 0x3fd4]
and edi, ecx
shr edi, 8
and edi, 0x3f
lea ecx, [r15 - 0x3a]
mov esi, 0x2f
sub esi, r15d
and esi, ecx
movsx ecx, si
shr ecx, 8
lea esi, [r15 + 5]
and esi, ecx
add esi, edi
lea ecx, [r15 - 0x7b]
mov edi, 0x60
sub edi, r15d
and edi, ecx
movsx ecx, di
sar ecx, 8
lea edi, [r15 - 0x46]
and edi, ecx
lea ecx, [r15 - 0x5b]
mov ebp, 0x40
sub ebp, r15d
and ebp, ecx
movsx ecx, bp
mov ebp, dword [rsp + 0x38]
sar ecx, 8
add r15d, 0xffffffc0
and r15d, ecx
add r15d, edi
add r15d, esi
mov rsi, qword [rsp + 0x80]
shr r11d, 8
and r11d, 0x40
lea ecx, [r11 + r15]
dec ecx
shl r12d, 6
or r12d, ecx
mov byte [r9 + 2], r12b
or r10d, dword [rsp + 0x34]
or ebx, ecx
or ebx, r10d
shr ebx, 8
and ebx, 1
or ebp, ebx
add r8, 4
add r9, 3
cmp rsi, r8
jne 0x14005d2c0
mov dword [rsp + 0x2c], 0x41414141
lea rcx, [rsp + 0x2c]
mov rdx, qword [rsp + 0x60]
mov r12, qword [rsp + 0x78]
mov r8, r12
call sub.VCRUNTIME140.dll_memcpy
movzx eax, byte [rsp + 0x2c]
mov ecx, 0x2a
sub ecx, eax
lea r8d, [rax + 0x3fd4]
and r8d, ecx
shr r8d, 8
and r8d, 0x3f
lea ecx, [rax - 0x3a]
mov r9d, 0x2f
sub r9d, eax
and r9d, ecx
shr r9d, 8
lea edx, [rax + 5]
and edx, r9d
add edx, r8d
lea ecx, [rax - 0x7b]
mov r8d, 0x60
sub r8d, eax
and r8d, ecx
sar r8d, 8
lea r9d, [rax - 0x46]
and r9d, r8d
lea ecx, [rax - 0x5b]
mov r8d, 0x40
sub r8d, eax
and r8d, ecx
sar r8d, 8
lea ecx, [rax - 0x40]
and ecx, r8d
add ecx, r9d
add ecx, edx
movzx edx, byte [rsp + 0x2d]
mov r9d, 0x2e
sub r9d, edx
lea r8d, [rdx + 0x7fd0]
and r8d, r9d
shr r8d, 8
and r8d, 0x40
mov r9d, 0x2a
sub r9d, edx
lea r10d, [rdx + 0x3fd4]
and r10d, r9d
shr r10d, 8
and r10d, 0x3f
lea r9d, [rdx - 0x3a]
mov r11d, 0x2f
sub r11d, edx
and r11d, r9d
shr r11d, 8
lea r9d, [rdx + 5]
and r9d, r11d
lea r11d, [rdx - 0x7b]
mov esi, 0x60
sub esi, edx
and esi, r11d
sar esi, 8
lea r11d, [rdx - 0x46]
and r11d, esi
lea esi, [rdx - 0x5b]
mov edi, 0x40
sub edi, edx
and edi, esi
sar edi, 8
add edx, 0xffffffc0
and edx, edi
add edx, r11d
add edx, r9d
lea r9d, [r10 + rdx]
dec r9d
add edx, r10d
add edx, r8d
dec edx
movzx r11d, byte [rsp + 0x2e]
mov r8d, 0x2e
sub r8d, r11d
lea esi, [r11 + 0x7fd0]
and esi, r8d
mov r8d, 0x2a
sub r8d, r11d
lea r15d, [r11 + 0x3fd4]
and r15d, r8d
lea r8d, [r11 - 0x3a]
mov r10d, 0x2f
sub r10d, r11d
and r10d, r8d
shr r10d, 8
lea r8d, [r11 + 5]
and r8d, r10d
lea r10d, [r11 - 0x7b]
mov edi, 0x60
sub edi, r11d
and edi, r10d
sar edi, 8
lea r10d, [r11 - 0x46]
and r10d, edi
lea edi, [r11 - 0x5b]
mov ebx, 0x40
sub ebx, r11d
and ebx, edi
mov edi, 0x2a
sar ebx, 8
add r11d, 0xffffffc0
and r11d, ebx
mov ebx, 0x2f
add r11d, r10d
mov r10d, 0x60
shr r15d, 8
and r15d, 0x3f
add r11d, r8d
lea r8d, [r15 + r11]
dec r8d
add r11d, r15d
movzx r15d, dx
shr esi, 8
and esi, 0x40
lea r13d, [rsi + r11]
dec r13d
lea r11d, [rcx*4 - 4]
shr r15d, 4
or r15d, r11d
movzx esi, r13w
mov byte [rsp + 0x31], r15b
movzx r11d, byte [rsp + 0x2f]
shl r9d, 4
shr esi, 2
or esi, r9d
mov byte [rsp + 0x32], sil
mov esi, 0x2e
sub esi, r11d
lea r9d, [r11 + 0x7fd0]
and r9d, esi
sub edi, r11d
lea r15d, [r11 + 0x3fd4]
and r15d, edi
lea esi, [r11 - 0x3a]
sub ebx, r11d
and ebx, esi
shr ebx, 8
lea esi, [r11 + 5]
and esi, ebx
mov edi, 0x40
shr r15d, 8
and r15d, 0x3f
add esi, r15d
lea ebx, [r11 - 0x7b]
sub r10d, r11d
and r10d, ebx
sar r10d, 8
lea ebx, [r11 - 0x46]
and ebx, r10d
lea r10d, [r11 - 0x5b]
sub edi, r11d
and edi, r10d
sar edi, 8
add r11d, 0xffffffc0
and r11d, edi
add r11d, ebx
add r11d, esi
shr r9d, 8
and r9d, 0x40
add r9d, r11d
dec r9d
shl r8d, 6
or r8d, r9d
mov byte [rsp + 0x33], r8b
mov r8d, 0x2e
sub r8d, eax
add eax, 0x7fd0
and eax, r8d
shr eax, 8
and eax, 0x40
add eax, ecx
dec eax
or eax, edx
or r13d, r9d
or r13d, eax
shr r13d, 8
and r13d, 1
xor eax, eax
cmp r12, 1
sete al
or ebp, eax
lea rdx, [rsp + 0x31]
mov rcx, qword [rsp + 0x68]
mov r8, qword [rsp + 0x70]
call sub.VCRUNTIME140.dll_memcpy
or bp, r13w
je 0x14005d891
mov rax, qword [rsp + 0x48]
mov byte [rax + 8], 0
mov qword [rax], 0
jmp 0x14005d174
mov rbx, qword [rsp + 0x50]
mov rax, rbx
mov rdi, qword [rsp + 0x58]
or rax, rdi
mov rsi, qword [rsp + 0x48]
je 0x14005da69
xor eax, eax
mov rcx, rdi
sub rcx, 1
cmovb rcx, rax
and rcx, 0xfffffffffffffffc
add r14, rcx
sub rdi, rcx
cmovb rdi, rax
cmovb r14, rax
mov r9, qword [rsp + 0x40]
jae 0x14005d8db
and dil, 1
jmp 0x14005da59
xor r8d, r8d
mov rax, rbx
sub rax, 1
cmovb rax, r8
movabs rcx, 0xaaaaaaaaaaaaaaab
mul rcx
shr rdx, 1
lea rcx, [rdx + rdx*2]
mov rdx, rbx
sub rdx, rcx
cmovb rdx, r8
jae 0x14005d913
and dl, 1
mov edi, edx
jmp 0x14005da59
add rcx, r9
mov dword [rsp + 0x3c], 0
lea r8, [rsp + 0x3c]
call fcn.14005da80
test rax, rax
je 0x14005d94c
cmp rdx, rdi
cmovb rdi, rdx
test rdi, rdi
je 0x14005da69
cmp rdi, 8
jae 0x14005d954
xor edx, edx
xor ecx, ecx
jmp 0x14005da3b
mov dil, 1
jmp 0x14005da59
cmp rdi, 0x20
jae 0x14005d963
xor edx, edx
xor ecx, ecx
jmp 0x14005d9e4
mov rcx, rdi
and rcx, 0xffffffffffffffe0
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
movdqu xmm2, xmmword [rax + rdx]
movdqu xmm3, xmmword [rax + rdx + 0x10]
movdqu xmm4, xmmword [r14 + rdx]
pxor xmm4, xmm2
por xmm0, xmm4
movdqu xmm2, xmmword [r14 + rdx + 0x10]
pxor xmm2, xmm3
por xmm1, xmm2
add rdx, 0x20
cmp rcx, rdx
jne 0x14005d974
por xmm1, xmm0
pshufd xmm0, xmm1, 0xee
por xmm0, xmm1
pshufd xmm1, xmm0, 0x55
por xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
por xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
por xmm1, xmm0
movd edx, xmm1
cmp rdi, rcx
je 0x14005da53
test dil, 0x18
je 0x14005da3b
mov r8, rcx
mov rcx, rdi
and rcx, 0xfffffffffffffff8
movzx edx, dl
movd xmm0, edx
mov rdx, qword [r14 + r8]
xor rdx, qword [rax + r8]
movq xmm1, rdx
por xmm0, xmm1
add r8, 8
cmp rcx, r8
jne 0x14005d9f5
pshufd xmm1, xmm0, 0x55
por xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
por xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
por xmm1, xmm0
movd edx, xmm1
cmp rdi, rcx
je 0x14005da53
movzx r8d, byte [r14 + rcx]
xor r8b, byte [rax + rcx]
lea r9, [rcx + 1]
or dl, r8b
mov rcx, r9
cmp rdi, r9
jne 0x14005da3b
test dl, dl
je 0x14005da69
xor edi, edi
mov byte [rsi + 8], dil
mov qword [rsi], 0
jmp 0x14005d174
mov rax, qword [rsp + 0x40]
mov qword [rsi], rax
mov qword [rsi + 8], rbx
jmp 0x14005d174