Function at 0x140040b90
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14049f410]
xor rax, rsp
mov qword [rbp - 8], rax
movsxd r13, edx
mov r15, rcx
mov edx, r8d
lea rcx, [rbp - 0x48]
call fcn.140043b60
nop
lea r14, [r13*2]
xor esi, esi
mov r9, qword [rbp - 0x38]
cmp r9, r14
jae 0x140040ce2
mov rcx, qword [rbp - 0x30]
nop dword [rax]
nop word [rax + rax]
or rdi, 0xffffffffffffffff
cmp r9, rdi
cmovb rdi, r9
mov rax, r9
not rax
cmp rax, rdi
jbe 0x140040cd4
lea rbx, [r9 + rdi]
test rdi, rdi
je 0x140040cbc
cmp rbx, 0xfffffffffffffffe
ja 0x140040cc6
cmp rcx, rbx
jae 0x140040c47
mov r8, r9
mov rdx, rbx
lea rcx, [rbp - 0x48]
call fcn.140004310
jmp 0x140040c60
test rbx, rbx
jne 0x140040c6d
mov qword [rbp - 0x38], rsi
lea rax, [rbp - 0x48]
cmp rcx, 0x10
cmovae rax, qword [rbp - 0x48]
mov byte [rax], sil
mov r9, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x30]
test rbx, rbx
je 0x140040cbc
lea rdx, [rbp - 0x48]
mov r8, qword [rbp - 0x48]
cmp rcx, 0x10
cmovae rdx, r8
lea r10, [rbp - 0x48]
cmovae r10, r8
add r10, r9
test rdi, rdi
je 0x140040ca0
mov r8, rdi
mov rcx, r10
call fcn.1400fd5d8
mov rcx, qword [rbp - 0x30]
mov r8, qword [rbp - 0x48]
mov qword [rbp - 0x38], rbx
lea rax, [rbp - 0x48]
cmp rcx, 0x10
cmovae rax, r8
mov byte [rax + rbx], sil
mov rcx, qword [rbp - 0x30]
mov r9, qword [rbp - 0x38]
cmp r9, r14
jae 0x140040ce2
jmp 0x140040c00
lea rcx, str.string_too_long
call qword [0x1401012f0]
int3
lea rcx, str.string_too_long
call qword [0x1401012f0]
int3
dec r9
mov r8d, 2
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x48]
call fcn.14002fd00
mov rdx, rax
lea rcx, [rbp - 0x48]
call fcn.140015800
mov rax, qword [rbp - 0x10]
cmp rax, 0x10
jb 0x140040d5e
inc rax
mov rcx, qword [rbp - 0x28]
cmp rax, 0x1000
jb 0x140040d59
test cl, 0x1f
je 0x140040d29
call qword [0x140102008]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140040d39
call qword [0x140102008]
int3
sub rcx, rax
cmp rcx, 8
jae 0x140040d49
call qword [0x140102008]
int3
cmp rcx, 0x27
jbe 0x140040d56
call qword [0x140102008]
int3
mov rcx, rax
call fcn.1400fc0d8
lea eax, [r13 + 1]
movsxd rbx, eax
mov rcx, rbx
call qword [0x140101f00]
mov rdi, rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.1400fd5ea
test r13d, r13d
jle 0x140040db4
sub r15, rdi
nop word [rax + rax]
lea rax, [rbp - 0x48]
cmp qword [rbp - 0x30], 0x10
cmovae rax, qword [rbp - 0x48]
lea rcx, [rsi + rdi]
movzx eax, byte [rax + rsi]
xor al, byte [r15 + rcx]
mov byte [rcx], al
inc rsi
cmp rsi, r13
jl 0x140040d90
mov rax, qword [rbp - 0x30]
cmp rax, 0x10
jb 0x140040e0e
inc rax
mov rcx, qword [rbp - 0x48]
cmp rax, 0x1000
jb 0x140040e09
test cl, 0x1f
je 0x140040dd9
call qword [0x140102008]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140040de9
call qword [0x140102008]
int3
sub rcx, rax
cmp rcx, 8
jae 0x140040df9
call qword [0x140102008]
int3
cmp rcx, 0x27
jbe 0x140040e06
call qword [0x140102008]
int3
mov rcx, rax
call fcn.1400fc0d8
mov rax, rdi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400fc4b0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret