Function at 0x140128310
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov eax, dword [rsp + 0x100]
mov ecx, dword [rsp + 0xf8]
mov rbx, rdx
mov qword [rsp + 0xe0], r8
mov qword [rsp + 0xe8], r9
lea edi, [rax + 0xf]
mov eax, dword [rsp + 0xf8]
imul eax, dword [rsp + 0xf0]
and edi, 0xfffffff0
mov dword [rsp + 0x3c], eax
lea eax, [rax + rax*2]
lea eax, [rax + rcx*2 + 0x10]
mov ecx, 1
lea edx, [rax + rdi]
call fcn.1400ebb00
mov rsi, rax
mov qword [rsp + 0x58], rax
lea rax, str.failed_to_allocate_memory
test rsi, rsi
je 0x1401286ab
mov eax, esi
mov r8d, 0x10
lea rdx, [0x14027d490]
neg eax
and eax, 0xf
add rax, rsi
mov qword [rsp + 0x30], rax
mov rcx, rax
call rbx
test eax, eax
jne 0x1401286c0
movsxd r13, dword [rsp + 0xf8]
add rdi, qword [rsp + 0x30]
mov edx, 0xd3
lea rax, [rdi + r13]
mov r8, r13
mov rcx, rdi
mov rsi, rax
mov qword [rsp + 0x50], rax
lea r15, [rax + r13]
call sub.msvcrt.dll_memset
mov edx, 0xd3
mov rcx, rsi
mov r8, r13
call sub.msvcrt.dll_memset
mov ecx, dword [rsp + 0xf8]
xor eax, eax
mov edx, dword [rsp + 0xf8]
test ecx, ecx
jle 0x14012840f
mov byte [r15 + rax], al
add rax, 1
cmp edx, eax
jg 0x140128403
movsxd rax, dword [rsp + 0x3c]
mov r8, rdi
lea rcx, [r15 + rax]
mov qword [rsp + 0x68], rax
mov r14, rcx
mov qword [rsp + 0x60], rcx
mov rcx, qword [rsp + 0x30]
add r14, rax
mov rdx, r14
call qword [rsp + 0xe0]
cmp r13, 7
jbe 0x1401286f4
lea r8, [r13 - 8]
xor eax, eax
mov rcx, r8
shr rcx, 3
lea r9, [rcx*8 + 8]
nop dword [rax]
mov rdx, qword [r15 + rax]
xor rdx, qword [r14 + rax]
mov qword [r14 + rax], rdx
mov qword [rdi + rax], rdx
add rax, 8
cmp rax, r9
jne 0x140128460
mov rax, r8
neg rcx
and rax, 0xfffffffffffffff8
lea r8, [r8 + rcx*8]
add rax, 8
lea r11, [r15 + rax]
lea rcx, [r14 + rax]
lea r9, [rdi + rax]
xor eax, eax
test r8, r8
je 0x1401284b8
nop
movzx edx, byte [r11 + rax]
xor dl, byte [rcx + rax]
mov byte [rcx + rax], dl
mov byte [r9 + rax], dl
add rax, 1
cmp r8, rax
jne 0x1401284a0
mov rsi, qword [rsp + 0x60]
mov r9, r14
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], 1
mov r8, rsi
call qword [rsp + 0xe8]
mov r8, r13
mov rdx, r15
mov rcx, rsi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401286d3
mov rcx, qword [rsp + 0x50]
mov r8, r13
mov rdx, rdi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401286d3
mov r8, r13
mov edx, 0xe6
mov rcx, rdi
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x50]
mov edx, 0xe6
mov r8, r13
call sub.msvcrt.dll_memset
mov edx, dword [rsp + 0x3c]
xor eax, eax
test edx, edx
jle 0x140128649
mov edx, dword [rsp + 0x3c]
nop
mov byte [r15 + rax], al
add rax, 1
cmp edx, eax
jg 0x140128540
lea rdx, [r13 - 8]
mov r9d, dword [rsp + 0xf8]
mov rbx, r14
mov rbp, r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r14
mov rax, rdx
shr rax, 3
mov r15d, r9d
lea r12, [rax*8 + 8]
neg rax
lea rax, [rdx + rax*8]
mov qword [rsp + 0x40], rax
mov rax, rdx
and rax, 0xfffffffffffffff8
add rax, 8
lea rcx, [rdi + rax]
mov r14, rax
mov qword [rsp + 0x48], rcx
mov rcx, r12
mov r12, r13
mov r13, rcx
nop word cs:[rax + rax]
mov r8, rdi
mov rdx, rbx
mov rcx, qword [rsp + 0x30]
call qword [rsp + 0xe0]
cmp r12, 7
mov rsi, rbx
jbe 0x1401286e6
xor eax, eax
mov rdx, qword [rbp + rax]
xor rdx, qword [rbx + rax]
mov qword [rbx + rax], rdx
mov qword [rdi + rax], rdx
add rax, 8
cmp rax, r13
jne 0x1401285d1
mov r11, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
lea r8, [rbp + r14]
lea rsi, [rbx + r14]
xor eax, eax
test rcx, rcx
je 0x14012861d
movzx edx, byte [r8 + rax]
xor dl, byte [rsi + rax]
mov byte [rsi + rax], dl
mov byte [r11 + rax], dl
add rax, 1
cmp rcx, rax
jne 0x140128605
mov eax, dword [rsp + 0xf8]
add rbx, r12
add rbp, r12
add eax, r15d
cmp dword [rsp + 0x3c], r15d
jle 0x14012863c
mov r15d, eax
jmp 0x1401285b0
mov r15, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
mov r13, r12
movsxd rax, dword [rsp + 0xf0]
mov rsi, qword [rsp + 0x60]
mov r9, r14
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
mov r8, rsi
mov qword [rsp + 0x20], rax
call qword [rsp + 0xe8]
mov r8, qword [rsp + 0x68]
mov rdx, r15
mov rcx, rsi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401286d3
mov rcx, qword [rsp + 0x50]
mov r8, r13
mov rdx, rdi
call sub.msvcrt.dll_memcmp
test eax, eax
mov rcx, qword [rsp + 0x58]
je 0x140128705
call fcn.1400eba10
lea rax, str.selftest_for_CFB_failed___see_syslog_for_details
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x58]
call fcn.1400eba10
lea rax, str.setkey_failed
jmp 0x1401286ab
mov rcx, qword [rsp + 0x58]
call fcn.1400eba10
lea rax, str.selftest_for_CFB_failed___see_syslog_for_details
jmp 0x1401286ab
mov r8, rbp
mov r11, rdi
mov rcx, r12
jmp 0x1401285fe
mov r11, r15
mov rcx, r14
mov r9, rdi
mov r8, r13
jmp 0x140128497
call fcn.1400eba10
xor eax, eax
jmp 0x1401286ab