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

Disassembly:
push ecx
mov ecx, dword [esp + 8]
push ebx
push ebp
push esi
mov esi, dword [ecx + 0xc]
add esi, 0x10
shl esi, 4
mov esi, dword [esi + ecx]
xor esi, dword [edx]
push edi
mov dword [eax], esi
mov esi, dword [ecx + 0xc]
shl esi, 4
mov esi, dword [esi + ecx + 0x104]
xor esi, dword [edx + 4]
mov dword [eax + 4], esi
mov esi, dword [ecx + 0xc]
shl esi, 4
mov esi, dword [esi + ecx + 0x108]
xor esi, dword [edx + 8]
mov dword [eax + 8], esi
mov esi, dword [ecx + 0xc]
shl esi, 4
mov esi, dword [esi + ecx + 0x10c]
xor esi, dword [edx + 0xc]
mov dword [eax + 0xc], esi
mov edx, dword [ecx + 0xc]
sub edx, 1
test edx, edx
mov dword [esp + 0x10], edx
jle 0x40594f
shl edx, 4
lea ebx, [edx + ecx + 0x104]
mov edi, edi
movzx ecx, byte [eax + 0xd]
mov ecx, dword [ecx*4 + 0x432f30]
movzx edx, byte [eax]
xor ecx, dword [edx*4 + 0x432b30]
movzx edx, byte [eax + 0xa]
xor ecx, dword [edx*4 + 0x433330]
movzx edx, byte [eax + 7]
xor ecx, dword [edx*4 + 0x433730]
movzx edx, byte [eax + 0xe]
mov edx, dword [edx*4 + 0x433330]
movzx esi, byte [eax + 0xb]
xor edx, dword [esi*4 + 0x433730]
movzx esi, byte [eax + 4]
xor edx, dword [esi*4 + 0x432b30]
movzx esi, byte [eax + 1]
xor edx, dword [esi*4 + 0x432f30]
movzx esi, byte [eax + 0xf]
mov esi, dword [esi*4 + 0x433730]
movzx edi, byte [eax + 5]
xor esi, dword [edi*4 + 0x432f30]
movzx edi, byte [eax + 8]
xor esi, dword [edi*4 + 0x432b30]
movzx edi, byte [eax + 2]
xor esi, dword [edi*4 + 0x433330]
movzx edi, byte [eax + 0xc]
mov edi, dword [edi*4 + 0x432b30]
movzx ebp, byte [eax + 3]
xor edi, dword [ebp*4 + 0x433730]
movzx ebp, byte [eax + 9]
xor edi, dword [ebp*4 + 0x432f30]
xor ecx, dword [ebx - 4]
movzx ebp, byte [eax + 6]
xor edi, dword [ebp*4 + 0x433330]
xor edx, dword [ebx]
xor esi, dword [ebx + 4]
xor edi, dword [ebx + 8]
mov dword [eax], ecx
mov ecx, dword [esp + 0x10]
sub ecx, 1
sub ebx, 0x10
test ecx, ecx
mov dword [eax + 4], edx
mov dword [eax + 8], esi
mov dword [eax + 0xc], edi
mov dword [esp + 0x10], ecx
jg 0x405870
mov ecx, dword [esp + 0x18]
movzx edx, byte [eax + 7]
xor ebx, ebx
mov bh, byte [edx + 0x431a10]
movzx edx, byte [eax + 0xa]
mov bl, byte [edx + 0x431a10]
movzx edx, byte [eax + 0xd]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
movzx edx, byte [eax]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
xor ebx, dword [ecx + 0x100]
movzx edx, byte [eax + 0xb]
mov esi, ebx
xor ebx, ebx
mov bh, byte [edx + 0x431a10]
movzx edx, byte [eax + 0xe]
mov bl, byte [edx + 0x431a10]
movzx edx, byte [eax + 1]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 4]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
xor ebx, dword [ecx + 0x104]
movzx edx, byte [eax + 0xf]
mov edi, ebx
xor ebx, ebx
mov bh, byte [edx + 0x431a10]
movzx edx, byte [eax + 2]
mov bl, byte [edx + 0x431a10]
movzx edx, byte [eax + 5]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 8]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
xor ebx, dword [ecx + 0x108]
movzx edx, byte [eax + 3]
mov ebp, ebx
xor ebx, ebx
mov bh, byte [edx + 0x431a10]
movzx edx, byte [eax + 6]
mov bl, byte [edx + 0x431a10]
movzx edx, byte [eax + 9]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 0xc]
movzx edx, byte [edx + 0x431a10]
shl ebx, 8
or ebx, edx
xor ebx, dword [ecx + 0x10c]
mov dword [eax + 4], edi
pop edi
mov dword [eax], esi
pop esi
mov ecx, ebx
mov dword [eax + 8], ebp
pop ebp
mov dword [eax + 0xc], ecx
pop ebx
pop ecx
ret