Function at 0x140013a58
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x40
mov rax, r8
mov rsi, rdx
mov rbp, rcx
test r9b, r9b
je 0x140013a96
mov r8d, 0x40
mov rdx, rax
mov rcx, rsi
call fcn.140020da0
jmp 0x140013a99
mov rsi, rax
cmp byte [0x140054fb0], 0
mov r14d, 0x14
lea r13d, [r14 - 0x10]
jne 0x140013b59
xor r9d, r9d
lea r8, [0x140054974]
mov r10d, 0x66666667
lea ecx, [r9 + 1]
mov eax, r10d
mov dword [r8 - 4], r9d
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
mov eax, r10d
mov dword [r8], ecx
lea ecx, [r9 + 2]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
mov eax, r10d
mov dword [r8 + 4], ecx
lea ecx, [r9 + 3]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
mov eax, r10d
mov dword [r8 + 8], ecx
lea ecx, [r9 + 4]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
mov eax, r9d
mov dword [r8 + 0xc], ecx
add r8, r14
test eax, eax
lea ecx, [r9 - 1]
lea rax, [0x140054fb4]
mov r9d, r13d
cmovne r9d, ecx
cmp r8, rax
jl 0x140013ac0
mov byte [0x140054fb0], 1
mov rax, qword [rbp]
lea rbx, [0x14005497c]
mov r12, rsi
mov qword [rsp + 0x20], rax
mov rax, qword [rbp + 8]
lea rdi, [0x140054abc]
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x10]
mov dword [rsp + 0x30], eax
mov eax, dword [r12]
mov r11d, eax
ror r11d, 8
and r11d, 0xff00ff00
rol eax, 8
and eax, 0xff00ff
or r11d, eax
mov dword [r12], r11d
movsxd r10, dword [rbx - 8]
movsxd rax, dword [rbx]
mov r8d, dword [rsp + rax*4 + 0x20]
movsxd rax, dword [rbx - 0xc]
movsxd r9, dword [rbx + 4]
mov edx, dword [rsp + rax*4 + 0x20]
movsxd rax, dword [rbx - 4]
add rbx, r14
mov ecx, dword [rsp + rax*4 + 0x20]
rol edx, 5
add r12, r13
xor ecx, r8d
lea eax, [r11 + rdx]
and ecx, dword [rsp + r10*4 + 0x20]
xor ecx, r8d
lea ecx, [rcx + rax + 0x5a827999]
add dword [rsp + r9*4 + 0x20], ecx
mov eax, dword [rsp + r10*4 + 0x20]
ror eax, 2
cmp rbx, rdi
mov dword [rsp + r10*4 + 0x20], eax
jl 0x140013b83
mov ebx, 0xd
mov r12, r13
lea rax, [rbx + 5]
lea rdx, [rbx + 3]
lea rcx, [rbx - 5]
and eax, 0xf
and ecx, 0xf
and edx, 0xf
mov r11d, dword [rsi + rcx*4]
xor r11d, dword [rsi + rax*4]
mov rax, rbx
inc rbx
and eax, 0xf
xor r11d, dword [rsi + rax*4]
xor r11d, dword [rsi + rdx*4]
rol r11d, 1
mov dword [rsi + rdx*4], r11d
movsxd r10, dword [rdi - 8]
movsxd rax, dword [rdi]
mov r8d, dword [rsp + rax*4 + 0x20]
movsxd rax, dword [rdi - 0xc]
movsxd r9, dword [rdi + 4]
mov edx, dword [rsp + rax*4 + 0x20]
movsxd rax, dword [rdi - 4]
add rdi, r14
mov ecx, dword [rsp + rax*4 + 0x20]
rol edx, 5
xor ecx, r8d
lea eax, [r11 + rdx]
and ecx, dword [rsp + r10*4 + 0x20]
xor ecx, r8d
lea ecx, [rcx + rax + 0x5a827999]
add dword [rsp + r9*4 + 0x20], ecx
mov eax, dword [rsp + r10*4 + 0x20]
ror eax, 2
sub r12, 1
mov dword [rsp + r10*4 + 0x20], eax
jne 0x140013c02
lea edi, [r12 + 0x11]
lea rbx, [0x140054b0c]
mov r12, r14
lea rcx, [rdi - 5]
lea rax, [rdi + 5]
lea rdx, [rdi + 3]
and eax, 0xf
and edx, 0xf
and ecx, 0xf
mov r11d, dword [rsi + rcx*4]
xor r11d, dword [rsi + rax*4]
mov rax, rdi
inc rdi
and eax, 0xf
xor r11d, dword [rsi + rax*4]
xor r11d, dword [rsi + rdx*4]
rol r11d, 1
mov dword [rsi + rdx*4], r11d
movsxd r10, dword [rbx - 8]
movsxd rax, dword [rbx - 0xc]
mov r8d, dword [rsp + rax*4 + 0x20]
movsxd rcx, dword [rbx - 4]
movsxd rax, dword [rbx]
mov edx, dword [rsp + rcx*4 + 0x20]
movsxd r9, dword [rbx + 4]
rol r8d, 5
xor edx, dword [rsp + rax*4 + 0x20]
lea eax, [r11 + r8]
add rbx, r14
xor edx, dword [rsp + r10*4 + 0x20]
lea ecx, [rdx + rax + 0x6ed9eba1]
add dword [rsp + r9*4 + 0x20], ecx
mov eax, dword [rsp + r10*4 + 0x20]
ror eax, 2
sub r12, 1
mov dword [rsp + r10*4 + 0x20], eax
jne 0x140013c9e
lea r12, [0x140054c98]
mov r13d, 0x25
lea rax, [r13 + 5]
lea rdx, [r13 + 3]
lea rcx, [r13 - 5]
and eax, 0xf
and edx, 0xf
and ecx, 0xf
mov edi, dword [rsi + rcx*4]
xor edi, dword [rsi + rax*4]
mov rax, r13
inc r13
and eax, 0xf
xor edi, dword [rsi + rax*4]
xor edi, dword [rsi + rdx*4]
rol edi, 1
mov dword [rsi + rdx*4], edi
movsxd rbx, dword [r12 - 4]
movsxd rax, dword [r12]
mov r8d, dword [rsp + rax*4 + 0x20]
mov r10d, dword [rsp + rbx*4 + 0x20]
movsxd rax, dword [r12 - 8]
mov r9d, dword [rsp + rax*4 + 0x20]
movsxd rax, dword [r12 + 4]
movsxd r11, dword [r12 + 8]
mov edx, dword [rsp + rax*4 + 0x20]
rol r9d, 5
mov ecx, r10d
or ecx, r8d
and r10d, r8d
add r9d, edi
and edx, ecx
add r12, 0x14
or edx, r10d
lea eax, [rdx + r9 - 0x70e44324]
add dword [rsp + r11*4 + 0x20], eax
mov eax, dword [rsp + rbx*4 + 0x20]
ror eax, 2
sub r14, 1
mov dword [rsp + rbx*4 + 0x20], eax
jne 0x140013d33
lea rbx, [0x140054e2c]
lea edi, [r14 + 0x39]
lea r12d, [r14 + 0x14]
lea rcx, [rdi - 5]
lea rax, [rdi + 5]
lea rdx, [rdi + 3]
and eax, 0xf
and edx, 0xf
and ecx, 0xf
mov r11d, dword [rsi + rcx*4]
xor r11d, dword [rsi + rax*4]
mov rax, rdi
inc rdi
and eax, 0xf
xor r11d, dword [rsi + rax*4]
xor r11d, dword [rsi + rdx*4]
rol r11d, 1
mov dword [rsi + rdx*4], r11d
movsxd r10, dword [rbx - 8]
movsxd rax, dword [rbx - 0xc]
mov r8d, dword [rsp + rax*4 + 0x20]
movsxd rax, dword [rbx]
movsxd rcx, dword [rbx - 4]
mov edx, dword [rsp + rcx*4 + 0x20]
movsxd r9, dword [rbx + 4]
rol r8d, 5
xor edx, dword [rsp + rax*4 + 0x20]
add r8d, r11d
add rbx, 0x14
xor edx, dword [rsp + r10*4 + 0x20]
lea eax, [rdx + r8 - 0x359d3e2a]
add dword [rsp + r9*4 + 0x20], eax
mov eax, dword [rsp + r10*4 + 0x20]
ror eax, 2
sub r12, 1
mov dword [rsp + r10*4 + 0x20], eax
jne 0x140013dd7
lea rcx, [rsp + 0x20]
lea edx, [r12 + 5]
sub rcx, rbp
mov eax, dword [rcx + rbp]
add dword [rbp], eax
add rbp, 4
sub rdx, 1
jne 0x140013e6d
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r13
pop r12
ret