Function at 0x40a6f0
Capabilities:
Encode data using xor

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
call fcn.00409380
cmp eax, 0x41
je 0x40a839
jbe 0x40a830
cmp eax, 0x43
jne 0x40a7a0
lea rsi, [rbx + 0x430]
xor eax, eax
mov ecx, 0x10
mov rdi, rsi
xor edx, edx
mov r8, rsi
rep stosq qword [rdi], rax
lea r9, [rbx + 0x838]
mov rcx, rbx
mov rax, qword [rbx]
call qword [rax]
cmp eax, 6
je 0x40a880
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
mov rax, qword [rax + 0x10]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp rax
cmp eax, 0x61
je 0x40a839
mov eax, dword [rbx + 0x14]
xor edx, edx
mov edi, dword [rbx + 8]
add eax, 1
lea ecx, [rdi + 1]
mov dword [rbx + 0x14], eax
div ecx
cmp eax, dword [rbx + 0xc]
jbe 0x40a871
mov rax, qword [rbx]
mov rcx, rbx
mov byte [rbx + 0x1c], 0
mov r8d, 5
lea rdx, [rbx + 0x42d]
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 [rax + 0x10]
mov rax, qword [rbx]
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, rbx
mov rax, qword [rax]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp rax
cmp eax, 0x18
jne 0x40a7a9
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, 0x20
pop rbx
pop rsi
pop rdi
jmp rax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov r9d, dword [rbx + 0x838]
xor eax, eax
mov r10, r9
add r9, rsi
cmp rsi, r9
je 0x40a8cf
add rsi, 1
movzx edx, byte [rsi - 1]
mov ecx, 8
shl edx, 8
xor eax, edx
nop word cs:[rax + rax]
lea edx, [rax + rax]
lea r8d, [rax + rax]
xor dx, 0x1021
test ax, ax
mov eax, edx
cmovns eax, r8d
sub ecx, 1
jne 0x40a8b0
cmp rsi, r9
jne 0x40a894
mov byte [rbx + 0x1c], 0
lea r8d, [r10 + 5]
mov edx, 1
movzx ecx, ah
mov word [rbx + 0x42d], dx
lea edx, [r10 + 3]
mov qword [rbx + 0x14], 0
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 2
mov byte [rbx + 0x42f], 0xff
mov byte [rbx + rdx + 0x42d], cl
lea edx, [r10 + 4]
mov rcx, rbx
mov byte [rbx + rdx + 0x42d], al
mov rax, qword [rbx]
lea rdx, [rbx + 0x42d]
mov dword [rbx + 0x838], r8d
mov rax, qword [rax + 0x10]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp rax
push rdi
push rbx
sub rsp, 0x28
mov rbx, rcx
call fcn.00409380
cmp eax, 0x41
je 0x40b13e
jbe 0x40b0e9
cmp eax, 0x43
jne 0x40b175
lea r9, [rbx + 0x430]
mov ecx, 0x10
xor eax, eax
lea r10, [rbx + 0x4b0]
mov rdi, r9
rep stosq qword [rdi], rax
add r9, 1
movzx edx, byte [r9 - 1]
mov ecx, 8
shl edx, 8
xor eax, edx
lea edx, [rax + rax]
lea r8d, [rax + rax]
xor dx, 0x1021
test ax, ax
mov eax, edx
cmovns eax, r8d
sub ecx, 1
jne 0x40b064
cmp r10, r9
jne 0x40b051
mov edx, 1
mov byte [rbx + 0x4b1], al
mov rcx, rbx
mov r8d, 0x85
mov word [rbx + 0x42d], dx
movzx edx, ah
mov rax, qword [rbx]
mov byte [rbx + 0x4b0], dl
lea rdx, [rbx + 0x42d]
mov qword [rbx + 0x14], 0
mov byte [rbx + 0x1c], 0
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 5
mov byte [rbx + 0x42f], 0xff
mov dword [rbx + 0x838], 0x85
mov rax, qword [rax + 0x10]
add rsp, 0x28
pop rbx
pop rdi
jmp rax
cmp eax, 0x15
jne 0x40b139
mov rax, qword [rbx]
mov qword [rbx + 0x14], 0
lea rdx, [rbx + 0x42d]
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]
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rdi
jmp rax
cmp eax, 0x18
jne 0x40b17a
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 rdi
jmp rax
cmp eax, 0x61
je 0x40b13e
mov eax, dword [rbx + 0x14]
xor edx, edx
mov edi, dword [rbx + 8]
add eax, 1
lea ecx, [rdi + 1]
mov dword [rbx + 0x14], eax
div ecx
cmp eax, dword [rbx + 0xc]
ja 0x40b19d
test edx, edx
je 0x40b205
add rsp, 0x28
pop rbx
pop rdi
ret
mov rax, qword [rbx]
mov rcx, rbx
mov byte [rbx + 0x1c], 0
mov r8d, 5
lea rdx, [rbx + 0x42d]
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 [rax + 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 rdi
jmp rax
mov rax, qword [rbx]
lea rdx, [rbx + 0x42d]
mov r8d, dword [rbx + 0x838]
mov rax, qword [rax + 0x10]
jmp 0x40b12d
push rbx
sub rsp, 0x20
mov rbx, rcx
call fcn.00409380
cmp eax, 0x18
je 0x40b340
ja 0x40b303
cmp eax, 6
jne 0x40b280
mov rax, qword [rbx]
mov byte [rbx + 0x1c], 0
xor r9d, r9d
xor r8d, r8d
mov qword [rbx + 0x14], 0
mov edx, 2
mov rcx, rbx
mov dword [rbx + 0x20], 0
mov dword [rbx + 0x24], 0
mov rax, qword [rax]
add rsp, 0x20
pop rbx
jmp rax
cmp eax, 0x15
jne 0x40b312
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 0x40b3d0
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, 0x20
pop rbx
jmp rax
cmp eax, 0x43
je 0x40b289
cmp eax, 0x61
je 0x40b340
cmp eax, 0x41
je 0x40b340
mov eax, dword [rbx + 0x14]
mov edx, dword [rbx + 8]
add eax, 1
lea ecx, [rdx + 1]
xor edx, edx
mov dword [rbx + 0x14], eax
div ecx
cmp eax, dword [rbx + 0xc]
ja 0x40b380
test edx, edx
je 0x40b3f0
add rsp, 0x20
pop rbx
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, 0x20
pop rbx
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 0x40b2e7
mov rax, qword [r9 + 0x10]
mov r8d, dword [rbx + 0x838]
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp rax
mov rax, qword [rbx]
lea rdx, [rbx + 0x42d]
mov rax, qword [rax + 0x10]
jmp 0x40b3d4
cmp dword [rcx + 0x24], 4
ja case.default.0x40b417
mov eax, dword [rcx + 0x24]
lea rdx, [0x004256c4]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
jmp fcn.0040acc0
jmp 0x40b010
mov qword [rcx + 0x14], 0
mov byte [rcx + 0x1c], 0
mov dword [rcx + 0x20], 0
mov dword [rcx + 0x24], 1
ret
jmp 0x40a6f0
jmp fcn.0040a940
jmp 0x40b220