Function at 0x140223020
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov ebx, dword [rsp + 0xa0]
mov rdi, rcx
mov r13d, edx
mov rbp, r8
mov esi, r9d
test edx, edx
jle 0x1402232fb
test r9d, r9d
jle 0x1402232fb
cmp r9d, ebx
jg 0x140223302
cmp ebx, 0xa
jle 0x140223302
movsxd rax, ebx
mov r8d, 0xbe
lea rdx, str.crypto_rsa_rsa_pk1.c
mov rcx, rax
mov qword [rsp + 0x20], rax
call fcn.14000e4c0
test rax, rax
je 0x140223338
mov rcx, qword [rsp + 0x20]
movsxd rdx, esi
lea r8, [rbp + rdx]
lea r12, [rax + rcx]
mov rdx, r12
mov ecx, esi
lea eax, [rsi - 1]
sub rdx, 1
not ecx
and ecx, eax
sar ecx, 0x1f
mov eax, ecx
add ecx, 1
sub r8, rcx
sub esi, ecx
mov ecx, r12d
not eax
sub ecx, edx
and al, byte [r8]
mov byte [rdx], al
cmp ebx, ecx
jg 0x1402230a0
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 0x140223118
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 + 0x28], edx
cmp r14d, 1
jle 0x140223238
mov dword [rsp + 0x2c], 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 0x14022322c
lea r10d, [rdx - 0xc]
lea rax, [r12 + 0xb]
movsxd r11, r13d
movzx r9d, r9b
add r10, rbp
or r8d, 0xffffff00
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 0x140223210
add r13d, r13d
cmp r14d, r13d
jg 0x1402231d0
mov ebp, dword [rsp + 0x2c]
mov r8d, dword [rsp + 0x28]
mov ecx, ebp
xor edx, edx
neg ecx
test r8d, r8d
je 0x14022328f
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 0x140223250
mov rdx, qword [rsp + 0x20]
mov r9d, 0x106
lea r8, str.crypto_rsa_rsa_pk1.c
mov rcx, r12
call fcn.14000e8c0
call fcn.140110230
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0x10d
lea rcx, str.crypto_rsa_rsa_pk1.c
call fcn.140110360
xor r8d, r8d
mov edx, 0x9f
mov ecx, 4
call fcn.140110450
mov ecx, esi
and ecx, 1
call fcn.140110110
mov eax, esi
not esi
and eax, ebp
or eax, esi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0xffffffff
jmp 0x1402232ea
call fcn.140110230
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0xba
lea rcx, str.crypto_rsa_rsa_pk1.c
call fcn.140110360
xor r8d, r8d
mov edx, 0x9f
mov ecx, 4
call fcn.140110450
mov eax, 0xffffffff
jmp 0x1402232ea
call fcn.140110230
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0xc0
lea rcx, str.crypto_rsa_rsa_pk1.c
call fcn.140110360
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 4
call fcn.140110450
or eax, 0xffffffff
jmp 0x1402232ea