Function at 0x6fd20f30
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1b8
mov eax, dword [rcx + 0xa60]
cmp eax, 1
mov rbx, rcx
mov r14, rdx
mov rdi, r8
je 0x6fd21004
lea edx, [rax - 8]
cmp edx, 1
ja 0x6fd20fe0
mov edx, 0x14
mov r13d, 4
mov ebp, 0x10
mov r8, qword [rdi]
cmp r8, rdx
jb 0x6fd20fbb
lea r12, [rbx + 0xa60]
mov rsi, r8
sub rsi, rbp
cmp qword [rbx + 0xc58], 0
je 0x6fd20fa0
mov edx, dword [rbx + 0xc68]
test edx, edx
jne 0x6fd21035
cmp eax, 6
je 0x6fd21060
cmp eax, 8
je 0x6fd210c5
cmp eax, 9
je 0x6fd21134
mov ebp, 0x21a
mov eax, ebp
add rsp, 0x1b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, qword [rcx + 0xc58]
mov ecx, dword [rcx + 0xc68]
mov rbp, qword [rdx + 0x28]
test ecx, ecx
je 0x6fd21020
lea rdx, [rbp + 4]
mov r13d, 4
jmp 0x6fd20f73
mov rdx, qword [rcx + 0xc58]
mov r13d, 4
mov rbp, qword [rdx + 0x28]
lea rdx, [rbp + 4]
jmp 0x6fd20f73
mov rdx, qword [rbx + 0xa68]
mov r13, qword [rdx + 0x18]
lea rdx, [r13 + rbp]
jmp 0x6fd20f73
mov r8, rsi
mov rdx, r14
mov rcx, r12
call sym.libSFTP.dll_sshVerifyMessageAuthCode
test eax, eax
jne 0x6fd20fbb
mov eax, dword [rbx + 0xa60]
jmp 0x6fd20fa0
mov rcx, qword [rbx + 0xa68]
lea rax, [r14 + r13]
mov r8, rsi
lea rdx, [rbx + 0xa70]
sub r8, r13
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], r8
lea r9, [rbx + 0xc6c]
mov qword [rsp + 0x20], rax
lea r8d, [r13*8]
call sym.libSFTP.dll_ctrDecrypt
mov ebp, eax
test ebp, ebp
jne 0x6fd20fbb
cmp qword [rbx + 0xc58], 0
je 0x6fd210bd
mov eax, dword [rbx + 0xc68]
test eax, eax
je 0x6fd21253
mov qword [rdi], rsi
jmp 0x6fd20fc0
lea r8, [r14 + rsi]
mov qword [rsp + 0x48], rbp
mov r9, r14
mov qword [rsp + 0x40], r8
lea rax, [r14 + r13]
mov r8, rsi
lea rdx, [rbx + 0xc6c]
sub r8, r13
mov qword [rsp + 0x30], rax
lea rcx, [rbx + 0xd10]
mov qword [rsp + 0x38], r8
mov r8d, 0xc
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
call sym.libSFTP.dll_gcmDecrypt
lea rdx, [rbx + 0xc77]
lea rcx, [rbx + 0xc6f]
mov ebp, eax
add byte [rdx], 1
jne 0x6fd2109d
sub rdx, 1
cmp rcx, rdx
jne 0x6fd2111d
jmp 0x6fd2109d
mov edx, dword [rbx + 0xd08]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], 8
mov r9d, 0x20
lea r15, [rsp + 0x120]
mov qword [rsp + 0x20], rax
lea r8, [rbx + 0xc7c]
mov rcx, r15
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x6c], edx
mov edx, 0x14
call sym.libSFTP.dll_chachaInit
test eax, eax
jne 0x6fd20fbb
lea rax, [rsp + 0x80]
mov r9d, 0x20
xor edx, edx
mov r8, rax
mov rcx, r15
mov qword [rsp + 0x50], rax
call sym.libSFTP.dll_chachaCipher
mov r9d, 0x20
xor r8d, r8d
xor edx, edx
lea rbp, [rsp + 0xa0]
mov rcx, r15
call sym.libSFTP.dll_chachaCipher
mov rax, qword [rsp + 0x50]
mov rcx, rbp
mov rdx, rax
call sym.libSFTP.dll_poly1305Init
mov r8, r13
mov rcx, rbp
lea rdx, [rbx + 0xe20]
call sym.libSFTP.dll_poly1305Update
mov r9, rsi
mov rcx, rbp
sub r9, r13
add r13, r14
mov r8, r9
mov rdx, r13
mov qword [rsp + 0x58], r9
call sym.libSFTP.dll_poly1305Update
lea r10, [rsp + 0x70]
mov rcx, rbp
mov rdx, r10
mov qword [rsp + 0x50], r10
call sym.libSFTP.dll_poly1305Final
mov r9, qword [rsp + 0x58]
mov r8, r13
mov rcx, r15
mov rdx, r13
call sym.libSFTP.dll_chachaCipher
mov r10, qword [rsp + 0x50]
xor ecx, ecx
xor eax, eax
lea r8, [r14 + rsi]
movzx edx, byte [r8 + rax]
xor dl, byte [r10 + rax]
add rax, 1
or ecx, edx
cmp rax, 0x10
jne 0x6fd21231
xor ebp, ebp
test cl, cl
setne bpl
jmp 0x6fd2109d
mov r8, rsi
mov rdx, r14
mov rcx, r12
call sym.libSFTP.dll_sshVerifyMessageAuthCode
test eax, eax
je 0x6fd210bd
jmp 0x6fd20fbb