Function at 0x140127f40
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 r12d, dword [rsp + 0xf8]
mov ecx, 1
mov rsi, rdx
mov qword [rsp + 0xe0], r8
mov qword [rsp + 0xe8], r9
lea ebx, [rax + 0xf]
mov eax, dword [rsp + 0xf0]
and ebx, 0xfffffff0
imul eax, r12d
mov dword [rsp + 0x3c], eax
lea eax, [rax + rax*2]
lea eax, [rax + r12*2 + 0x10]
lea edx, [rax + rbx]
call fcn.1400ebb00
mov rdi, rax
mov qword [rsp + 0x58], rax
lea rax, str.failed_to_allocate_memory
test rdi, rdi
je 0x1401282ba
mov eax, edi
mov r8d, 0x10
lea rdx, [0x14027d4a0]
neg eax
and eax, 0xf
add rax, rdi
mov qword [rsp + 0x30], rax
mov rcx, rax
call rsi
test eax, eax
jne 0x1401282d0
add rbx, qword [rsp + 0x30]
movsxd rbp, r12d
mov edx, 0x4e
mov r8, rbp
lea rax, [rbx + rbp]
mov rcx, rbx
mov rsi, rax
mov qword [rsp + 0x50], rax
lea r15, [rax + rbp]
call sub.msvcrt.dll_memset
mov r8, rbp
mov edx, 0x4e
mov rcx, rsi
call sub.msvcrt.dll_memset
xor eax, eax
test r12d, r12d
jle 0x14012802d
nop
mov byte [r15 + rax], al
add rax, 1
cmp r12d, eax
jg 0x140128020
movsxd rax, dword [rsp + 0x3c]
lea rsi, [r15 + rax]
mov qword [rsp + 0x68], rax
mov r13, rsi
mov qword [rsp + 0x60], rsi
add r13, rax
cmp rbp, 7
jbe 0x1401282f6
lea r8, [rbp - 8]
xor eax, eax
mov rcx, r8
shr rcx, 3
lea r9, [rcx*8 + 8]
mov rdx, qword [rbx + rax]
xor rdx, qword [r15 + rax]
mov qword [r13 + rax], rdx
add rax, 8
cmp rax, r9
jne 0x140128065
mov rax, r8
neg rcx
and rax, 0xfffffffffffffff8
lea rcx, [r8 + rcx*8]
add rax, 8
lea r9, [r15 + rax]
lea r10, [rbx + rax]
lea r8, [r13 + rax]
xor eax, eax
test rcx, rcx
je 0x1401280b7
movzx edx, byte [r10 + rax]
xor dl, byte [r9 + rax]
mov byte [r8 + rax], dl
add rax, 1
cmp rcx, rax
jne 0x1401280a1
mov rsi, qword [rsp + 0x30]
mov r8, r13
mov rdx, r13
mov rcx, rsi
call qword [rsp + 0xe0]
mov r8, rbp
mov rdx, r13
mov rcx, rbx
call sub.msvcrt.dll_memcpy
mov rdi, qword [rsp + 0x60]
mov r9, r13
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
mov qword [rsp + 0x20], 1
mov r8, rdi
call qword [rsp + 0xe8]
mov r8, rbp
mov rdx, r15
mov rcx, rdi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401282e3
mov rcx, qword [rsp + 0x50]
mov r8, rbp
mov rdx, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401282e3
mov r8, rbp
mov edx, 0x5f
mov rcx, rbx
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x50]
mov edx, 0x5f
mov r8, rbp
call sub.msvcrt.dll_memset
mov edx, dword [rsp + 0x3c]
xor eax, eax
test edx, edx
jle 0x140128258
mov edx, dword [rsp + 0x3c]
nop
mov byte [r15 + rax], al
add rax, 1
cmp edx, eax
jg 0x140128160
lea rdx, [rbp - 8]
mov rsi, r13
mov rdi, r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r13
mov r15d, r12d
mov rax, rdx
shr rax, 3
lea r14, [rax*8 + 8]
neg rax
lea rax, [rdx + rax*8]
mov qword [rsp + 0x40], rax
mov rax, rdx
and rax, 0xfffffffffffffff8
add rax, 8
cmp rbp, 7
lea rcx, [rbx + rax]
mov r13, rax
mov qword [rsp + 0x48], rcx
jbe 0x140128240
nop
xor eax, eax
mov rdx, qword [rbx + rax]
xor rdx, qword [rdi + rax]
mov qword [rsi + rax], rdx
add rax, 8
cmp r14, rax
jne 0x1401281c2
mov r8, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
lea r11, [rdi + r13]
lea r10, [rsi + r13]
xor eax, eax
test rcx, rcx
je 0x140128206
movzx edx, byte [r8 + rax]
xor dl, byte [r11 + rax]
mov byte [r10 + rax], dl
add rax, 1
cmp rcx, rax
jne 0x1401281f0
mov r8, rsi
mov rdx, rsi
mov rcx, qword [rsp + 0x30]
call qword [rsp + 0xe0]
mov rdx, rsi
mov r8, rbp
mov rcx, rbx
call sub.msvcrt.dll_memcpy
add rsi, rbp
add rdi, rbp
cmp dword [rsp + 0x3c], r15d
lea eax, [r15 + r12]
jle 0x14012824e
cmp rbp, 7
mov r15d, eax
ja 0x1401281c0
mov r11, rdi
mov r8, rbx
mov r10, rsi
mov rcx, rbp
jmp 0x1401281e9
mov r15, qword [rsp + 0x70]
mov r13, qword [rsp + 0x78]
movsxd rax, dword [rsp + 0xf0]
mov rdi, qword [rsp + 0x60]
mov r9, r13
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
mov r8, rdi
mov qword [rsp + 0x20], rax
call qword [rsp + 0xe8]
mov r8, qword [rsp + 0x68]
mov rdx, r15
mov rcx, rdi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401282e3
mov rcx, qword [rsp + 0x50]
mov r8, rbp
mov rdx, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
mov rcx, qword [rsp + 0x58]
je 0x140128307
call fcn.1400eba10
lea rax, str.selftest_for_CBC_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 0x1401282ba
mov rcx, qword [rsp + 0x58]
call fcn.1400eba10
lea rax, str.selftest_for_CBC_failed___see_syslog_for_details
jmp 0x1401282ba
mov r9, r15
mov r10, rbx
mov r8, r13
mov rcx, rbp
jmp 0x14012809a
call fcn.1400eba10
xor eax, eax
jmp 0x1401282ba