Function at 0x5f1600
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x148
mov r12d, 1
mov edi, r12d
mov ebp, dword [rsp + 0x1b0]
mov qword [rsp + 0x190], rcx
mov ecx, ebp
mov rbx, r8
mov esi, r9d
shl edi, cl
mov rcx, qword [rsp + 0x190]
mov dword [rsp + 0x198], edx
call fcn.004fb020
test rax, rax
je 0x5f1cb2
cmp ebp, 3
jle 0x5f1c30
lea r15d, [rbp - 2]
mov edx, r12d
mov ecx, r15d
mov dword [rsp + 0x2c], r15d
shl edx, cl
lea eax, [rdx - 1]
and eax, esi
sar esi, cl
mov r11d, esi
lea ecx, [rsi - 1]
mov r8d, esi
mov r9d, esi
not r11d
xor r8d, 1
mov r10d, esi
xor r9d, 3
and r11d, ecx
mov ecx, esi
sub r8d, 1
sub r9d, 1
xor ecx, 0xfffffffe
xor r10d, 2
shr r11d, 0x1f
and r8d, ecx
mov ecx, esi
xor esi, 0xfffffffc
sub r10d, 1
xor ecx, 0xfffffffd
and esi, r9d
shr r8d, 0x1f
neg r11
and r10d, ecx
shr esi, 0x1f
mov ecx, dword [rsp + 0x198]
neg r8
shr r10d, 0x1f
mov r9d, esi
neg r10
neg r9
test ecx, ecx
jle 0x5f1c02
movsxd rdi, edi
mov ecx, r15d
mov esi, 2
mov ebp, 3
shl rdi, 3
shl esi, cl
mov qword [rsp + 0x30], rdi
mov rdi, qword [rsp + 0x190]
shl ebp, cl
mov ecx, ebp
mov r15, qword [rdi]
mov edi, dword [rsp + 0x198]
lea r14, [r15 + 8]
sub edi, 1
lea rdi, [r14 + rdi*8]
mov qword [rsp + 0xb8], rdi
movsxd rdi, edx
shl rdi, 3
mov qword [rsp + 0x78], rdi
movsxd rdi, esi
shl rdi, 3
mov qword [rsp + 0x70], rdi
movsxd rdi, ebp
mov ebp, eax
shl rdi, 3
not ebp
mov qword [rsp + 0x60], rdi
lea edi, [rax - 1]
and edi, ebp
mov ebp, eax
shr edi, 0x1f
xor ebp, 0xfffffffe
neg rdi
mov qword [rsp + 0x58], rdi
lea edi, [rdx + 1]
shl rdi, 3
mov qword [rsp + 0x50], rdi
lea edi, [rsi + 1]
shl rdi, 3
mov qword [rsp + 0x48], rdi
lea edi, [rcx + 1]
shl rdi, 3
mov qword [rsp + 0x38], rdi
mov edi, eax
xor edi, 1
sub edi, 1
and edi, ebp
mov ebp, eax
shr edi, 0x1f
xor ebp, 0xfffffffd
neg rdi
mov qword [rsp + 0x80], rdi
lea edi, [rdx + 2]
shl rdi, 3
mov qword [rsp + 0x68], rdi
lea edi, [rsi + 2]
shl rdi, 3
mov qword [rsp + 0x40], rdi
lea edi, [rcx + 2]
shl rdi, 3
mov qword [rsp + 0x88], rdi
mov edi, eax
xor edi, 2
sub edi, 1
and edi, ebp
mov ebp, eax
shr edi, 0x1f
neg rdi
mov qword [rsp + 0x90], rdi
lea edi, [rdx + 3]
shl rdi, 3
mov qword [rsp + 0x98], rdi
lea edi, [rsi + 3]
shl rdi, 3
mov qword [rsp + 0xa0], rdi
lea edi, [rcx + 3]
shl rdi, 3
mov qword [rsp + 0xa8], rdi
mov edi, eax
xor edi, 3
sub edi, 1
xor ebp, 0xfffffffc
and edi, ebp
mov ebp, eax
shr edi, 0x1f
xor ebp, 0xfffffffb
neg rdi
mov qword [rsp + 0xb0], rdi
lea edi, [rdx + 4]
shl rdi, 3
mov qword [rsp + 0xc0], rdi
lea edi, [rsi + 4]
shl rdi, 3
mov qword [rsp + 0xc8], rdi
lea edi, [rcx + 4]
shl rdi, 3
mov qword [rsp + 0xd0], rdi
mov edi, eax
xor edi, 4
sub edi, 1
and edi, ebp
mov ebp, eax
shr edi, 0x1f
xor ebp, 0xfffffffa
neg rdi
mov qword [rsp + 0xd8], rdi
lea edi, [rdx + 5]
shl rdi, 3
mov qword [rsp + 0xe0], rdi
lea edi, [rsi + 5]
shl rdi, 3
mov qword [rsp + 0xe8], rdi
lea edi, [rcx + 5]
shl rdi, 3
mov qword [rsp + 0xf0], rdi
mov edi, eax
xor edi, 5
sub edi, 1
and edi, ebp
mov ebp, eax
shr edi, 0x1f
xor ebp, 0xfffffff9
neg rdi
mov qword [rsp + 0xf8], rdi
lea edi, [rdx + 6]
shl rdi, 3
mov qword [rsp + 0x100], rdi
lea edi, [rsi + 6]
shl rdi, 3
mov qword [rsp + 0x108], rdi
lea edi, [rcx + 6]
shl rdi, 3
mov qword [rsp + 0x110], rdi
mov edi, eax
xor edi, 6
sub edi, 1
and edi, ebp
shr edi, 0x1f
neg rdi
add edx, 7
shl rdx, 3
mov qword [rsp + 0x118], rdi
mov qword [rsp + 0x120], rdx
lea edx, [rsi + 7]
lea rsi, [rdx*8]
lea edx, [rcx + 7]
lea rcx, [rdx*8]
mov edx, eax
xor eax, 0xfffffff8
mov qword [rsp + 0x128], rsi
xor edx, 7
mov qword [rsp + 0x130], rcx
sub edx, 1
and eax, edx
shr eax, 0x1f
neg rax
mov qword [rsp + 0x138], rax
jmp 0x5f1964
add r14, 8
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x70]
mov rax, qword [rbx]
lea rdx, [rsi + rbx]
mov rsi, qword [rdx]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x60]
and rax, r11
mov r13, qword [rdx]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x50]
and rsi, r8
mov r12, qword [rdx]
mov rcx, qword [rbx + 8]
and r13, r10
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x48]
or rsi, r13
mov rbp, qword [rdx]
and rcx, r11
or rsi, rax
and r12, r9
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x38]
or rsi, r12
and rsi, qword [rsp + 0x58]
mov rdx, qword [rdx]
and rbp, r8
mov rax, qword [rsp + 0x68]
add rdi, rbx
or rbp, rcx
mov rdi, qword [rdi]
and rdx, r10
add rax, rbx
mov rcx, qword [rbx + 0x10]
or rbp, rdx
mov rax, qword [rax]
and rdi, r9
and rcx, r11
or rbp, rdi
and rbp, qword [rsp + 0x80]
and rax, r8
mov r12, rbp
or rcx, rax
mov rax, qword [rsp + 0x90]
or r12, rsi
mov rsi, qword [rsp + 0x40]
lea rdx, [rsi + rbx]
mov rsi, qword [rsp + 0x88]
mov rdx, qword [rdx]
add rsi, rbx
mov rdi, qword [rsi]
and rdx, r10
or rcx, rdx
and rdi, r9
or rcx, rdi
mov rdi, qword [rsp + 0xa0]
and rax, rcx
mov rcx, qword [rsp + 0x98]
or rax, r12
lea rdx, [rcx + rbx]
mov rsi, rax
mov rax, qword [rbx + 0x18]
mov rcx, qword [rdx]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0xa8]
mov rdx, qword [rdx]
and rax, r11
add rdi, rbx
and rcx, r8
mov rdi, qword [rdi]
or rcx, rax
and rdx, r10
mov rax, qword [rsp + 0xb0]
or rcx, rdx
mov ebp, dword [rsp + 0x2c]
and rdi, r9
or rcx, rdi
and rax, rcx
or rax, rsi
cmp ebp, 2
je 0x5f1be9
mov rsi, qword [rsp + 0xc0]
mov rdi, qword [rsp + 0xc8]
mov rcx, qword [rbx + 0x20]
lea rdx, [rbx + rsi]
mov rsi, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0xd0]
and rcx, r11
mov rdx, qword [rdx]
add rdi, rbx
and rsi, r8
mov rdi, qword [rdi]
or rsi, rcx
and rdx, r10
mov rcx, qword [rbx + 0x28]
or rsi, rdx
and rdi, r9
and rcx, r11
or rsi, rdi
and rsi, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xe8]
or rax, rsi
mov rsi, qword [rsp + 0xe0]
lea rdx, [rbx + rsi]
mov rsi, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0xf0]
mov rdx, qword [rdx]
add rdi, rbx
and rsi, r8
mov rdi, qword [rdi]
or rsi, rcx
and rdx, r10
or rsi, rdx
and rdi, r9
or rsi, rdi
and rsi, qword [rsp + 0xf8]
mov rdi, qword [rsp + 0x108]
mov rcx, rsi
mov rsi, qword [rsp + 0x100]
or rcx, rax
mov rax, qword [rbx + 0x30]
lea rdx, [rbx + rsi]
mov rsi, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0x110]
and rax, r11
mov rdx, qword [rdx]
add rdi, rbx
and rsi, r8
mov rdi, qword [rdi]
or rsi, rax
and rdx, r10
mov rax, qword [rsp + 0x118]
or rsi, rdx
and rdi, r9
or rsi, rdi
and rax, rsi
or rax, rcx
cmp ebp, 3
jne 0x5f1be9
mov rsi, qword [rsp + 0x120]
mov rdi, qword [rbx + 0x38]
lea rdx, [rsi + rbx]
mov rsi, qword [rsp + 0x128]
and rdi, r11
mov rcx, qword [rdx]
lea rdx, [rsi + rbx]
mov rsi, qword [rsp + 0x130]
mov rdx, qword [rdx]
and rcx, r8
add rsi, rbx
or rcx, rdi
mov rsi, qword [rsi]
and rdx, r10
or rcx, rdx
and rsi, r9
or rcx, rsi
and rcx, qword [rsp + 0x138]
or rax, rcx
mov qword [r15], rax
add rbx, qword [rsp + 0x30]
mov r15, r14
cmp r14, qword [rsp + 0xb8]
jne 0x5f1960
mov rax, qword [rsp + 0x190]
mov ebx, dword [rsp + 0x198]
mov dword [rax + 8], ebx
mov eax, 1
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, dword [rsp + 0x198]
test r8d, r8d
jle 0x5f1c02
mov rax, qword [rsp + 0x190]
movsxd r11, edi
shl r11, 3
mov r10, qword [rax]
mov eax, dword [rsp + 0x198]
lea r9, [r10 + 8]
sub eax, 1
lea rbp, [r9 + rax*8]
mov rcx, rbx
xor r8d, r8d
xor edx, edx
nop dword [rax]
mov r13d, edx
mov r12, qword [rcx]
add edx, 1
add rcx, 8
xor r13d, esi
lea eax, [r13 - 1]
not r13d
and eax, r13d
shr eax, 0x1f
neg rax
and rax, r12
or r8, rax
cmp edi, edx
jne 0x5f1c70
mov qword [r10], r8
add rbx, r11
mov r10, r9
cmp rbp, r9
je 0x5f1c02
add r9, 8
jmp 0x5f1c61
xor eax, eax
jmp 0x5f1c19