Function at 0x5ac480
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov ebx, dword [rsp + 0xb0]
mov rdi, rcx
mov r13d, edx
mov rbp, r8
mov esi, r9d
test edx, edx
jle 0x5ac760
test r9d, r9d
jle 0x5ac760
cmp r9d, ebx
jg 0x5ac767
cmp ebx, 0xa
jle 0x5ac767
movsxd rax, ebx
mov r8d, 0xb2
lea rdx, str.crypto_rsa_rsa_pk1.c
mov rcx, rax
mov qword [rsp + 0x30], rax
call fcn.00580440
test rax, rax
je 0x5ac792
mov rcx, qword [rsp + 0x30]
movsxd r8, esi
add r8, rbp
lea r9, [rax + rcx]
mov rcx, r9
nop
mov edx, esi
lea eax, [rsi - 1]
sub rcx, 1
not edx
and edx, eax
sar edx, 0x1f
mov eax, edx
add edx, 1
sub r8, rdx
sub esi, edx
mov edx, r9d
not eax
sub edx, ecx
and al, byte [r8]
mov byte [rcx], al
cmp ebx, edx
jg 0x5ac500
lea r12d, [rbx - 1]
test ebx, ebx
mov rdx, 0xffffffffffffffff
movzx eax, al
not r12
mov r8d, 2
cmovle r12, rdx
xor r10d, r10d
add r12, r9
movzx edx, byte [r12 + 1]
xor edx, 2
movzx edx, dl
lea r9d, [rdx - 1]
not edx
and edx, r9d
mov r9d, eax
sub eax, 1
not r9d
and eax, r9d
and eax, edx
xor edx, edx
mov r9d, eax
sar r9d, 0x1f
nop dword [rax]
movzx eax, byte [r12 + r8]
mov ecx, eax
sub eax, 1
not ecx
and eax, ecx
sar eax, 0x1f
mov ecx, eax
mov eax, r10d
not eax
or r10d, ecx
and eax, ecx
mov r11d, eax
not eax
and r11d, r8d
add r8, 1
and eax, edx
mov edx, r11d
or edx, eax
cmp ebx, r8d
jg 0x5ac580
lea r15d, [rdx - 0xa]
mov eax, edx
lea r14d, [rbx - 0xb]
mov ebp, ebx
mov esi, r15d
xor eax, 0xa
xor esi, 0xa
or esi, eax
xor esi, edx
add edx, 1
sar esi, 0x1f
sub ebp, edx
mov edx, r13d
not esi
mov eax, ebp
xor edx, r14d
and r9d, esi
mov esi, r13d
xor eax, r13d
sub esi, ebp
xor esi, ebp
or esi, eax
mov eax, r14d
sub eax, r13d
xor esi, r13d
xor eax, r13d
sar esi, 0x1f
or eax, edx
not esi
xor eax, r14d
and esi, r9d
sar eax, 0x1f
mov edx, eax
not eax
and edx, r14d
and eax, r13d
mov r13d, 1
or edx, eax
lea rax, [r12 + 0xc]
mov dword [rsp + 0x38], edx
cmp r14d, 1
jle 0x5ac6a8
mov dword [rsp + 0x3c], ebp
mov rbp, rax
nop dword [rax + rax]
mov eax, r13d
mov edx, ebx
and eax, r15d
sub edx, r13d
mov r8d, eax
sub eax, 1
not r8d
and r8d, eax
sar r8d, 0x1f
mov r9d, r8d
not r9d
cmp edx, 0xb
jle 0x5ac69c
lea r10d, [rdx - 0xc]
lea rax, [r12 + 0xb]
movsxd r11, r13d
movzx r9d, r9b
add r10, rbp
or r8d, 0xffffff00
nop dword [rax + rax]
movzx edx, byte [rax + r11]
movzx ecx, byte [rax]
add rax, 1
and edx, r9d
and ecx, r8d
or edx, ecx
mov byte [rax - 1], dl
cmp r10, rax
jne 0x5ac680
add r13d, r13d
cmp r14d, r13d
jg 0x5ac638
mov ebp, dword [rsp + 0x3c]
mov r8d, dword [rsp + 0x38]
mov ecx, ebp
xor edx, edx
neg ecx
test r8d, r8d
je 0x5ac6ff
nop dword [rax + rax]
mov eax, ebp
mov r9d, ebp
xor r9d, ecx
xor eax, edx
add ecx, 1
or eax, r9d
movzx r9d, byte [r12 + rdx + 0xb]
xor eax, edx
sar eax, 0x1f
and eax, esi
movzx eax, al
mov r10d, eax
not eax
and r9d, r10d
movzx r10d, byte [rdi + rdx]
and eax, r10d
or eax, r9d
mov byte [rdi + rdx], al
add rdx, 1
cmp rdx, r8
jne 0x5ac6c0
mov rdx, qword [rsp + 0x30]
mov r9d, 0xfa
lea r8, str.crypto_rsa_rsa_pk1.c
mov rcx, r12
call fcn.00580830
mov r8d, 0x9f
mov edx, 0x71
mov dword [rsp + 0x20], 0xfb
lea r9, str.crypto_rsa_rsa_pk1.c
mov ecx, 4
call fcn.0055dd20
mov ecx, esi
and ecx, 1
call fcn.005602e0
mov eax, esi
not esi
and eax, ebp
or eax, esi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0xffffffff
jmp 0x5ac74f
mov r8d, 0x9f
mov edx, 0x71
mov ecx, 4
mov dword [rsp + 0x20], 0xad
lea r9, str.crypto_rsa_rsa_pk1.c
call fcn.0055dd20
mov eax, 0xffffffff
jmp 0x5ac74f
mov r8d, 0x41
mov edx, 0x71
mov ecx, 4
mov dword [rsp + 0x20], 0xb4
lea r9, str.crypto_rsa_rsa_pk1.c
call fcn.0055dd20
mov eax, 0xffffffff
jmp 0x5ac74f