Function at 0x140397880
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
mov eax, 0x30
call fcn.1403cb200
sub rsp, rax
mov r13, qword [rbp + 0x60]
lea edi, [r8 - 8]
mov rax, qword [rbp + 0x68]
mov r14, rcx
mov rsi, rdx
movzx r15d, byte [r13 + 1]
movzx r9d, byte [rax]
lea r10, [rax + 1]
movzx eax, byte [r10]
movzx r11d, byte [r10 + 3]
movzx ecx, byte [r10 + 6]
movzx r12d, byte [r13 + 4]
shl eax, 8
or r9d, eax
shl ecx, 8
movzx eax, byte [r10 + 1]
shl eax, 0x10
or r9d, eax
shl r15d, 8
movzx eax, byte [r10 + 2]
shl eax, 0x18
or r9d, eax
movzx eax, byte [r10 + 4]
shl eax, 8
or r11d, eax
mov dword [rbp - 0x10], r9d
movzx eax, byte [r10 + 5]
or ecx, eax
mov rax, qword [rbp + 0x70]
shl ecx, 0x10
or r11d, ecx
mov dword [rbp - 0xc], r11d
movzx r10d, byte [rax]
lea rdx, [rax + 1]
movzx eax, byte [rdx]
movzx ebx, byte [rdx + 3]
movzx ecx, byte [rdx + 6]
shl eax, 8
or r10d, eax
shl ecx, 8
movzx eax, byte [rdx + 1]
shl eax, 0x10
or r10d, eax
movzx eax, byte [rdx + 2]
shl eax, 0x18
or r10d, eax
movzx eax, byte [rdx + 4]
shl eax, 8
or ebx, eax
mov dword [rbp + 0x50], r10d
movzx eax, byte [rdx + 5]
or ecx, eax
movzx eax, byte [r13]
or r15d, eax
shl ecx, 0x10
movzx eax, byte [r13 + 2]
or ebx, ecx
movzx ecx, byte [r13 + 7]
shl eax, 0x10
or r15d, eax
shl ecx, 8
movzx eax, byte [r13 + 3]
shl eax, 0x18
or r15d, eax
mov dword [rbp + 0x68], ebx
movzx eax, byte [r13 + 5]
xor ebx, ebx
shl eax, 8
or r12d, eax
movzx eax, byte [r13 + 6]
or ecx, eax
shl ecx, 0x10
or r12d, ecx
cmp dword [rbp + 0x78], ebx
je 0x140397bd7
test edi, edi
js 0x140397ad0
mov eax, r8d
mov ebx, r9d
shr rax, 3
mov r8d, 1
mov qword [rbp + 0x70], rax
neg eax
mov r13, qword [rbp + 0x70]
lea edi, [rdi + rax*8]
mov dword [rbp + 0x78], edi
mov edi, r10d
movzx edx, byte [r14]
add r14, r8
movzx eax, byte [r14]
add r14, r8
shl eax, 8
or edx, eax
movzx eax, byte [r14]
add r14, r8
shl eax, 0x10
or edx, eax
movzx eax, byte [r14]
add r14, r8
shl eax, 0x18
or edx, eax
xor edx, r15d
movzx ecx, byte [r14]
xor edx, ebx
add r14, r8
mov dword [rbp + 0x70], edx
mov rdx, qword [rbp + 0x58]
movzx eax, byte [r14]
add r14, r8
shl eax, 8
or ecx, eax
movzx eax, byte [r14]
add r14, r8
shl eax, 0x10
or ecx, eax
movzx eax, byte [r14]
add r14, r8
shl eax, 0x18
or ecx, eax
xor ecx, r12d
xor ecx, r11d
mov dword [rbp + 0x74], ecx
lea rcx, [rbp + 0x70]
call fcn.140393310
mov r15d, dword [rbp + 0x70]
mov r8d, 1
mov r12d, dword [rbp + 0x74]
xor r15d, edi
xor r12d, dword [rbp + 0x68]
mov eax, r15d
mov r11d, dword [rbp - 0xc]
mov byte [rsi], r15b
add rsi, r8
shr eax, 8
mov byte [rsi], al
add rsi, r8
mov eax, r15d
shr eax, 0x10
mov byte [rsi], al
add rsi, r8
mov eax, r15d
shr eax, 0x18
mov byte [rsi], al
add rsi, r8
mov eax, r12d
shr eax, 8
mov byte [rsi], r12b
add rsi, r8
mov byte [rsi], al
add rsi, r8
mov eax, r12d
shr eax, 0x10
mov byte [rsi], al
add rsi, r8
mov eax, r12d
shr eax, 0x18
mov byte [rsi], al
add rsi, r8
sub r13, r8
jne 0x1403979dd
mov r13, qword [rbp + 0x60]
xor ebx, ebx
mov edi, dword [rbp + 0x78]
mov r9d, dword [rbp - 0x10]
jmp 0x140397ad6
mov r8d, 1
cmp edi, 0xfffffff8
je 0x140397dc9
lea ecx, [rdi + 8]
mov edx, ebx
movsxd rax, ecx
add r14, rax
sub ecx, 1
je 0x140397b5f
sub ecx, 1
je 0x140397b53
sub ecx, 1
je 0x140397b47
sub ecx, 1
je 0x140397b3d
sub ecx, 1
je 0x140397b34
sub ecx, 1
je 0x140397b28
sub ecx, 1
je 0x140397b1c
cmp ecx, 1
jne 0x140397b66
sub r14, r8
movzx ebx, byte [r14]
shl ebx, 0x18
sub r14, r8
movzx eax, byte [r14]
shl eax, 0x10
or ebx, eax
sub r14, r8
movzx eax, byte [r14]
shl eax, 8
or ebx, eax
sub r14, r8
movzx eax, byte [r14]
or ebx, eax
sub r14, r8
movzx edx, byte [r14]
shl edx, 0x18
sub r14, r8
movzx eax, byte [r14]
shl eax, 0x10
or edx, eax
sub r14, r8
movzx eax, byte [r14]
shl eax, 8
or edx, eax
movzx eax, byte [r14 - 1]
or edx, eax
xor edx, r15d
lea rcx, [rbp + 0x70]
xor edx, r9d
xor ebx, r12d
mov dword [rbp + 0x70], edx
xor ebx, r11d
mov rdx, qword [rbp + 0x58]
mov dword [rbp + 0x74], ebx
call fcn.140393310
mov r15d, dword [rbp + 0x70]
xor r15d, dword [rbp + 0x50]
mov r12d, dword [rbp + 0x74]
mov eax, r15d
xor r12d, dword [rbp + 0x68]
shr eax, 8
mov byte [rsi], r15b
mov byte [rsi + 1], al
mov eax, r15d
shr eax, 0x10
mov byte [rsi + 2], al
mov eax, r15d
shr eax, 0x18
mov byte [rsi + 3], al
mov eax, r12d
shr eax, 8
mov byte [rsi + 5], al
mov eax, r12d
shr eax, 0x10
mov byte [rsi + 6], al
mov eax, r12d
shr eax, 0x18
mov byte [rsi + 7], al
mov byte [rsi + 4], r12b
jmp 0x140397dc9
test edi, edi
jle 0x140397cc4
lea eax, [rdi - 1]
mov r13d, r9d
shr eax, 3
inc eax
mov ecx, eax
neg eax
mov qword [rbp - 8], rcx
lea edi, [rdi + rax*8]
mov dword [rbp + 0x78], edi
movzx eax, byte [r14 + 1]
lea rcx, [rbp + 0x70]
movzx edi, byte [r14]
xor r8d, r8d
movzx ebx, byte [r14 + 4]
mov rdx, qword [rbp + 0x58]
shl eax, 8
or edi, eax
movzx eax, byte [r14 + 2]
shl eax, 0x10
or edi, eax
movzx eax, byte [r14 + 3]
shl eax, 0x18
or edi, eax
mov eax, edi
xor eax, r10d
mov dword [rbp + 0x70], eax
movzx eax, byte [r14 + 5]
shl eax, 8
or ebx, eax
movzx eax, byte [r14 + 6]
shl eax, 0x10
or ebx, eax
movzx eax, byte [r14 + 7]
shl eax, 0x18
add r14, 8
or ebx, eax
mov eax, ebx
xor eax, dword [rbp + 0x68]
mov dword [rbp + 0x74], eax
call fcn.140393310
mov ecx, dword [rbp + 0x70]
mov edx, dword [rbp + 0x74]
xor ecx, r15d
mov r10d, dword [rbp + 0x50]
xor ecx, r13d
mov byte [rsi], cl
xor edx, r12d
xor edx, dword [rbp - 0xc]
mov eax, ecx
shr eax, 8
mov r15d, edi
mov byte [rsi + 1], al
mov r12d, ebx
mov eax, ecx
mov byte [rsi + 4], dl
shr eax, 0x10
mov byte [rsi + 2], al
mov eax, edx
shr eax, 8
mov byte [rsi + 5], al
mov eax, edx
shr eax, 0x10
shr ecx, 0x18
shr edx, 0x18
mov byte [rsi + 6], al
mov byte [rsi + 3], cl
mov byte [rsi + 7], dl
add rsi, 8
sub qword [rbp - 8], 1
jne 0x140397bf8
mov r13, qword [rbp + 0x60]
mov edi, dword [rbp + 0x78]
cmp edi, 0xfffffff8
je 0x140397dc9
movzx edx, byte [r14 + 4]
xor r8d, r8d
movzx ecx, byte [r14 + 7]
movzx eax, byte [r14 + 1]
movzx ebx, byte [r14]
shl eax, 8
or ebx, eax
shl ecx, 8
movzx eax, byte [r14 + 2]
shl eax, 0x10
or ebx, eax
movzx eax, byte [r14 + 3]
shl eax, 0x18
or ebx, eax
mov eax, ebx
xor eax, r10d
mov dword [rbp + 0x70], eax
movzx eax, byte [r14 + 5]
shl eax, 8
or edx, eax
movzx eax, byte [r14 + 6]
or ecx, eax
shl ecx, 0x10
or edx, ecx
lea rcx, [rbp + 0x70]
mov eax, edx
mov dword [rbp + 0x78], edx
xor eax, dword [rbp + 0x68]
mov rdx, qword [rbp + 0x58]
mov dword [rbp + 0x74], eax
call fcn.140393310
mov r8d, dword [rbp + 0x70]
lea ecx, [rdi + 8]
mov edx, dword [rbp + 0x74]
xor r8d, r15d
xor r8d, dword [rbp - 0x10]
xor edx, r12d
xor edx, dword [rbp - 0xc]
movsxd rax, ecx
add rsi, rax
sub ecx, 1
je 0x140397dbe
sub ecx, 1
je 0x140397db3
sub ecx, 1
je 0x140397da8
sub ecx, 1
je 0x140397d9d
sub ecx, 1
je 0x140397d98
sub ecx, 1
je 0x140397d8e
sub ecx, 1
je 0x140397d84
cmp ecx, 1
jne 0x140397dc2
dec rsi
mov eax, edx
shr eax, 0x18
mov byte [rsi], al
dec rsi
mov eax, edx
shr eax, 0x10
mov byte [rsi], al
dec rsi
mov eax, edx
shr eax, 8
mov byte [rsi], al
dec rsi
mov byte [rsi], dl
dec rsi
mov eax, r8d
shr eax, 0x18
mov byte [rsi], al
dec rsi
mov eax, r8d
shr eax, 0x10
mov byte [rsi], al
dec rsi
mov eax, r8d
shr eax, 8
mov byte [rsi], al
mov byte [rsi - 1], r8b
mov r12d, dword [rbp + 0x78]
mov r15d, ebx
mov byte [r13], r15b
mov eax, r12d
shr eax, 0x18
mov ecx, r12d
shr ecx, 0x10
mov edx, r12d
shr edx, 8
mov r8d, r15d
shr r8d, 0x18
mov r9d, r15d
shr r9d, 0x10
mov r10d, r15d
shr r10d, 8
mov byte [r13 + 1], r10b
mov byte [r13 + 2], r9b
mov byte [r13 + 3], r8b
mov byte [r13 + 4], r12b
mov byte [r13 + 5], dl
mov byte [r13 + 6], cl
mov byte [r13 + 7], al
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret