Function at 0x406a00
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 rax, qword [0x00536170]
mov rdx, qword [0x00536178]
test rax, rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
jne 0x406af3
test rdx, rdx
jne 0x406af3
lea rax, [rsp + 0x70]
mov ebx, 8
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x20], rax
jmp 0x406a8a
sub rbx, 1
je 0x4070b9
xor ecx, ecx
mov r9d, 2
mov r8d, 0x10
mov rdx, qword [rsp + 0x20]
call qword [0x00539fb0]
test eax, eax
jne 0x406a80
mov rax, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
test rax, rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
jne 0x406ad0
test rdx, rdx
je 0x406a80
nop
nop word cs:[rax + rax]
mov rsi, rdx
or rsi, rax
je 0x4070c8
movq xmm0, rax
movq xmm4, rdx
punpcklqdq xmm0, xmm4
movaps xmmword [0x00536170], xmm0
jmp 0x406afd
lea rsi, [rsp + 0x70]
mov qword [rsp + 0x20], rsi
movdqa xmm2, xmmword [0x00536170]
xor r8d, r8d
xor r9d, r9d
xor ecx, ecx
movabs r11, 0xbeac0467eba5facb
movaps xmmword [rsp + 0x50], xmm2
nop dword [rax]
bt r11, rcx
jae 0x406b2c
xor r9, rax
xor r8, rdx
xor rdx, rax
ror rax, 9
add rcx, 1
mov r10, rdx
xor rax, rdx
ror rdx, 0x1c
shl r10, 0xe
xor rax, r10
cmp rcx, 0x40
jne 0x406b20
movabs r11, 0xd86b048b86aa9922
xor ecx, ecx
nop word [rax + rax]
bt r11, rcx
jae 0x406b6c
xor r9, rax
xor r8, rdx
xor rdx, rax
ror rax, 9
add rcx, 1
mov r10, rdx
xor rax, rdx
ror rdx, 0x1c
shl r10, 0xe
xor rax, r10
cmp rcx, 0x40
jne 0x406b60
lea rax, [rsp + 0x48]
movdqa xmm3, xmmword [rsp + 0x50]
xor ecx, ecx
mov esi, 1
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x60]
mov ebx, 5
movabs r14, 0xaaaaaaaaaaaaaaab
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov r13d, 0x68c8c4ad
mov qword [0x00536170], r9
lea r12, [rsp + 0x40]
mov qword [0x00536178], r8
movaps xmmword [0x005361a0], xmm3
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rax
nop dword [rax + rax]
nop word cs:[rax + rax]
mov rax, rsi
imul ebx, ebx, 0x39
mov r8, rsi
mul r14
lea r9d, [rbx + 0x2b]
shr rdx, 1
lea rax, [rdx + rdx*2]
sub r8, rax
mov eax, r9d
imul r13d
mov eax, r9d
sar eax, 0x1f
sar edx, 0xc
mov ebx, edx
sub ebx, eax
imul ebx, ebx, 0x2717
sub r9d, ebx
cmp r8, 1
lea ebp, [r9 + 1]
mov ebx, r9d
je 0x406db0
cmp r8, 2
je 0x406e60
mov qword [rsp + 0x48], 0
mov r8, qword [rsp + 0x20]
mov qword [rsp + 0x50], 0
mov rdx, qword [rsp + 0x30]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x70], 0
call fcn.0040db30
mov r8, qword [rsp + 0x28]
mov r9d, ebp
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x70]
call fcn.0040db30
mov rbp, qword [rsp + 0x50]
test rbp, rbp
je 0x407050
mov rdi, qword [rsp + 0x48]
mov rcx, r12
test rdi, rdi
je 0x406ce1
nop word cs:[rax + rax]
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x406d80
mov rdx, rdi
call fcn.0040dac0
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x406cc0
mov rdx, rbp
call fcn.0040dac0
mov rdi, qword [rsp + 0x40]
mov rcx, r12
mov rbp, qword [rsp + 0x60]
test rdi, rdi
je 0x406d1d
test rbp, rbp
je 0x406d55
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x406d40
mov rdx, rdi
call fcn.0040dac0
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x406d00
mov rdx, rbp
add rsi, 1
call fcn.0040dac0
cmp rsi, 0x7a120
je 0x406d6a
mov rcx, qword [rsp + 0x40]
jmp 0x406c00
mov rdx, rbp
call fcn.0040dac0
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
test rbp, rbp
jne 0x406d00
mov rdx, rdi
add rsi, 1
call fcn.0040dac0
cmp rsi, 0x7a120
jne 0x406d32
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rbp
call fcn.0040dac0
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
test rbp, rbp
jne 0x406cc0
mov rdx, rdi
call fcn.0040dac0
jmp 0x406ce9
mov qword [rsp + 0x70], 0
mov r8, qword [rsp + 0x30]
mov qword [rsp + 0x60], 0
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
call fcn.0040db30
mov rcx, qword [rsp + 0x48]
mov r9d, ebp
mov r8, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x28]
call fcn.0040db30
mov rdi, qword [rsp + 0x70]
mov rcx, r12
mov rbp, qword [rsp + 0x50]
test rdi, rdi
je 0x406d1d
test rbp, rbp
je 0x406d55
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x406e42
mov rdx, rdi
call fcn.0040dac0
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x406d1d
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jl 0x406e21
mov rdx, rbp
call fcn.0040dac0
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
jmp 0x406e10
test rcx, rcx
mov r15, qword [rsp + 0x30]
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x60], 0
mov rdi, qword [rsp + 0x20]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
je 0x406ec3
nop dword [rax]
nop word cs:[rax + rax]
cmp ebx, dword [rcx]
jle 0x406ff0
mov rdx, rcx
mov rcx, rdi
call fcn.0040dac0
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rcx, rcx
jne 0x406ea0
xor edx, edx
mov rcx, rdi
call fcn.0040dac0
xor edx, edx
mov rcx, r15
call fcn.0040dac0
mov rdx, qword [rsp + 0x48]
mov r15, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x28]
test rdx, rdx
je 0x406f10
nop dword [rax + rax]
cmp dword [rdx], ebp
jge 0x407020
mov rcx, rdi
call fcn.0040dac0
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rdx, rdx
jne 0x406ef0
xor edx, edx
mov rcx, rdi
call fcn.0040dac0
xor edx, edx
mov rcx, r15
call fcn.0040dac0
mov rdi, qword [rsp + 0x70]
mov rcx, r12
mov rbp, qword [rsp + 0x60]
test rdi, rdi
je 0x406f5d
test rbp, rbp
je 0x406fd9
nop
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x406fc0
mov rdx, rdi
call fcn.0040dac0
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x406f40
mov rdx, rbp
call fcn.0040dac0
mov rdi, qword [rsp + 0x40]
mov rcx, r12
mov rbp, qword [rsp + 0x50]
test rdi, rdi
je 0x406d1d
test rbp, rbp
je 0x406d55
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x406fad
mov rdx, rdi
call fcn.0040dac0
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x406d1d
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jl 0x406f8c
mov rdx, rbp
call fcn.0040dac0
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
jmp 0x406f7b
mov rdx, rbp
call fcn.0040dac0
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
test rbp, rbp
jne 0x406f40
mov rdx, rdi
call fcn.0040dac0
jmp 0x406f65
mov rdx, rcx
mov rcx, r15
call fcn.0040dac0
mov rax, qword [r15]
mov rcx, qword [rax + 8]
lea r15, [rax + 8]
test rcx, rcx
jne 0x406ea0
jmp 0x406ec3
mov rcx, r15
call fcn.0040dac0
mov rax, qword [r15]
mov rdx, qword [rax + 8]
lea r15, [rax + 8]
test rdx, rdx
jne 0x406ef0
jmp 0x406f10
lea rcx, [0x0053a1a0]
call fcn.00406870
mov dword [rax], ebx
mov rbp, rax
mov rdx, qword [0x005361a8]
mov rax, qword [0x005361a0]
lea rcx, [rdx + rax]
xor rdx, rax
ror rax, 9
mov r8, rdx
xor rax, rdx
ror rdx, 0x1c
shl r8, 0xe
xor rax, r8
cmp rcx, 0xfffffffffffffffc
ja 0x40706f
movq xmm0, rax
movq xmm1, rdx
and ecx, 0x7fffffff
punpcklqdq xmm0, xmm1
movaps xmmword [0x005361a0], xmm0
mov dword [rbp + 4], ecx
mov qword [rsp + 0x50], rbp
jmp 0x406ca9
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x60]
jmp 0x406ad0
mov ecx, 2
mov rbx, qword [fcn.004146a0]
call rbx
lea rdx, [0x0052b0d0]
mov rcx, rax
call fcn.0040af70
mov ecx, 2
call rbx
lea rdx, [0x0041b001]
mov rcx, rax
call fcn.0040af70
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop word cs:[rax + rax]