Function at 0x406450
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 [0x00438040]
mov rdx, qword [0x00438048]
test rax, rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
jne 0x406543
test rdx, rdx
jne 0x406543
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 0x4064da
sub rbx, 1
je 0x406cda
xor ecx, ecx
mov r9d, 2
mov r8d, 0x10
mov rdx, qword [rsp + 0x20]
call qword [0x0043c180]
test eax, eax
jne 0x4064d0
mov rax, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
test rax, rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
jne 0x406520
test rdx, rdx
je 0x4064d0
nop
nop word cs:[rax + rax]
mov rsi, rax
or rsi, rdx
je 0x406ce9
movq xmm0, rax
movq xmm4, rdx
punpcklqdq xmm0, xmm4
movaps xmmword [0x00438040], xmm0
jmp 0x40654d
lea rsi, [rsp + 0x70]
mov qword [rsp + 0x20], rsi
movdqa xmm2, xmmword [0x00438040]
xor r8d, r8d
xor r9d, r9d
xor ecx, ecx
movabs r11, 0xbeac0467eba5facb
movaps xmmword [rsp + 0x50], xmm2
nop dword [rax]
bt r11, rcx
jae 0x40657c
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 0x406570
movabs r11, 0xd86b048b86aa9922
xor ecx, ecx
nop word [rax + rax]
bt r11, rcx
jae 0x4065bc
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 0x4065b0
lea rax, [rsp + 0x48]
movdqa xmm3, xmmword [rsp + 0x50]
xor ecx, ecx
mov esi, 1
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov ebx, 5
movabs r13, 0xaaaaaaaaaaaaaaab
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x50]
mov r12d, 0x68c8c4ad
mov qword [0x00438040], r9
lea rbp, [rsp + 0x40]
mov qword [0x00438048], r8
movaps xmmword [0x00438070], xmm3
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x30], rax
nop dword [rax + rax]
nop word cs:[rax + rax]
mov rax, rsi
imul ebx, ebx, 0x39
mov r8, rsi
mul r13
lea r9d, [rbx + 0x2b]
shr rdx, 1
lea rax, [rdx + rdx*2]
sub r8, rax
mov eax, r9d
imul r12d
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
mov ebx, r9d
je 0x406ae0
cmp r8, 2
je 0x4068e0
test rcx, rcx
mov r14, qword [rsp + 0x20]
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
mov rdi, qword [rsp + 0x28]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x70], 0
je 0x4066f3
cmp ebx, dword [rcx]
jle 0x406880
mov rdx, rcx
mov rcx, rdi
call fcn.00404a90
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rcx, rcx
jne 0x4066d0
lea r15d, [rbx + 1]
xor edx, edx
mov rcx, rdi
call fcn.00404a90
xor edx, edx
mov rcx, r14
call fcn.00404a90
mov rdx, qword [rsp + 0x70]
mov r14, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x30]
test rdx, rdx
je 0x406741
nop
cmp r15d, dword [rdx]
jle 0x4068b0
mov rcx, rdi
call fcn.00404a90
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rdx, rdx
jne 0x406720
xor edx, edx
mov rcx, rdi
call fcn.00404a90
xor edx, edx
mov rcx, r14
call fcn.00404a90
mov r14, qword [rsp + 0x50]
test r14, r14
je 0x406c70
mov rdi, qword [rsp + 0x48]
mov rcx, rbp
test rdi, rdi
je 0x406792
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jge 0x406800
mov rdx, rdi
call fcn.00404a90
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x406770
mov rdx, r14
call fcn.00404a90
mov rdi, qword [rsp + 0x40]
mov rcx, rbp
mov r14, qword [rsp + 0x60]
test rdi, rdi
je 0x4067de
test r14, r14
je 0x406849
nop
nop word cs:[rax + rax]
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jge 0x406830
mov rdx, rdi
call fcn.00404a90
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x4067c0
mov rdx, r14
add rsi, 1
call fcn.00404a90
cmp rsi, 0x7a120
je 0x40685e
mov rcx, qword [rsp + 0x40]
jmp 0x406650
mov rdx, r14
call fcn.00404a90
lea rcx, [r14 + 8]
mov r14, qword [r14 + 8]
test r14, r14
jne 0x406770
mov rdx, rdi
call fcn.00404a90
jmp 0x40679a
mov rdx, r14
call fcn.00404a90
lea rcx, [r14 + 8]
mov r14, qword [r14 + 8]
test r14, r14
jne 0x4067c0
mov rdx, rdi
add rsi, 1
call fcn.00404a90
cmp rsi, 0x7a120
jne 0x4067f3
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rcx
mov rcx, r14
call fcn.00404a90
mov rax, qword [r14]
mov rcx, qword [rax + 8]
lea r14, [rax + 8]
test rcx, rcx
jne 0x4066d0
jmp 0x4066f3
mov rcx, r14
call fcn.00404a90
mov rax, qword [r14]
mov rdx, qword [rax + 8]
lea r14, [rax + 8]
test rdx, rdx
jne 0x406720
jmp 0x406741
test rcx, rcx
mov r14, qword [rsp + 0x28]
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 0x406943
nop dword [rax]
nop word cs:[rax + rax]
cmp ebx, dword [rcx]
jle 0x406ab0
mov rdx, rcx
mov rcx, rdi
call fcn.00404a90
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rcx, rcx
jne 0x406920
lea r15d, [rbx + 1]
xor edx, edx
mov rcx, rdi
call fcn.00404a90
xor edx, edx
mov rcx, r14
call fcn.00404a90
mov rdx, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
test rdx, rdx
je 0x406991
nop
cmp r15d, dword [rdx]
jle 0x406a80
mov rcx, rdi
call fcn.00404a90
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rdx, rdx
jne 0x406970
xor edx, edx
mov rcx, rdi
call fcn.00404a90
mov rcx, r14
xor edx, edx
call fcn.00404a90
mov rdi, qword [rsp + 0x70]
mov rcx, rbp
mov r14, qword [rsp + 0x60]
test rdi, rdi
je 0x4069e2
test r14, r14
je 0x406a69
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jge 0x406a50
mov rdx, rdi
call fcn.00404a90
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x4069c0
mov rdx, r14
call fcn.00404a90
mov rdi, qword [rsp + 0x40]
mov rcx, rbp
mov r14, qword [rsp + 0x50]
test rdi, rdi
je 0x4067de
test r14, r14
je 0x406849
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jge 0x406a34
mov rdx, rdi
call fcn.00404a90
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x4067de
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jl 0x406a12
mov rdx, r14
call fcn.00404a90
lea rcx, [r14 + 8]
mov r14, qword [r14 + 8]
jmp 0x406a00
mov rdx, r14
call fcn.00404a90
lea rcx, [r14 + 8]
mov r14, qword [r14 + 8]
test r14, r14
jne 0x4069c0
mov rdx, rdi
call fcn.00404a90
jmp 0x4069ea
mov rcx, r14
call fcn.00404a90
mov rax, qword [r14]
mov rdx, qword [rax + 8]
lea r14, [rax + 8]
test rdx, rdx
jne 0x406970
jmp 0x406991
mov rdx, rcx
mov rcx, r14
call fcn.00404a90
mov rax, qword [r14]
mov rcx, qword [rax + 8]
lea r14, [rax + 8]
test rcx, rcx
jne 0x406920
jmp 0x406943
test rcx, rcx
mov r14, qword [rsp + 0x28]
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 0x406b43
nop dword [rax]
nop word cs:[rax + rax]
cmp ebx, dword [rcx]
jle 0x406c40
mov rdx, rcx
mov rcx, rdi
call fcn.00404a90
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rcx, rcx
jne 0x406b20
lea r15d, [rbx + 1]
xor edx, edx
mov rcx, rdi
call fcn.00404a90
xor edx, edx
mov rcx, r14
call fcn.00404a90
mov rdx, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
test rdx, rdx
je 0x406b91
nop
cmp r15d, dword [rdx]
jle 0x406c10
mov rcx, rdi
call fcn.00404a90
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rdx, rdx
jne 0x406b70
xor edx, edx
mov rcx, rdi
call fcn.00404a90
mov rcx, r14
xor edx, edx
call fcn.00404a90
mov rdi, qword [rsp + 0x70]
mov rcx, rbp
mov r14, qword [rsp + 0x50]
test rdi, rdi
je 0x4067de
test r14, r14
je 0x406849
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jge 0x406bef
mov rdx, rdi
call fcn.00404a90
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x4067de
mov eax, dword [r14 + 4]
cmp dword [rdi + 4], eax
jl 0x406bcd
mov rdx, r14
call fcn.00404a90
lea rcx, [r14 + 8]
mov r14, qword [r14 + 8]
jmp 0x406bbb
mov rcx, r14
call fcn.00404a90
mov rax, qword [r14]
mov rdx, qword [rax + 8]
lea r14, [rax + 8]
test rdx, rdx
jne 0x406b70
jmp 0x406b91
mov rdx, rcx
mov rcx, r14
call fcn.00404a90
mov rax, qword [r14]
mov rcx, qword [rax + 8]
lea r14, [rax + 8]
test rcx, rcx
jne 0x406b20
jmp 0x406b43
lea rcx, [0x0043c420]
call fcn.004062c0
mov dword [rax], ebx
mov r14, rax
mov rdx, qword [0x00438078]
mov rax, qword [0x00438070]
lea rcx, [rax + rdx]
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 0x406c8f
movq xmm0, rax
movq xmm1, rdx
and ecx, 0x7fffffff
punpcklqdq xmm0, xmm1
movaps xmmword [0x00438070], xmm0
mov dword [r14 + 4], ecx
mov qword [rsp + 0x50], r14
jmp 0x406763
mov rax, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
jmp 0x406520
mov ecx, 2
mov rbx, qword [fcn.004155d0]
call rbx
lea rdx, [0x00418490]
mov rcx, rax
call fcn.00402560
mov ecx, 2
call rbx
lea rdx, [0x004170b6]
mov rcx, rax
call fcn.00402560
mov ecx, 1
call sub.msvcrt.dll_exit_18
nop
nop word [rax + rax]