Function at 0x5385c0
Capabilities:
Encrypt data using curve25519

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov r14d, dword [rsp + 0x90]
mov r13, rcx
mov r12, rdx
mov edi, r8d
mov ebx, r9d
cmp r14d, 2
je 0x538695
test rcx, rcx
je 0x538621
mov r9, rcx
xor r8d, r8d
lea rdx, [rsp + 0x2c]
xor ecx, ecx
call sym.X509_ALGOR_get0
cmp dword [rsp + 0x2c], 0xffffffff
jne 0x5388b0
mov rcx, qword [r13]
test ebx, ebx
jne 0x5387f8
call sym.OBJ_obj2nid
mov ebx, eax
test r12, r12
sete sil
test ebx, ebx
sete al
or sil, al
jne 0x538658
cmp ebx, 0x40a
je 0x538690
cmp ebx, 0x43f
je 0x538690
cmp ebx, 0x40b
je 0x538820
mov edx, 3
cmp edi, 0x39
je 0x5386cc
call sym.ERR_new
lea r8, str.ossl_ecx_key_op
mov edx, 0xb6
lea rcx, str..._openssl_3.1.1_crypto_ec_ecx_backend.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x66
mov ecx, 0x10
call sym.ERR_set_error
xor r13d, r13d
jmp 0x538707
cmp edi, 0x20
jne 0x538658
cmp ebx, 0x40a
sete sil
cmp ebx, 0x43f
sete al
or sil, al
je 0x5387e0
xor edx, edx
cmp ebx, 0x40a
mov eax, 0
setne dl
add edx, edx
cmp ebx, 0x40a
cmovne esi, eax
mov r9, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x98]
mov r8d, 1
call sym.ossl_ecx_key_new
mov r13, rax
test rax, rax
je 0x5388e0
test r14d, r14d
jne 0x538720
lea rcx, [rax + 0x14]
movsxd r8, edi
mov rdx, r12
call sym.memcpy
mov rax, r13
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, rax
call sym.ossl_ecx_key_allocate_privkey
mov rbp, rax
test rax, rax
je 0x538930
cmp r14d, 2
je 0x538848
cmp ebx, 0x40a
je 0x538838
cmp ebx, 0x43f
je 0x538838
xor ecx, ecx
cmp ebx, 0x40b
setne cl
add rcx, 0x38
mov rax, qword [r12]
lea rdi, [rbp + 8]
mov rsi, r12
and rdi, 0xfffffffffffffff8
mov qword [rbp], rax
mov rax, qword [r12 + rcx - 8]
mov qword [rbp + rcx - 8], rax
sub rbp, rdi
add ecx, ebp
sub rsi, rbp
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
mov rcx, r13
call sym.ossl_ecx_public_from_private
test eax, eax
jne 0x538707
call sym.ERR_new
lea r8, str.ossl_ecx_key_op
mov edx, 0xdb
lea rcx, str..._openssl_3.1.1_crypto_ec_ecx_backend.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xa6
mov ecx, 0x10
call sym.ERR_set_error
mov rcx, r13
call sym.ossl_ecx_key_free
jmp 0x538687
xor edx, edx
cmp ebx, 0x40b
setne dl
lea edx, [rdx + rdx + 1]
jmp 0x5386cc
call sym.OBJ_obj2nid
cmp eax, ebx
je 0x538621
call sym.ERR_new
lea r8, str.ossl_ecx_key_op
mov edx, 0xb0
jmp 0x538669
mov edx, 1
cmp edi, 0x38
je 0x5386cc
jmp 0x538658
mov ecx, 0x20
jmp 0x538765
test ebx, ebx
je 0x538790
cmp ebx, 0x40a
je 0x5388d0
cmp ebx, 0x43f
je 0x5388d0
mov r8d, 0x39
cmp ebx, 0x40b
je 0x538964
mov rcx, qword [rsp + 0x98]
xor r9d, r9d
mov rdx, rbp
call sym.RAND_priv_bytes_ex
test eax, eax
jle 0x5387cf
test sil, sil
jne 0x538918
cmp ebx, 0x40b
jne 0x538790
and byte [rbp], 0xfc
or byte [rbp + 0x37], 0x80
jmp 0x538790
call sym.ERR_new
lea r8, str.ossl_ecx_key_op
mov edx, 0xaa
jmp 0x538669
mov r8d, 0x20
jmp 0x538872
call sym.ERR_new
lea r8, str.ossl_ecx_key_op
mov edx, 0xbd
lea rcx, str..._openssl_3.1.1_crypto_ec_ecx_backend.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x10
call sym.ERR_set_error
jmp 0x538707
movzx eax, byte [rbp + 0x1f]
and byte [rbp], 0xf8
and eax, 0x7f
or eax, 0x40
mov byte [rbp + 0x1f], al
jmp 0x538790
call sym.ERR_new
lea r8, str.ossl_ecx_key_op
mov edx, 0xc7
lea rcx, str..._openssl_3.1.1_crypto_ec_ecx_backend.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x10
call sym.ERR_set_error
jmp 0x5387cf
mov rcx, qword [rsp + 0x98]
xor r9d, r9d
mov r8d, 0x38
mov rdx, rax
call sym.RAND_priv_bytes_ex
test eax, eax
jg 0x5388a2
jmp 0x5387cf