Function at 0x40acc0
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
call fcn.00409380
cmp eax, 0x18
je 0x40ae41
ja 0x40ae10
cmp eax, 6
je 0x40ad70
cmp eax, 0x15
jne 0x40ae1a
mov eax, dword [rbx + 0x18]
lea rdx, [rbx + 0x42d]
mov r9, qword [rbx]
add eax, 1
cmp eax, dword [rbx + 0x10]
mov dword [rbx + 0x18], eax
jbe 0x40aed0
mov byte [rbx + 0x1c], 0
mov r8d, 5
mov rcx, rbx
mov qword [rbx + 0x14], 0
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 0
mov dword [rbx + 0x42d], 0x18181818
mov byte [rbx + 0x431], 0x18
mov dword [rbx + 0x838], 5
call qword [r9 + 0x10]
mov rax, qword [rbx]
xor r9d, r9d
xor r8d, r8d
mov edx, 5
mov rcx, rbx
mov rax, qword [rax]
add rsp, 0x28
pop rbx
pop rsi
jmp rax
lea rsi, [rbx + 0x430]
xor edx, edx
mov r8d, 0x400
mov rcx, rsi
call fcn.00417418
mov rax, qword [rbx]
mov edx, 1
mov r8, rsi
lea r9, [rbx + 0x838]
mov rcx, rbx
call qword [rax]
lea rdx, [rbx + 0x42d]
cmp eax, 4
je 0x40aef0
cmp eax, 6
jne 0x40afa5
mov r10d, dword [rbx + 0x838]
xor eax, eax
mov r11, r10
add r10, rsi
nop word cs:[rax + rax]
cmp rsi, r10
je 0x40af30
add rsi, 1
movzx ecx, byte [rsi - 1]
mov r8d, 8
shl ecx, 8
xor eax, ecx
nop dword [rax]
lea ecx, [rax + rax]
lea r9d, [rax + rax]
xor cx, 0x1021
test ax, ax
mov eax, ecx
cmovns eax, r9d
sub r8d, 1
jne 0x40adf0
jmp 0x40add0
cmp eax, 0x41
je 0x40ae41
cmp eax, 0x61
je 0x40ae41
mov eax, dword [rbx + 0x14]
xor edx, edx
mov esi, dword [rbx + 8]
add eax, 1
lea ecx, [rsi + 1]
mov dword [rbx + 0x14], eax
div ecx
cmp eax, dword [rbx + 0xc]
ja 0x40ae80
test edx, edx
je 0x40aff0
add rsp, 0x28
pop rbx
pop rsi
ret
mov rax, qword [rbx]
mov byte [rbx + 0x1c], 0
xor r9d, r9d
xor r8d, r8d
mov qword [rbx + 0x14], 0
mov edx, 3
mov rcx, rbx
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 0
mov rax, qword [rax]
add rsp, 0x28
pop rbx
pop rsi
jmp rax
mov rax, qword [rbx]
mov byte [rbx + 0x1c], 0
mov r8d, 5
mov rcx, rbx
mov qword [rbx + 0x14], 0
lea rdx, [rbx + 0x42d]
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 0
mov dword [rbx + 0x42d], 0x18181818
mov byte [rbx + 0x431], 0x18
mov dword [rbx + 0x838], 5
call qword [rax + 0x10]
jmp 0x40ad4d
mov rax, qword [r9 + 0x10]
mov r8d, dword [rbx + 0x838]
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
jmp rax
mov rax, qword [rbx]
mov qword [rbx + 0x14], 0
mov r8d, 1
mov byte [rbx + 0x1c], 0
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 4
mov byte [rbx + 0x42d], 4
mov dword [rbx + 0x838], 1
mov rax, qword [rax + 0x10]
jmp 0x40aedb
movzx esi, byte [rbx + 0x1c]
cmp r11d, 0x80
mov qword [rbx + 0x14], 0
seta r8b
mov dword [rbx + 0x20], 0
add r8d, 1
mov dword [rbx + 0x24], 3
mov byte [rbx + 0x42d], r8b
lea r8d, [r11 + 5]
lea ecx, [rsi + 1]
movzx esi, ah
mov byte [rbx + 0x1c], cl
mov byte [rbx + 0x42e], cl
not ecx
mov byte [rbx + 0x42f], cl
lea ecx, [r11 + 3]
mov byte [rbx + rcx + 0x42d], sil
lea ecx, [r11 + 4]
mov byte [rbx + rcx + 0x42d], al
mov rax, qword [rbx]
mov dword [rbx + 0x838], r8d
mov rax, qword [rax + 0x10]
jmp 0x40aedb
mov rax, qword [rbx]
mov qword [rbx + 0x14], 0
mov r8d, 5
mov byte [rbx + 0x1c], 0
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 0
mov dword [rbx + 0x42d], 0x18181818
mov byte [rbx + 0x431], 0x18
mov dword [rbx + 0x838], 5
mov rax, qword [rax + 0x10]
jmp 0x40aedb
mov rax, qword [rbx]
lea rdx, [rbx + 0x42d]
mov rax, qword [rax + 0x10]
jmp 0x40aed4