Function at 0x652e90
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 0x65317b
test r9d, r9d
jle 0x65317b
cmp r9d, ebx
jg 0x653182
cmp ebx, 0xa
jle 0x653182
movsxd rax, ebx
mov r8d, 0xbe
lea rdx, str..._openssl_3.1.1_crypto_rsa_rsa_pk1.c
mov rcx, rax
mov qword [rsp + 0x20], rax
call sym.CRYPTO_malloc
test rax, rax
je 0x6531b8
mov rcx, qword [rsp + 0x20]
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 0x652f10
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 0x652f90
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 + 0x28], edx
cmp r14d, 1
jle 0x6530b8
mov dword [rsp + 0x2c], 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 0x6530ac
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 0x653090
add r13d, r13d
cmp r14d, r13d
jg 0x653048
mov ebp, dword [rsp + 0x2c]
mov r8d, dword [rsp + 0x28]
mov ecx, ebp
xor edx, edx
neg ecx
test r8d, r8d
je 0x65310f
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 0x6530d0
mov rdx, qword [rsp + 0x20]
mov r9d, 0x106
lea r8, str..._openssl_3.1.1_crypto_rsa_rsa_pk1.c
mov rcx, r12
call sym.CRYPTO_clear_free
call sym.ERR_new
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0x10d
lea rcx, str..._openssl_3.1.1_crypto_rsa_rsa_pk1.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x9f
mov ecx, 4
call sym.ERR_set_error
mov ecx, esi
and ecx, 1
call sym.err_clear_last_constant_time
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 0x65316a
call sym.ERR_new
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0xba
lea rcx, str..._openssl_3.1.1_crypto_rsa_rsa_pk1.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x9f
mov ecx, 4
call sym.ERR_set_error
mov eax, 0xffffffff
jmp 0x65316a
call sym.ERR_new
lea r8, str.RSA_padding_check_PKCS1_type_2
mov edx, 0xc0
lea rcx, str..._openssl_3.1.1_crypto_rsa_rsa_pk1.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 4
call sym.ERR_set_error
or eax, 0xffffffff
jmp 0x65316a