Function at 0x140251310
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 0x1402513e5
test rcx, rcx
je 0x140251371
mov r9, rcx
xor r8d, r8d
lea rdx, [rsp + 0x2c]
xor ecx, ecx
call fcn.1401f8190
cmp dword [rsp + 0x2c], 0xffffffff
jne 0x140251600
mov rcx, qword [r13]
test ebx, ebx
jne 0x140251548
call fcn.14009a320
mov ebx, eax
test r12, r12
sete sil
test ebx, ebx
sete al
or sil, al
jne 0x1402513a8
cmp ebx, 0x40a
je 0x1402513e0
cmp ebx, 0x43f
je 0x1402513e0
cmp ebx, 0x40b
je 0x140251570
mov edx, 3
cmp edi, 0x39
je 0x14025141c
call fcn.1400bf100
lea r8, str.ossl_ecx_key_op
mov edx, 0xb2
lea rcx, str.crypto_ec_ecx_backend.c
call fcn.1400bf220
xor r8d, r8d
mov edx, 0x66
mov ecx, 0x10
call fcn.1400bf330
xor r13d, r13d
jmp 0x140251457
cmp edi, 0x20
jne 0x1402513a8
cmp ebx, 0x40a
sete sil
cmp ebx, 0x43f
sete al
or sil, al
je 0x140251530
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 fcn.1402519e0
mov r13, rax
test rax, rax
je 0x140251630
test r14d, r14d
jne 0x140251470
lea rcx, [rax + 0x14]
movsxd r8, edi
mov rdx, r12
call sub.msvcrt.dll_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 fcn.140251b90
mov rbp, rax
test rax, rax
je 0x140251680
cmp r14d, 2
je 0x140251598
cmp ebx, 0x40a
je 0x140251588
cmp ebx, 0x43f
je 0x140251588
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 fcn.140250fb0
test eax, eax
jne 0x140251457
call fcn.1400bf100
lea r8, str.ossl_ecx_key_op
mov edx, 0xd7
lea rcx, str.crypto_ec_ecx_backend.c
call fcn.1400bf220
xor r8d, r8d
mov edx, 0xa6
mov ecx, 0x10
call fcn.1400bf330
mov rcx, r13
call fcn.140251ae0
jmp 0x1402513d7
xor edx, edx
cmp ebx, 0x40b
setne dl
lea edx, [rdx + rdx + 1]
jmp 0x14025141c
call fcn.14009a320
cmp eax, ebx
je 0x140251371
call fcn.1400bf100
lea r8, str.ossl_ecx_key_op
mov edx, 0xac
jmp 0x1402513b9
mov edx, 1
cmp edi, 0x38
je 0x14025141c
jmp 0x1402513a8
mov ecx, 0x20
jmp 0x1402514b5
test ebx, ebx
je 0x1402514e0
cmp ebx, 0x40a
je 0x140251620
cmp ebx, 0x43f
je 0x140251620
mov r8d, 0x39
cmp ebx, 0x40b
je 0x1402516b4
mov rcx, qword [rsp + 0x98]
xor r9d, r9d
mov rdx, rbp
call fcn.14009c350
test eax, eax
jle 0x14025151f
test sil, sil
jne 0x140251668
cmp ebx, 0x40b
jne 0x1402514e0
and byte [rbp], 0xfc
or byte [rbp + 0x37], 0x80
jmp 0x1402514e0
call fcn.1400bf100
lea r8, str.ossl_ecx_key_op
mov edx, 0xa6
jmp 0x1402513b9
mov r8d, 0x20
jmp 0x1402515c2
call fcn.1400bf100
lea r8, str.ossl_ecx_key_op
mov edx, 0xb9
lea rcx, str.crypto_ec_ecx_backend.c
call fcn.1400bf220
xor r8d, r8d
mov edx, 0x80010
mov ecx, 0x10
call fcn.1400bf330
jmp 0x140251457
movzx eax, byte [rbp + 0x1f]
and byte [rbp], 0xf8
and eax, 0x7f
or eax, 0x40
mov byte [rbp + 0x1f], al
jmp 0x1402514e0
call fcn.1400bf100
lea r8, str.ossl_ecx_key_op
mov edx, 0xc3
lea rcx, str.crypto_ec_ecx_backend.c
call fcn.1400bf220
xor r8d, r8d
mov edx, 0x80010
mov ecx, 0x10
call fcn.1400bf330
jmp 0x14025151f
mov rcx, qword [rsp + 0x98]
xor r9d, r9d
mov r8d, 0x38
mov rdx, rax
call fcn.14009c350
test eax, eax
jg 0x1402515f2
jmp 0x14025151f