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

Disassembly:
sub esp, 0x10
cmp dword [ecx + 4], 0
mov dword [esp + 8], ecx
je 0x41c937
mov eax, dword [esp + 0x14]
movzx edx, byte [eax + 1]
push ebx
inc eax
push ebp
push esi
inc eax
push edi
movzx edi, byte [eax - 2]
shl edx, 0x10
inc eax
shl edi, 0x18
or edi, edx
movzx edx, byte [eax - 1]
shl edx, 8
or edi, edx
movzx edx, byte [eax]
inc eax
movzx esi, byte [eax + 1]
inc eax
or edi, edx
movzx edx, byte [eax - 1]
shl esi, 0x10
inc eax
shl edx, 0x18
or edx, esi
movzx esi, byte [eax]
inc eax
shl esi, 8
or edx, esi
movzx esi, byte [eax]
inc eax
movzx ebx, byte [eax + 1]
or edx, esi
movzx esi, byte [eax]
inc eax
shl ebx, 0x10
inc eax
shl esi, 0x18
or esi, ebx
movzx ebx, byte [eax]
shl ebx, 8
inc eax
xor edi, dword [ecx + 0x1e8]
xor edx, dword [ecx + 0x1ec]
or esi, ebx
movzx ebx, byte [eax]
inc eax
movzx ebp, byte [eax + 1]
or esi, ebx
movzx ebx, byte [eax]
xor esi, dword [ecx + 0x1f0]
inc eax
shl ebp, 0x10
inc eax
shl ebx, 0x18
or ebx, ebp
movzx ebp, byte [eax]
movzx eax, byte [eax + 1]
shl ebp, 8
or ebp, eax
mov eax, dword [ecx + 0x3d0]
or ebp, ebx
xor ebp, dword [ecx + 0x1f4]
cmp eax, 1
mov dword [esp + 0x1c], eax
jle 0x41c783
lea ebx, [ecx + 0x210]
dec eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], eax
mov ecx, ebp
sar ecx, 8
and ecx, 0xff
mov eax, edx
sar eax, 0x18
and eax, 0xff
mov dword [esp + 0x14], eax
mov eax, dword [ecx*4 + 0x47aab8]
mov ecx, dword [esp + 0x14]
xor eax, dword [ecx*4 + 0x47a2b8]
mov ecx, edi
sar ecx, 0x10
and ecx, 0xff
xor eax, dword [ecx*4 + 0x47a6b8]
mov ecx, esi
and ecx, 0xff
xor eax, dword [ecx*4 + 0x47aeb8]
mov ecx, esi
xor eax, dword [ebx - 4]
sar ecx, 0x18
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x47a2b8]
mov ebx, edx
sar ebx, 0x10
and ebx, 0xff
xor ecx, dword [ebx*4 + 0x47a6b8]
mov ebx, edi
sar ebx, 8
and ebx, 0xff
xor ecx, dword [ebx*4 + 0x47aab8]
mov ebx, ebp
and ebx, 0xff
xor ecx, dword [ebx*4 + 0x47aeb8]
mov ebx, dword [esp + 0x24]
xor ecx, dword [ebx]
mov ebx, esi
mov dword [esp + 0x14], ecx
mov ecx, ebp
sar ecx, 0x18
sar ebx, 0x10
and ebx, 0xff
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x47a2b8]
xor ecx, dword [ebx*4 + 0x47a6b8]
sar ebp, 0x10
mov ebx, edx
sar ebx, 8
and ebx, 0xff
xor ecx, dword [ebx*4 + 0x47aab8]
and ebp, 0xff
mov ebp, dword [ebp*4 + 0x47a6b8]
sar esi, 8
mov ebx, edi
and esi, 0xff
xor ebp, dword [esi*4 + 0x47aab8]
mov esi, dword [esp + 0x14]
sar edi, 0x18
and edi, 0xff
xor ebp, dword [edi*4 + 0x47a2b8]
and ebx, 0xff
xor ecx, dword [ebx*4 + 0x47aeb8]
mov ebx, dword [esp + 0x24]
xor ecx, dword [ebx + 4]
and edx, 0xff
xor ebp, dword [edx*4 + 0x47aeb8]
add ebx, 0x20
xor ebp, dword [ebx - 0x28]
sub dword [esp + 0x10], 1
mov edi, ebp
mov edx, eax
mov ebp, ecx
mov dword [esp + 0x24], ebx
jne 0x41c635
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
shl eax, 5
lea ecx, [eax + ecx + 0x1e8]
mov dword [esp + 0x10], ecx
mov ecx, dword [ecx]
mov ebx, ecx
mov dword [esp + 0x24], ecx
sar ebx, 0x18
sar ecx, 0x10
mov eax, edi
sar eax, 0x18
and eax, 0xff
xor bl, byte [eax + 0x4791b8]
mov eax, dword [esp + 0x28]
mov byte [eax], bl
mov ebx, ebp
sar ebx, 0x10
and ebx, 0xff
xor cl, byte [ebx + 0x4791b8]
mov ebx, dword [esp + 0x24]
mov byte [eax + 1], cl
sar ebx, 8
mov ecx, esi
sar ecx, 8
and ecx, 0xff
xor bl, byte [ecx + 0x4791b8]
mov ecx, edx
and ecx, 0xff
mov byte [eax + 2], bl
movzx ecx, byte [ecx + 0x4791b8]
xor cl, byte [esp + 0x24]
mov ebx, edx
mov byte [eax + 3], cl
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x24], ecx
sar ecx, 0x18
sar ebx, 0x18
and ebx, 0xff
xor cl, byte [ebx + 0x4791b8]
mov ebx, dword [esp + 0x24]
mov byte [eax + 4], cl
sar ebx, 0x10
mov ecx, edi
sar ecx, 0x10
and ecx, 0xff
xor bl, byte [ecx + 0x4791b8]
mov ecx, ebp
mov byte [eax + 5], bl
mov ebx, dword [esp + 0x24]
sar ecx, 8
and ecx, 0xff
sar ebx, 8
xor bl, byte [ecx + 0x4791b8]
mov ecx, esi
and ecx, 0xff
mov byte [eax + 6], bl
movzx ecx, byte [ecx + 0x4791b8]
xor cl, byte [esp + 0x24]
mov ebx, esi
mov byte [eax + 7], cl
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x24], ecx
sar ebx, 0x18
sar ecx, 0x18
and ebx, 0xff
xor cl, byte [ebx + 0x4791b8]
mov ebx, dword [esp + 0x24]
mov byte [eax + 8], cl
mov ecx, edx
sar ecx, 0x10
and ecx, 0xff
sar ebx, 0x10
xor bl, byte [ecx + 0x4791b8]
mov ecx, edi
mov byte [eax + 9], bl
mov ebx, dword [esp + 0x24]
sar ecx, 8
and ecx, 0xff
sar ebx, 8
xor bl, byte [ecx + 0x4791b8]
mov byte [eax + 0xa], bl
mov ecx, ebp
and ecx, 0xff
movzx ecx, byte [ecx + 0x4791b8]
xor cl, byte [esp + 0x24]
sar ebp, 0x18
mov byte [eax + 0xb], cl
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 0xc]
and ebp, 0xff
mov ebx, ecx
sar ebx, 0x18
xor bl, byte [ebp + 0x4791b8]
sar esi, 0x10
mov byte [eax + 0xc], bl
and esi, 0xff
mov ebx, ecx
sar ebx, 0x10
xor bl, byte [esi + 0x4791b8]
sar edx, 8
mov byte [eax + 0xd], bl
and edx, 0xff
mov ebx, ecx
sar ebx, 8
xor bl, byte [edx + 0x4791b8]
and edi, 0xff
mov byte [eax + 0xe], bl
mov dl, byte [edi + 0x4791b8]
pop edi
pop esi
xor dl, cl
pop ebp
mov byte [eax + 0xf], dl
pop ebx
add esp, 0x10
ret 8