Function at 0x140123710
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 0x140123a1d
test r9d, r9d
jle 0x140123a1d
cmp r9d, ebx
jg 0x1401239ee
cmp ebx, 0xa
jle 0x1401239ee
movsxd r15, ebx
mov r8d, 0xc2
lea rdx, str.crypto_rsa_rsa_pk1.c
mov rcx, r15
mov qword [rsp + 0x20], r15
call fcn.140095a80
test rax, rax
je 0x140123a1d
movsxd r8, esi
lea r9, [rax + r15]
add r8, rbp
mov rcx, r9
nop dword [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, r9d
not eax
sub edx, ecx
and al, byte [r8]
mov byte [rcx], al
cmp ebx, edx
jg 0x140123790
lea r12d, [rbx - 1]
test ebx, ebx
mov rdx, 0xffffffffffffffff
movzx eax, al
not r12
cmovle r12, rdx
xor ecx, ecx
xor r11d, r11d
add r12, r9
mov r9d, 2
movzx edx, byte [r12 + 1]
xor edx, 2
movzx edx, dl
lea r10d, [rdx - 1]
not edx
and edx, r10d
mov r10d, eax
sub eax, 1
not r10d
and eax, r10d
and eax, edx
mov r10d, eax
sar r10d, 0x1f
nop dword [rax]
movzx eax, byte [r12 + r9]
mov edx, eax
sub eax, 1
not edx
and eax, edx
cdq
mov eax, r11d
not eax
or r11d, edx
and eax, 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 0x140123810
lea r15d, [rcx - 0xa]
mov eax, ecx
lea r14d, [rbx - 0xb]
mov ebp, ebx
mov esi, r15d
xor eax, 0xa
mov edx, r14d
xor esi, 0xa
sub edx, r13d
or esi, eax
xor edx, r13d
xor esi, ecx
add ecx, 1
sar esi, 0x1f
sub ebp, ecx
not esi
mov eax, ebp
and r10d, esi
mov esi, r13d
xor eax, r13d
sub esi, ebp
xor esi, ebp
or esi, eax
mov eax, r13d
xor eax, r14d
xor esi, r13d
or edx, eax
sar esi, 0x1f
xor edx, r14d
not esi
sar edx, 0x1f
and esi, r10d
mov eax, edx
not edx
and eax, r14d
and edx, r13d
mov r13d, 1
or eax, edx
mov dword [rsp + 0x28], eax
lea rax, [r12 + 0xc]
cmp r14d, 1
jle 0x140123928
mov dword [rsp + 0x2c], ebp
mov rbp, rax
nop
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 0x14012391c
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 0x140123900
add r13d, r13d
cmp r14d, r13d
jg 0x1401238c0
mov ebp, dword [rsp + 0x2c]
mov eax, dword [rsp + 0x28]
test eax, eax
je 0x140123982
mov eax, dword [rsp + 0x28]
mov ecx, ebp
xor edx, edx
neg ecx
lea r8d, [rax - 1]
nop
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
mov rax, rdx
add rdx, 1
cmp rax, r8
jne 0x140123940
mov rdx, qword [rsp + 0x20]
mov r9d, 0x108
lea r8, str.crypto_rsa_rsa_pk1.c
mov rcx, r12
call fcn.140095e80
call fcn.1400bf100
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0x10f
lea rcx, str.crypto_rsa_rsa_pk1.c
call fcn.1400bf220
xor r8d, r8d
mov edx, 0x9f
mov ecx, 4
call fcn.1400bf330
mov ecx, esi
and ecx, 1
call fcn.140093630
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
call fcn.1400bf100
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0xbe
lea rcx, str.crypto_rsa_rsa_pk1.c
call fcn.1400bf220
xor r8d, r8d
mov edx, 0x9f
mov ecx, 4
call fcn.1400bf330
mov eax, 0xffffffff
jmp 0x1401239dd