Function at 0x6fd08c20
Capabilities:
Encrypt data using curve25519

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov eax, dword [rsp + 0xc0]
mov rsi, qword [rsp + 0xd0]
mov byte [rsp + 0x4c], al
test rcx, rcx
mov r14, rdx
mov rdi, rcx
mov eax, dword [rsp + 0xc8]
sete dl
test rsi, rsi
mov r12, r8
mov r13, r9
mov byte [rsp + 0x48], al
sete al
or dl, al
jne 0x6fd08fb0
test r8, r8
je 0x6fd08fb0
cmp byte [rsp + 0x4c], 0
je 0x6fd08ca0
test r9, r9
mov eax, 2
jne 0x6fd08ca0
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x4f0
call sym.libSFTP.dll_osAllocMem
mov rbx, rax
mov eax, 0x64
test rbx, rbx
je 0x6fd08c88
lea rbp, [rbx + 0x150]
mov rcx, rbx
call sym.libSFTP.dll_sha512Init
mov r8d, 0x20
mov rdx, rdi
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
xor edx, edx
mov rcx, rbx
call sym.libSFTP.dll_sha512Final
mov rax, qword [rbx]
mov qword [rbx + 0x150], rax
mov rax, qword [rbx + 8]
mov qword [rbp + 8], rax
mov rax, qword [rbx + 0x10]
mov qword [rbp + 0x10], rax
mov rax, qword [rbx + 0x18]
mov qword [rbp + 0x18], rax
shr rax, 0x38
and byte [rbx + 0x150], 0xf8
and eax, 0x7f
or eax, 0x40
test r14, r14
mov byte [rbx + 0x16f], al
lea rax, [rbx + 0xd0]
mov qword [rsp + 0x38], rax
je 0x6fd0908e
mov rdx, qword [rbx + 0x20]
lea rdi, [rbx + 0x110]
mov rcx, rbx
mov qword [rbx + 0x110], rdx
mov rdx, qword [rbx + 0x28]
mov qword [rdi + 8], rdx
mov rdx, qword [rbx + 0x30]
mov qword [rdi + 0x10], rdx
mov rax, qword [rbx + 0x38]
mov qword [rdi + 0x18], rax
call sym.libSFTP.dll_sha512Init
cmp byte [rsp + 0x48], 0
mov r8d, 0x20
jne 0x6fd08fc0
test r13, r13
jne 0x6fd08fc0
mov rdx, rdi
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
mov rdx, qword [r12]
test rdx, rdx
je 0x6fd09029
mov rax, r12
xor r15d, r15d
nop dword [rax]
mov r8, qword [rax + 8]
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
lea eax, [r15 + 1]
mov r15, rax
shl rax, 4
add rax, r12
mov rdx, qword [rax]
test rdx, rdx
jne 0x6fd08da0
lea r15, [rbx + 0x130]
xor edx, edx
mov rcx, rbx
call sym.libSFTP.dll_sha512Final
mov rdx, rbx
mov rcx, r15
call sym.libSFTP.dll_ed25519RedInt
lea rax, [rbx + 0x1f0]
mov r8, r15
mov rcx, rbx
lea r9, [0x6fd2ca00]
mov rdx, rax
mov qword [rsp + 0x40], rax
call sym.libSFTP.dll_ed25519Mul
mov rax, qword [rsp + 0x40]
mov rdx, rsi
mov rcx, rax
call sym.libSFTP.dll_ed25519Encode
mov rcx, rbx
call sym.libSFTP.dll_sha512Init
test r13, r13
je 0x6fd0907e
lea rdx, str.SigEd25519_no_Ed25519_collisions
mov r8d, 0x20
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
lea rdx, [rsp + 0x48]
mov r8d, 1
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
lea rdx, [rsp + 0x4c]
mov r8d, 1
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
movzx r8d, byte [rsp + 0x4c]
mov rdx, r13
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
mov r8d, 0x20
mov rdx, rsi
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
mov rdx, r14
mov r8d, 0x20
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
mov rdx, qword [r12]
test rdx, rdx
je 0x6fd08ec2
mov rax, r12
xor r13d, r13d
nop dword [rax]
mov r8, qword [rax + 8]
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
lea eax, [r13 + 1]
mov r13, rax
shl rax, 4
add rax, r12
mov rdx, qword [rax]
test rdx, rdx
jne 0x6fd08ea0
mov r14, qword [rsp + 0x38]
mov rcx, rbx
mov rdx, r14
call sym.libSFTP.dll_sha512Final
mov rdx, r14
mov rcx, rdi
call sym.libSFTP.dll_ed25519RedInt
mov r9, rbp
mov r8, rdi
mov rcx, r14
lea rdx, [rbx + 0xf0]
mov dword [rsp + 0x20], 0x20
call sym.libSFTP.dll_ed25519MulInt
mov rdx, r14
mov rcx, rdi
call sym.libSFTP.dll_ed25519RedInt
xor eax, eax
xor edx, edx
nop dword [rax]
movzx ecx, byte [rdi + rax]
movzx r8d, byte [r15 + rax]
add ecx, r8d
add edx, ecx
mov byte [rbp + rax], dl
add rax, 1
shr dx, 8
cmp rax, 0x20
jne 0x6fd08f10
xor edx, edx
mov ecx, 0xed
xor eax, eax
lea r9, [0x6fd2c960]
jmp 0x6fd08f47
movzx ecx, byte [r9 + rdx]
movzx r8d, byte [rbp + rdx]
sub eax, ecx
add eax, r8d
mov byte [rdi + rdx], al
add rdx, 1
sar ax, 8
cmp rdx, 0x20
jne 0x6fd08f42
and eax, 1
xor edx, edx
lea r9d, [rax - 1]
neg eax
nop
movzx ecx, byte [rdi + rdx]
movzx r8d, byte [rbp + rdx]
and ecx, r9d
and r8d, eax
or ecx, r8d
mov byte [rsi + rdx + 0x20], cl
add rdx, 1
cmp rdx, 0x20
jne 0x6fd08f70
mov r8d, 0x4f0
xor edx, edx
mov rcx, rbx
call sub.msvcrt.dll_memset
mov rcx, rbx
call sym.libSFTP.dll_osFreeMem
xor eax, eax
jmp 0x6fd08c88
mov eax, 2
jmp 0x6fd08c88
lea rdx, str.SigEd25519_no_Ed25519_collisions
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
lea rdx, [rsp + 0x48]
mov r8d, 1
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
lea rdx, [rsp + 0x4c]
mov r8d, 1
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
movzx r8d, byte [rsp + 0x4c]
mov rdx, r13
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
mov rdx, rdi
mov r8d, 0x20
mov rcx, rbx
call sym.libSFTP.dll_sha512Update
mov rdx, qword [r12]
test rdx, rdx
jne 0x6fd08d93
jmp 0x6fd08dc2
lea r15, [rbx + 0x130]
xor edx, edx
mov rcx, rbx
call sym.libSFTP.dll_sha512Final
mov rdx, rbx
mov rcx, r15
call sym.libSFTP.dll_ed25519RedInt
lea rax, [rbx + 0x1f0]
mov r8, r15
mov rcx, rbx
lea r9, [0x6fd2ca00]
mov rdx, rax
mov qword [rsp + 0x40], rax
call sym.libSFTP.dll_ed25519Mul
mov rax, qword [rsp + 0x40]
mov rdx, rsi
mov rcx, rax
call sym.libSFTP.dll_ed25519Encode
mov rcx, rbx
call sym.libSFTP.dll_sha512Init
cmp byte [rsp + 0x48], 0
je 0x6fd08e6c
jmp 0x6fd08e20
lea rdi, [rbx + 0x270]
mov rcx, rbx
mov r8, rbp
lea r9, [0x6fd2ca00]
mov rdx, rdi
call sym.libSFTP.dll_ed25519Mul
lea r14, [rbx + 0xd0]
mov rcx, rdi
mov rdx, r14
call sym.libSFTP.dll_ed25519Encode
jmp 0x6fd08d2f