Function at 0x60a500
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov esi, dword [rsp + 0xf0]
mov rdi, rcx
mov ebx, edx
mov r12, r8
mov ebp, r9d
test edx, edx
jle 0x60a84a
test r9d, r9d
jle 0x60a84a
cmp r9d, esi
jg 0x60a851
cmp esi, 0xa
jle 0x60a851
movsxd rax, esi
mov r8d, 0xb2
lea rdx, str.crypto_rsa_rsa_pk1.c
mov rcx, rax
mov qword [rsp + 0x38], rax
call sym.CRYPTO_malloc
test rax, rax
je 0x60a87c
mov rcx, qword [rsp + 0x38]
movsxd r8, ebp
add r8, r12
lea r9, [rax + rcx]
mov rcx, r9
mov edx, ebp
lea eax, [rbp - 1]
sub rcx, 1
not edx
and edx, eax
sar edx, 0x1f
mov eax, edx
add edx, 1
sub r8, rdx
sub ebp, edx
mov edx, r9d
not eax
sub edx, ecx
and al, byte [r8]
mov byte [rcx], al
cmp esi, edx
jg 0x60a580
lea r12d, [rsi - 1]
test esi, esi
mov rdx, 0xffffffffffffffff
movzx eax, al
not r12
mov r8d, 2
cmovle r12, rdx
xor ecx, ecx
xor r10d, r10d
mov r11d, ecx
add r12, r9
movzx edx, byte [r12 + 1]
xor edx, 2
movzx edx, dl
mov r9d, edx
sub edx, 1
not r9d
and edx, r9d
mov r9d, eax
sub eax, 1
not r9d
and eax, r9d
and eax, edx
mov r9d, eax
sar r9d, 0x1f
nop
movzx edx, byte [r12 + r8]
mov eax, edx
sub edx, 1
not eax
and edx, eax
mov eax, edx
mov edx, r10d
sar eax, 0x1f
not edx
and edx, eax
or r10d, eax
mov dword [rsp + 0x58], edx
not edx
mov ebp, dword [rsp + 0x58]
mov dword [rsp + 0x5c], edx
mov ecx, dword [rsp + 0x5c]
mov edx, ebp
and edx, r8d
and ecx, r11d
add r8, 1
or edx, ecx
mov r11d, edx
cmp esi, r8d
jg 0x60a600
lea eax, [rdx - 0xa]
mov ecx, edx
xor edx, 0xa
mov ebp, esi
mov r11d, eax
xor eax, 0xa
lea r15d, [rsi - 0xb]
mov r14d, 1
or eax, edx
xor eax, ecx
add ecx, 1
sar eax, 0x1f
sub ebp, ecx
not eax
mov edx, ebp
and r9d, eax
mov eax, ebx
xor edx, ebx
sub eax, ebp
xor eax, ebp
or eax, edx
mov edx, ebx
xor eax, ebx
xor edx, r15d
sar eax, 0x1f
not eax
and eax, r9d
mov dword [rsp + 0x44], eax
mov eax, r15d
sub eax, ebx
xor eax, ebx
or eax, edx
xor eax, r15d
sar eax, 0x1f
mov dword [rsp + 0x60], eax
not eax
mov edx, dword [rsp + 0x60]
mov dword [rsp + 0x64], eax
mov ecx, dword [rsp + 0x64]
mov eax, edx
and eax, r15d
and ebx, ecx
or eax, ebx
mov dword [rsp + 0x48], eax
lea rax, [r12 + 0xc]
cmp r15d, 1
jle 0x60a763
mov qword [rsp + 0xd0], rdi
mov r13, rax
mov dword [rsp + 0x4c], ebp
mov ebp, r11d
nop
mov eax, r14d
mov edx, esi
and eax, ebp
sub edx, r14d
mov r10d, eax
sub eax, 1
not r10d
and r10d, eax
sar r10d, 0x1f
mov r11d, r10d
not r11d
cmp edx, 0xb
jle 0x60a74f
lea ebx, [rdx - 0xc]
movzx r11d, r11b
lea rax, [r12 + 0xb]
movsxd rdi, r14d
or r10d, 0xffffff00
add rbx, r13
nop
movzx ecx, byte [rax]
movzx edx, byte [rax + rdi]
mov dword [rsp + 0x68], r11d
add rax, 1
mov r9d, dword [rsp + 0x68]
mov dword [rsp + 0x6c], r10d
mov r8d, dword [rsp + 0x6c]
and edx, r9d
and ecx, r8d
or edx, ecx
mov byte [rax - 1], dl
cmp rbx, rax
jne 0x60a720
add r14d, r14d
cmp r15d, r14d
jg 0x60a6e0
mov ebp, dword [rsp + 0x4c]
mov rdi, qword [rsp + 0xd0]
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x60a7d2
mov eax, dword [rsp + 0x48]
mov ecx, ebp
mov r9d, dword [rsp + 0x44]
xor edx, edx
neg ecx
lea r8d, [rax - 1]
nop
mov eax, ebp
mov r10d, ebp
movzx r11d, byte [rdi + rdx]
xor r10d, ecx
xor eax, edx
add ecx, 1
or eax, r10d
movzx r10d, byte [r12 + rdx + 0xb]
xor eax, edx
sar eax, 0x1f
and eax, r9d
movzx eax, al
mov dword [rsp + 0x70], eax
not eax
mov esi, dword [rsp + 0x70]
mov dword [rsp + 0x74], eax
mov ebx, dword [rsp + 0x74]
mov eax, r10d
and eax, esi
and r11d, ebx
or eax, r11d
mov byte [rdi + rdx], al
mov rax, rdx
add rdx, 1
cmp r8, rax
jne 0x60a780
mov rdx, qword [rsp + 0x38]
mov r9d, 0xfa
lea r8, str.crypto_rsa_rsa_pk1.c
mov rcx, r12
call sym.CRYPTO_clear_free
mov edx, 0x71
mov ecx, 4
mov dword [rsp + 0x20], 0xfb
lea r9, str.crypto_rsa_rsa_pk1.c
mov r8d, 0x9f
call sym.ERR_put_error
mov esi, dword [rsp + 0x44]
mov ecx, esi
and ecx, 1
call sym.err_clear_last_constant_time
mov dword [rsp + 0x78], esi
mov eax, dword [rsp + 0x78]
not esi
mov dword [rsp + 0x7c], esi
mov edx, dword [rsp + 0x7c]
and ebp, eax
mov eax, ebp
or eax, edx
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0xffffffff
jmp 0x60a836
mov r8d, 0x9f
mov edx, 0x71
mov ecx, 4
mov dword [rsp + 0x20], 0xad
lea r9, str.crypto_rsa_rsa_pk1.c
call sym.ERR_put_error
mov eax, 0xffffffff
jmp 0x60a836
mov r8d, 0x41
mov edx, 0x71
mov ecx, 4
mov dword [rsp + 0x20], 0xb4
lea r9, str.crypto_rsa_rsa_pk1.c
call sym.ERR_put_error
mov eax, 0xffffffff
jmp 0x60a836