Function at 0x404ca1
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
mov edx, esi
add edx, edx
mov dword [esp + 0x10], ecx
push edi
mov edi, dword [esp + 0x28]
mov eax, dword [ecx + edx*8 + 0x1c]
mov ebx, dword [ecx + edx*8 + 0x24]
xor eax, dword [edi]
mov edx, dword [ecx + edx*8 + 0x28]
mov dword [esp + 0x10], eax
lea eax, [esi + 2]
add eax, eax
xor edx, dword [edi + 0xc]
xor ebx, dword [edi + 8]
mov eax, dword [ecx + eax*8]
xor eax, dword [edi + 4]
mov dword [esp + 0x24], eax
mov eax, edx
shr eax, 8
movzx ecx, al
mov eax, ebx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x460520]
xor ecx, dword [eax*4 + 0x460920]
mov eax, dword [esp + 0x24]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x460d20]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x460120]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [edi], ecx
mov dword [esp + 0x1c], ecx
mov ecx, ebx
shr ecx, 0x18
mov ebp, dword [eax*4 + 0x460920]
mov eax, dword [esp + 0x10]
shr eax, 8
xor ebp, dword [ecx*4 + 0x460d20]
mov ecx, edx
movzx eax, al
shr ecx, 0x18
xor ebp, dword [eax*4 + 0x460520]
mov eax, dword [esp + 0x24]
movzx eax, al
xor ebp, dword [eax*4 + 0x460120]
mov eax, dword [esp + 0x24]
shr eax, 8
movzx eax, al
mov dword [edi + 4], ebp
mov ecx, dword [ecx*4 + 0x460d20]
xor ecx, dword [eax*4 + 0x460520]
mov eax, dword [esp + 0x10]
shr eax, 0x10
movzx eax, al
xor ecx, dword [eax*4 + 0x460920]
movzx eax, bl
shr ebx, 8
xor ecx, dword [eax*4 + 0x460120]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], ecx
mov dword [edi + 8], ecx
shr eax, 0x10
movzx eax, al
movzx ecx, bl
mov ecx, dword [ecx*4 + 0x460520]
xor ecx, dword [eax*4 + 0x460920]
mov eax, dword [esp + 0x10]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x460d20]
movzx eax, dl
xor ecx, dword [eax*4 + 0x460120]
mov dword [esp + 0x24], ecx
mov dword [edi + 0xc], ecx
lea eax, [esi - 1]
mov esi, dword [esp + 0x18]
cmp eax, 1
jle 0x404f25
lea edi, [eax + 2]
shl edi, 4
add edi, dword [esp + 0x14]
dec eax
mov dword [esp + 0x18], eax
mov eax, dword [edi - 4]
mov edx, dword [esp + 0x28]
mov ebx, dword [edi]
lea edi, [edi - 0x10]
xor ebx, ebp
xor eax, dword [edx]
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x18]
xor eax, ecx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x10], eax
xor edx, esi
shr eax, 8
movzx ecx, al
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x460520]
xor ecx, dword [eax*4 + 0x460920]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x460d20]
mov eax, dword [esp + 0x24]
movzx eax, al
xor ecx, dword [eax*4 + 0x460120]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], ecx
mov dword [eax], ecx
mov ecx, edx
mov eax, dword [esp + 0x10]
shr eax, 0x10
movzx eax, al
shr ecx, 0x18
mov ebp, dword [eax*4 + 0x460920]
xor ebp, dword [ecx*4 + 0x460d20]
mov eax, dword [esp + 0x24]
shr eax, 8
movzx eax, al
mov ecx, dword [esp + 0x10]
shr ecx, 0x18
xor ebp, dword [eax*4 + 0x460520]
movzx eax, bl
xor ebp, dword [eax*4 + 0x460120]
mov eax, dword [esp + 0x28]
mov dword [eax + 4], ebp
mov eax, ebx
mov esi, dword [ecx*4 + 0x460d20]
shr eax, 8
movzx eax, al
shr ebx, 0x10
xor esi, dword [eax*4 + 0x460520]
mov eax, dword [esp + 0x24]
shr eax, 0x10
movzx eax, al
xor esi, dword [eax*4 + 0x460920]
movzx eax, dl
shr edx, 8
movzx ecx, dl
xor esi, dword [eax*4 + 0x460120]
mov eax, dword [esp + 0x28]
mov dword [eax + 8], esi
mov ecx, dword [ecx*4 + 0x460520]
movzx eax, bl
xor ecx, dword [eax*4 + 0x460920]
mov eax, dword [esp + 0x24]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x460d20]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x460120]
sub dword [esp + 0x18], 1
mov eax, dword [esp + 0x28]
mov dword [eax + 0xc], ecx
jne 0x404df7
mov dword [esp + 0x24], ecx
mov edi, eax
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x2c]
xor eax, dword [esp + 0x1c]
mov ebx, dword [ecx + 0x30]
mov dword [esp + 0x28], eax
xor ebx, ebp
movzx eax, al
mov ebp, ecx
mov al, byte [eax + 0x462120]
mov ecx, dword [ebp + 0x38]
mov edx, dword [ebp + 0x34]
mov byte [edi], al
xor edx, esi
xor ecx, dword [esp + 0x24]
mov eax, ecx
mov esi, dword [esp + 0x28]
shr eax, 8
movzx eax, al
mov al, byte [eax + 0x462120]
mov byte [edi + 1], al
mov eax, edx
shr eax, 0x10
movzx eax, al
mov al, byte [eax + 0x462120]
mov byte [edi + 2], al
mov eax, ebx
shr eax, 0x18
mov al, byte [eax + 0x462120]
mov byte [edi + 3], al
movzx eax, bl
mov al, byte [eax + 0x462120]
mov byte [edi + 4], al
mov eax, esi
shr eax, 8
movzx eax, al
mov al, byte [eax + 0x462120]
mov byte [edi + 5], al
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov al, byte [eax + 0x462120]
mov byte [edi + 6], al
mov eax, edx
shr eax, 0x18
mov al, byte [eax + 0x462120]
mov byte [edi + 7], al
movzx eax, dl
shr edx, 8
mov al, byte [eax + 0x462120]
mov byte [edi + 8], al
mov eax, ebx
shr eax, 8
movzx eax, al
shr ebx, 0x10
mov al, byte [eax + 0x462120]
mov byte [edi + 9], al
mov eax, esi
shr eax, 0x10
movzx eax, al
shr esi, 0x18
mov al, byte [eax + 0x462120]
mov byte [edi + 0xa], al
mov eax, ecx
shr eax, 0x18
mov al, byte [eax + 0x462120]
mov byte [edi + 0xb], al
movzx eax, cl
mov al, byte [eax + 0x462120]
mov byte [edi + 0xc], al
movzx eax, dl
mov al, byte [eax + 0x462120]
mov byte [edi + 0xd], al
movzx eax, bl
mov al, byte [eax + 0x462120]
mov byte [edi + 0xe], al
mov al, byte [esi + 0x462120]
mov byte [edi + 0xf], al
mov eax, dword [ebp + 0x1c]
xor dword [edi], eax
mov eax, dword [ebp + 0x20]
xor dword [edi + 4], eax
mov eax, dword [ebp + 0x24]
xor dword [edi + 8], eax
mov eax, dword [ebp + 0x28]
xor dword [edi + 0xc], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8