Function at 0x406620
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
movzx r8d, word [rcx + 2]
mov ebx, r8d
add r8d, 0x1f
mov rsi, rcx
sar r8d, 5
mov r9, rdx
xor edx, edx
shl r8d, 2
cmp byte [rsi], 0
mov rcx, r9
movsxd r8, r8d
je 0x4068c0
call fcn.00417168
mov r9, rax
movzx eax, word [rsi + 6]
test ax, ax
je 0x40673b
movzx ebp, word [rsi + 0x7d8]
lea rdi, [rsi + 0xa]
sub eax, 1
mov edx, 1
movzx r10d, word [rsi + 0x7da]
movzx eax, ax
lea r12, [rsi + rax*2 + 0xc]
lea eax, [rbp - 1]
movzx eax, ax
lea r11, [rsi + rax*2 + 0x7de]
lea eax, [r10 - 1]
movzx eax, ax
lea r8, [rsi + rax*2 + 0xbc4]
test bp, bp
je 0x4066ee
movzx r14d, word [rdi]
lea r13, [rsi + 0x7dc]
movzx ecx, word [r13]
mov r15d, edx
add ecx, r14d
mov eax, ecx
sub eax, ebx
cmp cx, bx
cmovae ecx, eax
add r13, 2
mov eax, ecx
shl r15d, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], r15d
cmp r11, r13
jne 0x4066c0
test r10w, r10w
je 0x40672e
movzx r14d, word [rdi]
lea r13, [rsi + 0xbc2]
nop
movzx ecx, word [r13]
mov r15d, edx
add ecx, r14d
mov eax, ecx
sub eax, ebx
cmp cx, bx
cmovae ecx, eax
add r13, 2
mov eax, ecx
shl r15d, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], r15d
cmp r8, r13
jne 0x406700
add rdi, 2
cmp r12, rdi
jne 0x4066b0
movzx eax, word [rsi + 8]
test ax, ax
je 0x40681b
movzx ebp, word [rsi + 0x7d8]
sub eax, 1
mov edx, 1
movzx r10d, word [rsi + 0x7da]
movzx eax, ax
lea r12, [rsi + rax*2 + 0x3f2]
lea rdi, [rsi + 0x3f0]
lea eax, [rbp - 1]
movzx eax, ax
lea r11, [rsi + rax*2 + 0x7de]
lea eax, [r10 - 1]
movzx eax, ax
lea r8, [rsi + rax*2 + 0xbc4]
nop
test bp, bp
je 0x4067ce
movzx r14d, word [rdi]
lea r13, [rsi + 0x7dc]
movzx ecx, word [r13]
mov r15d, edx
add ecx, r14d
mov eax, ecx
sub eax, ebx
cmp cx, bx
cmovae ecx, eax
add r13, 2
mov eax, ecx
shl r15d, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], r15d
cmp r11, r13
jne 0x4067a0
test r10w, r10w
je 0x40680e
movzx r14d, word [rdi]
lea r13, [rsi + 0xbc2]
nop
movzx ecx, word [r13]
mov r15d, edx
add ecx, r14d
mov eax, ecx
sub eax, ebx
cmp cx, bx
cmovae ecx, eax
add r13, 2
mov eax, ecx
shl r15d, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], r15d
cmp r8, r13
jne 0x4067e0
add rdi, 2
cmp r12, rdi
jne 0x406790
movzx eax, word [rsi + 0xfaa]
test ax, ax
je 0x406860
lea rdx, [rsi + 0xfae]
sub eax, 1
mov r8d, 1
movzx eax, ax
lea r10, [rsi + rax*2 + 0xfb0]
movzx ecx, word [rdx]
mov edi, r8d
add rdx, 2
mov eax, ecx
shl edi, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], edi
cmp r10, rdx
jne 0x406842
movzx eax, word [rsi + 0xfac]
test ax, ax
je 0x4068ae
lea rdx, [rsi + 0x1394]
sub eax, 1
mov r8d, 1
movzx eax, ax
lea r10, [rsi + rax*2 + 0x1396]
nop word [rax + rax]
movzx ecx, word [rdx]
mov esi, r8d
add rdx, 2
mov eax, ecx
shl esi, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], esi
cmp rdx, r10
jne 0x406890
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call fcn.00417168
mov r9, rax
movzx eax, word [rsi + 4]
test ax, ax
je 0x40690e
lea rdx, [rsi + 8]
sub eax, 1
mov r8d, 1
movzx eax, ax
lea r10, [rsi + rax*2 + 0xa]
nop word cs:[rax + rax]
movzx ecx, word [rdx]
mov edi, r8d
add rdx, 2
mov eax, ecx
shl edi, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], edi
cmp r10, rdx
jne 0x4068f0
movzx eax, word [rsi + 6]
test ax, ax
je 0x4068ae
lea rdx, [rsi + 0x3ee]
sub eax, 1
mov r8d, 1
movzx eax, ax
lea r10, [rsi + rax*2 + 0x3f0]
movzx ecx, word [rdx]
mov esi, r8d
add rdx, 2
mov eax, ecx
shl esi, cl
shr ax, 5
movzx eax, ax
xor dword [r9 + rax*4], esi
cmp r10, rdx
jne 0x406932
jmp 0x4068ae