Function at 0x1402224e0
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 0x1402227c0
test r9d, r9d
jle 0x1402227c0
cmp r9d, ebx
jg 0x1402227c7
cmp ebx, 0xa
jle 0x1402227c7
movsxd rax, ebx
lea r12, str.crypto_rsa_rsa_pk1.c
mov r8d, 0xb2
mov rdx, r12
mov rcx, rax
mov qword [rsp + 0x30], rax
call fcn.1401f4da0
test rax, rax
je 0x1402227f2
mov rcx, qword [rsp + 0x30]
movsxd rdx, esi
lea r8, [rbp + rdx]
lea r12, [rax + rcx]
mov rcx, r12
nop dword [rax + rax]
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, r12d
not eax
sub edx, ecx
and al, byte [r8]
mov byte [rcx], al
cmp ebx, edx
jg 0x140222568
lea edx, [rbx - 1]
test ebx, ebx
mov rcx, 0xffffffffffffffff
movzx eax, al
not rdx
mov r10d, eax
mov r9d, 2
cmovle rdx, rcx
not r10d
sub eax, 1
xor r11d, r11d
and r10d, eax
add r12, rdx
movzx edx, byte [r12 + 1]
xor edx, 2
movzx edx, dl
lea ecx, [rdx - 1]
not edx
and edx, ecx
xor ecx, ecx
and r10d, edx
sar r10d, 0x1f
nop dword [rax]
movzx eax, byte [r12 + r9]
mov edx, eax
sub eax, 1
not edx
and edx, eax
mov eax, r11d
sar edx, 0x1f
not eax
and eax, edx
or r11d, edx
mov r8d, eax
not eax
and r8d, r9d
add r9, 1
and eax, ecx
mov ecx, r8d
or ecx, eax
cmp ebx, r9d
jg 0x1402225e0
lea r15d, [rcx - 0xa]
mov edx, ecx
mov ebp, ebx
mov esi, r13d
mov eax, r15d
xor edx, 0xa
lea r14d, [rbx - 0xb]
xor eax, 0xa
or eax, edx
xor eax, ecx
add ecx, 1
sub ebp, ecx
sar eax, 0x1f
sub esi, ebp
mov edx, ebp
not eax
xor edx, r13d
xor esi, ebp
and eax, r10d
or esi, edx
mov edx, r13d
xor esi, r13d
xor edx, r14d
sar esi, 0x1f
not esi
and esi, eax
mov eax, r14d
sub eax, r13d
xor eax, r13d
or eax, edx
xor eax, r14d
sar eax, 0x1f
mov edx, eax
not eax
and edx, r14d
and r13d, eax
lea rax, [r12 + 0xc]
or edx, r13d
mov r13d, 1
mov dword [rsp + 0x38], edx
cmp r14d, 1
jle 0x140222708
mov dword [rsp + 0x3c], ebp
mov rbp, rax
nop dword [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 0x1402226fc
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 0x1402226e0
add r13d, r13d
cmp r14d, r13d
jg 0x140222698
mov ebp, dword [rsp + 0x3c]
mov r8d, dword [rsp + 0x38]
mov ecx, ebp
xor edx, edx
neg ecx
test r8d, r8d
je 0x14022275f
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 0x140222720
mov rdx, qword [rsp + 0x30]
mov r9d, 0xfa
lea r8, str.crypto_rsa_rsa_pk1.c
mov rcx, r12
call fcn.1401f5190
mov r8d, 0x9f
mov edx, 0x71
mov dword [rsp + 0x20], 0xfb
lea r9, str.crypto_rsa_rsa_pk1.c
mov ecx, 4
call fcn.1401d1f90
mov ecx, esi
and ecx, 1
call fcn.1401d4530
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 0x1402227af
mov r8d, 0x9f
mov edx, 0x71
mov ecx, 4
mov dword [rsp + 0x20], 0xad
lea r9, str.crypto_rsa_rsa_pk1.c
call fcn.1401d1f90
mov eax, 0xffffffff
jmp 0x1402227af
mov dword [rsp + 0x20], 0xb4
mov r9, r12
mov r8d, 0x41
mov edx, 0x71
mov ecx, 4
call fcn.1401d1f90
mov eax, 0xffffffff
jmp 0x1402227af