Function at 0x6fd08890
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rdi, qword [rsp + 0xb8]
mov eax, dword [rsp + 0xb0]
test rcx, rcx
mov r13, rdx
mov r14, rcx
mov byte [rsp + 0xa8], r9b
sete dl
test rdi, rdi
mov byte [rsp + 0x3c], al
mov r10, r8
sete al
or dl, al
jne 0x6fd08b40
test r13, r13
je 0x6fd08b40
test r9b, r9b
je 0x6fd08901
test r8, r8
mov eax, 2
jne 0x6fd08901
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x4f0
mov qword [rsp + 0x28], r10
call sym.libSFTP.dll_osAllocMem
mov r12, rax
mov eax, 0x64
test r12, r12
je 0x6fd088f0
mov rax, qword [rdi]
lea r9, [r12 + 0x130]
xor ebx, ebx
lea rbp, [r12 + 0x150]
mov r10, qword [rsp + 0x28]
lea rsi, [r12 + 0x110]
lea rcx, [0x6fd2c960]
mov qword [r12 + 0x130], rax
mov rax, qword [rdi + 8]
mov qword [r9 + 8], rax
mov rax, qword [rdi + 0x10]
mov qword [r9 + 0x10], rax
mov rax, qword [rdi + 0x18]
mov qword [r9 + 0x18], rax
mov rdx, qword [rdi + 0x20]
mov qword [r12 + 0x150], rdx
mov rdx, qword [rdi + 0x28]
mov qword [rbp + 8], rdx
mov rdx, qword [rdi + 0x30]
mov qword [rbp + 0x10], rdx
mov rax, qword [rdi + 0x38]
mov edx, 0xed
mov qword [rbp + 0x18], rax
xor eax, eax
jmp 0x6fd08997
movzx edx, byte [rcx + rax]
movzx r8d, byte [rbp + rax]
sub ebx, edx
add ebx, r8d
mov byte [rsi + rax], bl
add rax, 1
sar bx, 8
cmp rax, 0x20
jne 0x6fd08993
lea r15, [r12 + 0x170]
mov rdx, r14
not ebx
mov qword [rsp + 0x30], r10
mov rcx, r15
mov qword [rsp + 0x28], r9
and ebx, 1
call sym.libSFTP.dll_ed25519Decode
mov rcx, r12
or ebx, eax
call sym.libSFTP.dll_sha512Init
cmp byte [rsp + 0x3c], 0
mov r9, qword [rsp + 0x28]
mov r10, qword [rsp + 0x30]
jne 0x6fd08b50
test r10, r10
jne 0x6fd08b50
mov rdx, r9
mov r8d, 0x20
mov rcx, r12
call sym.libSFTP.dll_sha512Update
mov rdx, r14
mov r8d, 0x20
mov rcx, r12
call sym.libSFTP.dll_sha512Update
mov rdx, qword [r13]
test rdx, rdx
je 0x6fd08a52
mov rax, r13
xor r14d, r14d
nop
mov r8, qword [rax + 8]
mov rcx, r12
call sym.libSFTP.dll_sha512Update
lea eax, [r14 + 1]
mov r14, rax
shl rax, 4
add rax, r13
mov rdx, qword [rax]
test rdx, rdx
jne 0x6fd08a30
lea r13, [r12 + 0xd0]
mov rcx, r12
lea r14, [r12 + 0x270]
mov rdx, r13
call sym.libSFTP.dll_sha512Final
mov rdx, r13
mov rcx, r13
call sym.libSFTP.dll_ed25519RedInt
mov r8, r15
mov rcx, r15
lea rdx, [0x6fd2c9e0]
call sym.libSFTP.dll_curve25519Sub
lea rcx, [r12 + 0x1d0]
lea rdx, [0x6fd2c9e0]
mov r8, rcx
call sym.libSFTP.dll_curve25519Sub
mov r8, rbp
mov rdx, r14
mov rcx, r12
lea r9, [0x6fd2ca00]
call sym.libSFTP.dll_ed25519Mul
mov r9, r15
mov r8, r13
mov rdx, r15
mov rcx, r12
call sym.libSFTP.dll_ed25519Mul
mov r9, r15
mov r8, r14
mov rdx, r15
mov rcx, r12
call sym.libSFTP.dll_ed25519Add
mov rcx, r15
mov rdx, rsi
call sym.libSFTP.dll_ed25519Encode
xor eax, eax
xor ecx, ecx
nop word [rax + rax]
movzx edx, byte [rsi + rax]
xor dl, byte [rdi + rax]
add rax, 1
or ecx, edx
cmp rax, 0x20
jne 0x6fd08af0
mov eax, ecx
xor edx, edx
mov r8d, 0x4f0
neg eax
or ecx, eax
shr cl, 7
movzx eax, cl
mov rcx, r12
or ebx, eax
call sub.msvcrt.dll_memset
mov rcx, r12
call sym.libSFTP.dll_osFreeMem
cmp ebx, 1
sbb eax, eax
not eax
and eax, 0x20d
jmp 0x6fd088f0
mov eax, 2
jmp 0x6fd088f0
mov r8d, 0x20
mov rcx, r12
mov qword [rsp + 0x28], r9
lea rdx, str.SigEd25519_no_Ed25519_collisions
mov qword [rsp + 0x30], r10
call sym.libSFTP.dll_sha512Update
lea rdx, [rsp + 0x3c]
mov r8d, 1
mov rcx, r12
call sym.libSFTP.dll_sha512Update
lea rdx, [rsp + 0xa8]
mov r8d, 1
mov rcx, r12
call sym.libSFTP.dll_sha512Update
mov r10, qword [rsp + 0x30]
mov rcx, r12
movzx r8d, byte [rsp + 0xa8]
mov rdx, r10
call sym.libSFTP.dll_sha512Update
mov r9, qword [rsp + 0x28]
jmp 0x6fd089fd