Function at 0x405850
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov edx, dword [esp + 8]
push ebx
push ebp
push esi
mov eax, dword [edx]
mov esi, dword [edx + 4]
mov edx, eax
push edi
shr edx, 4
mov edi, esi
and edx, 0xf0f0f0f
and edi, 0xf0f0f0f
mov dword [esp + 0x10], 8
xor edx, edi
xor esi, edx
shl edx, 4
xor eax, edx
mov edi, esi
mov edx, eax
and edi, 0xffff
shr edx, 0x10
xor edx, edi
xor esi, edx
shl edx, 0x10
xor eax, edx
mov edx, esi
shr edx, 2
mov edi, eax
and edx, 0x33333333
and edi, 0x33333333
xor edx, edi
xor eax, edx
shl edx, 2
xor esi, edx
mov edi, eax
mov edx, esi
and edi, 0xff00ff
shr edx, 8
and edx, 0xff00ff
xor edx, edi
mov edi, dword [esp + 0x1c]
xor eax, edx
shl edx, 8
xor esi, edx
mov edx, esi
add esi, esi
shr edx, 0x1f
or edx, esi
mov esi, edx
xor esi, eax
and esi, 0xaaaaaaaa
xor eax, esi
xor edx, esi
mov esi, eax
add eax, eax
shr esi, 0x1f
or esi, eax
mov ebp, dword [edi]
mov eax, edx
mov ebx, edx
add edi, 4
shl eax, 0x1c
shr ebx, 4
or eax, ebx
add edi, 4
xor eax, ebp
add edi, 4
mov ebx, eax
mov ebp, eax
shr ebx, 8
and ebx, 0x3f
add edi, 4
shr ebp, 0x10
mov ebx, dword [ecx + ebx*4 + 0x684]
and ebp, 0x3f
or ebx, dword [ecx + ebp*4 + 0x484]
mov ebp, eax
shr ebp, 0x18
and ebp, 0x3f
and eax, 0x3f
or ebx, dword [ecx + ebp*4 + 0x284]
mov ebp, dword [ecx + eax*4 + 0x884]
mov eax, dword [edi - 0xc]
or ebx, ebp
xor eax, edx
mov dword [esp + 0x1c], ebx
mov ebx, eax
shr ebx, 8
mov ebp, eax
and ebx, 0x3f
shr ebp, 0x10
mov ebx, dword [ecx + ebx*4 + 0x784]
and ebp, 0x3f
or ebx, dword [ecx + ebp*4 + 0x584]
mov ebp, eax
shr ebp, 0x18
and ebp, 0x3f
and eax, 0x3f
or ebx, dword [ecx + ebp*4 + 0x384]
mov ebp, dword [ecx + eax*4 + 0x984]
mov eax, dword [esp + 0x1c]
or ebx, ebp
mov ebp, dword [edi - 8]
or ebx, eax
xor esi, ebx
mov eax, esi
mov ebx, esi
shl eax, 0x1c
shr ebx, 4
or eax, ebx
xor eax, ebp
mov ebx, eax
mov ebp, eax
shr ebx, 8
and ebx, 0x3f
shr ebp, 0x10
mov ebx, dword [ecx + ebx*4 + 0x684]
and ebp, 0x3f
or ebx, dword [ecx + ebp*4 + 0x484]
mov ebp, eax
shr ebp, 0x18
and ebp, 0x3f
and eax, 0x3f
or ebx, dword [ecx + ebp*4 + 0x284]
mov ebp, dword [ecx + eax*4 + 0x884]
mov eax, dword [edi - 4]
or ebx, ebp
xor eax, esi
mov dword [esp + 0x1c], ebx
mov ebx, eax
shr ebx, 8
mov ebp, eax
and ebx, 0x3f
shr ebp, 0x10
mov ebx, dword [ecx + ebx*4 + 0x784]
and ebp, 0x3f
or ebx, dword [ecx + ebp*4 + 0x584]
mov ebp, eax
shr ebp, 0x18
and ebp, 0x3f
and eax, 0x3f
or ebx, dword [ecx + ebp*4 + 0x384]
mov ebp, dword [ecx + eax*4 + 0x984]
mov eax, dword [esp + 0x1c]
or ebx, ebp
or ebx, eax
mov eax, dword [esp + 0x10]
xor edx, ebx
dec eax
mov dword [esp + 0x10], eax
jne 0x4058f4
mov eax, edx
pop edi
shl eax, 0x1f
shr edx, 1
or eax, edx
mov ecx, eax
xor ecx, esi
and ecx, 0xaaaaaaaa
xor esi, ecx
xor eax, ecx
mov ecx, esi
shl ecx, 0x1f
shr esi, 1
or ecx, esi
mov esi, eax
mov edx, ecx
and esi, 0xff00ff
shr edx, 8
and edx, 0xff00ff
xor edx, esi
xor eax, edx
shl edx, 8
xor ecx, edx
mov esi, eax
mov edx, ecx
and esi, 0x33333333
shr edx, 2
and edx, 0x33333333
xor edx, esi
xor eax, edx
shl edx, 2
xor ecx, edx
mov edx, eax
mov esi, ecx
shr edx, 0x10
and esi, 0xffff
xor edx, esi
xor ecx, edx
shl edx, 0x10
xor eax, edx
mov esi, ecx
mov edx, eax
and esi, 0xf0f0f0f
shr edx, 4
and edx, 0xf0f0f0f
xor edx, esi
mov esi, edx
shl esi, 4
xor esi, eax
mov eax, dword [esp + 0x14]
xor edx, ecx
mov dword [eax], esi
pop esi
pop ebp
mov dword [eax + 4], edx
pop ebx
pop ecx
ret 8