Function at 0x416110
Capabilities:
Encode data using add xor sub operations
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0x28]
movzx edx, byte [eax + 1]
add eax, 1
shl edx, 0x10
add eax, 1
movzx ecx, byte [eax - 2]
shl ecx, 0x18
or ecx, edx
xor edx, edx
mov dh, byte [eax]
add eax, 1
movzx esi, byte [eax + 1]
add eax, 1
add eax, 1
or ecx, edx
movzx edx, byte [eax - 2]
or ecx, edx
movzx edx, byte [eax]
shl esi, 0x18
shl edx, 0x10
or esi, edx
add eax, 1
xor edx, edx
mov dh, byte [eax]
add eax, 1
add eax, 1
add eax, 1
xor ebx, ebx
mov bh, byte [eax + 1]
add eax, 1
or esi, edx
movzx edx, byte [eax - 3]
or esi, edx
xor esi, dword [edi + 0xc]
movzx edx, byte [eax - 2]
mov dword [esp + 0x28], esi
movzx esi, byte [eax - 1]
shl esi, 0x10
shl edx, 0x18
or edx, esi
movzx esi, byte [eax + 1]
or edx, ebx
add eax, 1
or edx, esi
movzx esi, byte [eax + 1]
add eax, 1
movzx ebx, byte [eax + 1]
add eax, 1
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0x10]
shl ebx, 0x10
shl esi, 0x18
or esi, ebx
xor ebx, ebx
mov bh, byte [eax + 1]
add eax, 1
mov bl, byte [eax + 1]
or ebx, esi
xor ebx, dword [edi + 0x14]
mov esi, dword [edi + 0x3d0]
cmp esi, 1
mov eax, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], esi
jle 0x416332
add edi, 0x30
add esi, 0xffffffff
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], esi
mov edi, edx
sar edi, 0x10
and edi, 0xff
movzx esi, ah
mov esi, dword [esi*4 + 0x4ab250]
xor esi, dword [edi*4 + 0x4aae50]
mov edi, dword [esp + 0x28]
sar edi, 0x18
and edi, 0xff
xor esi, dword [edi*4 + 0x4aaa50]
mov edi, ecx
and edi, 0xff
xor esi, dword [edi*4 + 0x4ab650]
mov edi, dword [esp + 0x10]
xor esi, dword [edi - 4]
movzx ebp, byte [esp + 0x29]
mov ebx, edx
sar ebx, 0x18
and ebx, 0xff
mov edi, eax
sar edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x4aae50]
xor edi, dword [ebx*4 + 0x4aaa50]
movzx ebx, ch
xor edi, dword [ebx*4 + 0x4ab250]
mov ebx, dword [esp + 0x28]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x4ab650]
mov ebx, dword [esp + 0x10]
xor edi, dword [ebx]
mov ebx, eax
sar ebx, 0x18
and ebx, 0xff
mov dword [esp + 0x18], ebp
mov ebp, dword [ebx*4 + 0x4aaa50]
mov ebx, dword [esp + 0x18]
xor ebp, dword [ebx*4 + 0x4ab250]
mov ebx, ecx
sar ebx, 0x10
and ebx, 0xff
xor ebp, dword [ebx*4 + 0x4aae50]
mov ebx, edx
and ebx, 0xff
xor ebp, dword [ebx*4 + 0x4ab650]
mov ebx, dword [esp + 0x10]
xor ebp, dword [ebx + 4]
mov ebx, dword [esp + 0x28]
movzx edx, dh
mov edx, dword [edx*4 + 0x4ab250]
sar ebx, 0x10
and ebx, 0xff
xor edx, dword [ebx*4 + 0x4aae50]
mov ebx, dword [esp + 0x10]
sar ecx, 0x18
and ecx, 0xff
xor edx, dword [ecx*4 + 0x4aaa50]
and eax, 0xff
xor edx, dword [eax*4 + 0x4ab650]
add ebx, 0x20
xor edx, dword [ebx - 0x28]
sub dword [esp + 0x14], 1
mov ecx, edx
mov dword [esp + 0x28], esi
mov edx, edi
mov eax, ebp
mov dword [esp + 0x10], ebx
jne 0x4161f0
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x14], eax
mov ebx, ecx
sar ebx, 0x18
and ebx, 0xff
mov dword [esp + 0x20], ecx
shl esi, 5
lea edi, [esi + edi + 8]
mov esi, dword [edi]
mov ecx, esi
sar ecx, 0x18
xor cl, byte [ebx + str.cw]
mov ebx, dword [esp + 0x28]
sar ebx, 0x10
and ebx, 0xff
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x2c]
mov byte [esi], cl
mov ecx, dword [esp + 0x10]
sar ecx, 0x10
xor cl, byte [ebx + str.cw]
movzx ebx, dh
mov byte [esi + 1], cl
mov ecx, dword [esp + 0x10]
sar ecx, 8
xor cl, byte [ebx + str.cw]
mov ebx, dword [esp + 0x28]
mov byte [esi + 2], cl
sar ebx, 0x18
and ebx, 0xff
and eax, 0xff
mov al, byte [eax + str.cw]
xor al, byte [esp + 0x10]
mov dword [esp + 0x2c], edx
mov byte [esi + 3], al
mov eax, dword [edi + 4]
mov ecx, eax
sar ecx, 0x18
xor cl, byte [ebx + str.cw]
mov ebx, edx
sar ebx, 0x10
and ebx, 0xff
mov byte [esi + 4], cl
mov ecx, eax
sar ecx, 0x10
xor cl, byte [ebx + str.cw]
movzx ebx, byte [esp + 0x15]
mov byte [esi + 5], cl
mov ecx, eax
sar ecx, 8
xor cl, byte [ebx + str.cw]
mov byte [esi + 6], cl
mov ecx, dword [esp + 0x20]
mov ebx, ecx
and ebx, 0xff
movzx ebx, byte [ebx + str.cw]
xor bl, al
mov byte [esi + 7], bl
mov eax, dword [edi + 8]
mov ebx, edx
sar ebx, 0x18
and ebx, 0xff
mov edx, eax
sar edx, 0x18
xor dl, byte [ebx + str.cw]
mov ebx, dword [esp + 0x14]
mov byte [esi + 8], dl
sar ebx, 0x10
and ebx, 0xff
mov edx, eax
sar edx, 0x10
xor dl, byte [ebx + str.cw]
movzx ebx, ch
mov byte [esi + 9], dl
mov edx, eax
sar edx, 8
xor dl, byte [ebx + str.cw]
mov ebx, dword [esp + 0x28]
and ebx, 0xff
mov byte [esi + 0xa], dl
movzx ebx, byte [ebx + str.cw]
xor bl, al
mov byte [esi + 0xb], bl
mov edi, dword [edi + 0xc]
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
sar ebp, 0x18
mov eax, edi
and ebp, 0xff
sar eax, 0x18
xor al, byte [ebp + str.cw]
sar ecx, 0x10
mov byte [esi + 0xc], al
mov eax, edi
and ecx, 0xff
mov ebx, eax
sar ebx, 0x10
xor bl, byte [ecx + str.cw]
movzx ecx, byte [esp + 0x29]
mov byte [esi + 0xd], bl
mov ebx, eax
sar ebx, 8
xor bl, byte [ecx + str.cw]
and edx, 0xff
mov byte [esi + 0xe], bl
mov dl, byte [edx + str.cw]
mov dword [esp + 0x10], edi
pop edi
xor dl, al
mov byte [esi + 0xf], dl
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 8