Function at 0x6fd02840
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rbp, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xe0]
test rcx, rcx
mov qword [rsp + 0xb0], rcx
mov r12, rdx
mov r15, r8
mov r13, r9
je 0x6fd02912
test r8, r8
mov eax, 0xec
je 0x6fd02917
mov rdi, qword [rsp + 0xf8]
lea rdx, [rdi - 4]
cmp rdx, 0xc
ja 0x6fd02917
cmp r8, 0xc
je 0x6fd02c70
mov r14, qword [rsp + 0xb0]
xor ecx, ecx
mov rbx, r12
mov qword [rsp + 0xe0], rsi
mov qword [rsp + 0x40], 0
lea rdi, [rsp + 0x40]
mov rsi, r8
mov qword [rsp + 0x48], 0
cmp rsi, 0x10
mov r12d, 0x10
cmovbe r12, rsi
xor eax, eax
jmp 0x6fd028e9
movzx ecx, byte [rdi + rax]
xor cl, byte [rbx + rax]
mov byte [rdi + rax], cl
add rax, 1
cmp r12, rax
jne 0x6fd028e5
mov rdx, rdi
mov rcx, r14
add rbx, r12
call sym.libSFTP.dll_gcmMul
sub rsi, r12
je 0x6fd02930
movzx ecx, byte [rsp + 0x40]
jmp 0x6fd028d3
mov eax, 2
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [r15*8]
shl r15d, 3
mov rbx, rsi
mov qword [rsp + 0x30], 0
mov rcx, rdx
mov rsi, qword [rsp + 0xe0]
mov byte [rsp + 0x3f], r15b
lea r14, [rsp + 0x30]
shr rcx, 0x38
mov byte [rsp + 0x38], cl
mov rcx, rdx
shr rcx, 0x30
mov byte [rsp + 0x39], cl
mov rcx, rdx
shr rcx, 0x28
mov byte [rsp + 0x3a], cl
mov rcx, rdx
shr rcx, 0x20
mov byte [rsp + 0x3b], cl
mov rcx, rdx
shr rcx, 0x18
mov byte [rsp + 0x3c], cl
mov rcx, rdx
shr rdx, 8
shr rcx, 0x10
mov byte [rsp + 0x3e], dl
xor edx, edx
mov byte [rsp + 0x3d], cl
jmp 0x6fd029b5
movzx edx, byte [r14 + rbx]
xor byte [rdi + rbx], dl
add rbx, 1
cmp rbx, 0x10
jne 0x6fd029b0
mov rcx, qword [rsp + 0xb0]
mov rdx, rdi
call sym.libSFTP.dll_gcmMul
mov rax, qword [rsp + 0xb0]
lea rbx, [rsp + 0x50]
mov r8, r14
mov rdx, rdi
mov rcx, qword [rax + 8]
mov rax, qword [rax]
call qword [rax + 0x38]
mov r8, qword [rsp + 0xf8]
mov rdx, r14
mov rcx, qword [rsp + 0xf0]
call sub.msvcrt.dll_memcpy
cmp qword [rsp + 0xd0], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
je 0x6fd02a99
mov r12, qword [rsp + 0xd0]
mov qword [rsp + 0xe0], rsi
lea rbx, [rsp + 0x50]
xor ecx, ecx
mov r15, qword [rsp + 0xb0]
mov rsi, r12
nop word cs:[rax + rax]
cmp rsi, 0x10
mov r12d, 0x10
cmovbe r12, rsi
xor eax, eax
jmp 0x6fd02a66
movzx ecx, byte [rbx + rax]
xor cl, byte [r13 + rax]
mov byte [rbx + rax], cl
add rax, 1
cmp r12, rax
jne 0x6fd02a62
mov rdx, rbx
mov rcx, r15
add r13, r12
call sym.libSFTP.dll_gcmMul
sub rsi, r12
je 0x6fd02a91
movzx ecx, byte [rsp + 0x50]
jmp 0x6fd02a50
mov rsi, qword [rsp + 0xe0]
cmp qword [rsp + 0xe8], 0
je 0x6fd02b50
lea r13, [rdi + 0xb]
mov qword [rsp + 0x28], rdi
mov r12, qword [rsp + 0xe8]
mov rdi, qword [rsp + 0xb0]
cmp r12, 0x10
mov r15d, 0x10
mov edx, 4
cmovbe r15, r12
lea rcx, [rdx + r13]
add byte [rcx], 1
jne 0x6fd02ae3
sub rdx, 1
jne 0x6fd02ad4
mov rax, qword [rdi]
mov r8, r14
mov rcx, qword [rdi + 8]
mov rdx, qword [rsp + 0x28]
call qword [rax + 0x38]
xor eax, eax
nop word [rax + rax]
movzx edx, byte [rbp + rax]
xor dl, byte [r14 + rax]
mov byte [rsi + rax], dl
add rax, 1
cmp r15, rax
jne 0x6fd02b00
xor r15d, r15d
nop dword [rax + rax]
movzx edx, byte [rbx + r15]
xor dl, byte [rsi + r15]
mov byte [rbx + r15], dl
add r15, 1
cmp r15, rax
jne 0x6fd02b20
mov rdx, rbx
mov rcx, rdi
add rbp, r15
call sym.libSFTP.dll_gcmMul
add rsi, r15
sub r12, r15
jne 0x6fd02ac1
mov rax, qword [rsp + 0xd0]
shl rax, 3
mov rcx, rax
shr rcx, 0x38
mov edx, ecx
mov byte [rsp + 0x30], cl
mov rcx, rax
shr rcx, 0x30
mov byte [rsp + 0x31], cl
mov rcx, rax
shr rcx, 0x28
mov byte [rsp + 0x32], cl
mov rcx, rax
shr rcx, 0x20
mov byte [rsp + 0x33], cl
mov rcx, rax
shr rcx, 0x18
mov byte [rsp + 0x34], cl
mov rcx, rax
shr rax, 8
mov byte [rsp + 0x36], al
movzx eax, byte [rsp + 0xd0]
shr rcx, 0x10
mov byte [rsp + 0x35], cl
shl eax, 3
mov byte [rsp + 0x37], al
mov rax, qword [rsp + 0xe8]
shl rax, 3
mov rcx, rax
shr rcx, 0x38
mov byte [rsp + 0x38], cl
mov rcx, rax
shr rcx, 0x30
mov byte [rsp + 0x39], cl
mov rcx, rax
shr rcx, 0x28
mov byte [rsp + 0x3a], cl
mov rcx, rax
shr rcx, 0x20
mov byte [rsp + 0x3b], cl
mov rcx, rax
shr rcx, 0x18
mov byte [rsp + 0x3c], cl
mov rcx, rax
shr rax, 8
mov byte [rsp + 0x3e], al
movzx eax, byte [rsp + 0xe8]
shr rcx, 0x10
mov byte [rsp + 0x3d], cl
shl eax, 3
mov byte [rsp + 0x3f], al
xor eax, eax
jmp 0x6fd02c25
movzx edx, byte [r14 + rax]
xor byte [rbx + rax], dl
add rax, 1
cmp rax, 0x10
jne 0x6fd02c20
mov rcx, qword [rsp + 0xb0]
mov rdx, rbx
call sym.libSFTP.dll_gcmMul
mov rdx, qword [rsp + 0xf0]
xor eax, eax
mov r8, qword [rsp + 0xf8]
movzx ecx, byte [rbx + rax]
xor byte [rdx + rax], cl
add rax, 1
cmp r8, rax
jne 0x6fd02c54
xor eax, eax
jmp 0x6fd02917
mov rax, qword [r12]
mov dword [rsp + 0x4c], 0x1000000
lea rdi, [rsp + 0x40]
lea r14, [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x48], eax
jmp 0x6fd029d2