Function at 0x406c40
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax + 4]
push ebx
push ebp
push edi
mov edi, dword [eax]
mov edx, 2
mov ebx, ecx
lea eax, [edx - 2]
and eax, 7
add ecx, dword [esi + eax*4]
mov eax, ecx
shr eax, 0x18
and eax, 0xf
movzx eax, byte [eax + 0x420028]
mov ebp, ecx
shr ebp, 0x1c
movzx ebp, byte [ebp + 0x420038]
shl ebp, 4
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0x14
and ebp, 0xf
movzx ebp, byte [ebp + 0x420018]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0x10
and ebp, 0xf
movzx ebp, byte [ebp + 0x420008]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0xc
and ebp, 0xf
movzx ebp, byte [ebp + 0x41fff8]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 8
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffe8]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 4
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffd8]
or eax, ebp
shl eax, 4
and ecx, 0xf
movzx ecx, byte [ecx + 0x41ffc8]
or eax, ecx
rol eax, 0xb
xor eax, edi
mov edi, eax
lea ecx, [edx - 1]
and ecx, 7
mov ecx, dword [esi + ecx*4]
add ecx, eax
mov eax, ecx
shr eax, 0x18
and eax, 0xf
movzx eax, byte [eax + 0x420028]
mov ebp, ecx
shr ebp, 0x1c
movzx ebp, byte [ebp + 0x420038]
shl ebp, 4
or eax, ebp
mov ebp, ecx
shr ebp, 0x14
and ebp, 0xf
movzx ebp, byte [ebp + 0x420018]
shl eax, 4
or eax, ebp
mov ebp, ecx
shr ebp, 0x10
and ebp, 0xf
movzx ebp, byte [ebp + 0x420008]
shl eax, 4
or eax, ebp
mov ebp, ecx
shr ebp, 0xc
and ebp, 0xf
movzx ebp, byte [ebp + 0x41fff8]
shl eax, 4
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 8
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffe8]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 4
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffd8]
or eax, ebp
shl eax, 4
and ecx, 0xf
movzx ecx, byte [ecx + 0x41ffc8]
or eax, ecx
rol eax, 0xb
xor eax, ebx
mov ebx, eax
mov ecx, edx
and ecx, 7
mov ecx, dword [esi + ecx*4]
add ecx, eax
mov eax, ecx
shr eax, 0x18
and eax, 0xf
movzx eax, byte [eax + 0x420028]
mov ebp, ecx
shr ebp, 0x1c
movzx ebp, byte [ebp + 0x420038]
shl ebp, 4
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0x14
and ebp, 0xf
movzx ebp, byte [ebp + 0x420018]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0x10
and ebp, 0xf
movzx ebp, byte [ebp + 0x420008]
or eax, ebp
mov ebp, ecx
shr ebp, 0xc
and ebp, 0xf
movzx ebp, byte [ebp + 0x41fff8]
shl eax, 4
or eax, ebp
mov ebp, ecx
shr ebp, 8
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffe8]
shl eax, 4
or eax, ebp
mov ebp, ecx
shr ebp, 4
shl eax, 4
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffd8]
or eax, ebp
and ecx, 0xf
movzx ecx, byte [ecx + 0x41ffc8]
shl eax, 4
or eax, ecx
rol eax, 0xb
xor eax, edi
lea ecx, [edx + 1]
and ecx, 7
mov ecx, dword [esi + ecx*4]
add ecx, eax
mov edi, eax
mov ebp, ecx
shr ebp, 0x1c
movzx ebp, byte [ebp + 0x420038]
mov eax, ecx
shr eax, 0x18
and eax, 0xf
movzx eax, byte [eax + 0x420028]
shl ebp, 4
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0x14
and ebp, 0xf
movzx ebp, byte [ebp + 0x420018]
or eax, ebp
shl eax, 4
mov ebp, ecx
shr ebp, 0x10
and ebp, 0xf
movzx ebp, byte [ebp + 0x420008]
or eax, ebp
mov ebp, ecx
shr ebp, 0xc
and ebp, 0xf
movzx ebp, byte [ebp + 0x41fff8]
shl eax, 4
or eax, ebp
mov ebp, ecx
shr ebp, 8
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffe8]
shl eax, 4
or eax, ebp
mov ebp, ecx
shr ebp, 4
and ebp, 0xf
movzx ebp, byte [ebp + 0x41ffd8]
shl eax, 4
and ecx, 0xf
movzx ecx, byte [ecx + 0x41ffc8]
or eax, ebp
shl eax, 4
or eax, ecx
rol eax, 0xb
xor eax, ebx
add edx, 4
lea ebx, [edx - 2]
cmp ebx, 0x10
mov ecx, eax
jl 0x406c51
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], edi
pop edi
pop ebp
mov dword [ecx], eax
pop ebx
ret