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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
sub eax, 0x80
push esi
je 0x40a845
sub eax, 0x40
je 0x40a83a
sub eax, 0x40
je 0x40a82f
or eax, 0xffffffff
jmp 0x40aa87
mov esi, dword [ebp + 8]
mov dword [esi], 0xe
jmp 0x40a84e
mov esi, dword [ebp + 8]
mov dword [esi], 0xc
jmp 0x40a84e
mov esi, dword [ebp + 8]
mov dword [esi], 0xa
mov ecx, dword [ebp + 0x10]
push ebx
sar ecx, 5
push edi
lea eax, [esi + 8]
xor edi, edi
test ecx, ecx
mov dword [esi + 4], eax
mov dword [ebp + 0x10], ecx
jle 0x40a890
mov ecx, dword [ebp + 0xc]
add ecx, 2
movzx ebx, byte [ecx - 1]
xor edx, edx
mov dh, byte [ecx + 1]
mov dl, byte [ecx]
add ecx, 4
shl edx, 8
or edx, ebx
movzx ebx, byte [ecx - 6]
shl edx, 8
or edx, ebx
mov dword [eax + edi*4], edx
inc edi
cmp edi, dword [ebp + 0x10]
jl 0x40a86b
mov esi, dword [esi]
sub esi, 0xa
je 0x40aa12
dec esi
dec esi
je 0x40a988
dec esi
dec esi
jne 0x40aa83
mov dword [ebp + 0x10], 0x418220
mov esi, 0xff
mov ebx, dword [eax + 0x1c]
xor edx, edx
mov ecx, ebx
and ecx, esi
mov dh, byte [ecx + str.cw]
movzx ecx, byte [eax + 0x1f]
movzx ecx, byte [ecx + str.cw]
xor edx, ecx
movzx ecx, byte [eax + 0x1e]
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
movzx ecx, byte [eax + 0x1d]
movzx ecx, byte [ecx + str.cw]
mov edi, dword [eax + 8]
shl edx, 8
xor edx, ecx
xor edx, dword [eax]
mov dword [ebp - 4], ebx
mov ecx, edx
mov edx, dword [ebp + 0x10]
xor ecx, dword [edx]
mov edx, dword [eax + 4]
xor edx, ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [eax + 0xc]
xor edi, edx
xor ecx, edi
mov dword [eax + 0x2c], ecx
mov dword [eax + 0x24], edx
movzx edx, byte [eax + 0x2f]
xor ebx, ebx
mov dword [eax + 0x28], edi
mov bh, byte [edx + str.cw]
movzx edx, byte [eax + 0x2e]
movzx edx, byte [edx + str.cw]
xor ebx, edx
movzx edx, byte [eax + 0x2d]
movzx edx, byte [edx + str.cw]
add dword [ebp + 0x10], 4
and ecx, esi
movzx ecx, byte [ecx + str.cw]
shl ebx, 8
xor ebx, edx
mov edx, dword [eax + 0x14]
shl ebx, 8
xor ecx, ebx
xor ecx, dword [eax + 0x10]
mov ebx, dword [ebp - 4]
xor edx, ecx
mov dword [eax + 0x30], ecx
mov ecx, dword [eax + 0x18]
xor ecx, edx
mov dword [eax + 0x38], ecx
xor ecx, ebx
mov dword [eax + 0x34], edx
mov dword [eax + 0x3c], ecx
add eax, 0x20
cmp dword [ebp + 0x10], 0x41823c
jl 0x40a8b7
jmp 0x40aa83
mov ebx, 0x418220
mov esi, 0xff
mov ecx, dword [eax + 0x14]
mov edx, ecx
and edx, esi
mov dword [ebp + 0x10], ecx
xor ecx, ecx
mov ch, byte [edx + str.cw]
movzx edx, byte [eax + 0x17]
movzx edx, byte [edx + str.cw]
xor ecx, edx
movzx edx, byte [eax + 0x16]
movzx edx, byte [edx + str.cw]
mov edi, dword [eax + 4]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0x15]
movzx edx, byte [edx + str.cw]
shl ecx, 8
xor ecx, edx
xor ecx, dword [ebx]
add ebx, 4
mov edx, ecx
xor edx, dword [eax]
mov ecx, dword [ebp + 0x10]
xor edi, edx
mov dword [eax + 0x18], edx
mov edx, dword [eax + 8]
xor edx, edi
mov dword [eax + 0x1c], edi
mov edi, dword [eax + 0xc]
xor edi, edx
mov dword [eax + 0x20], edx
mov edx, dword [eax + 0x10]
xor edx, edi
xor ecx, edx
mov dword [eax + 0x24], edi
mov dword [eax + 0x28], edx
mov dword [eax + 0x2c], ecx
add eax, 0x18
cmp ebx, 0x418240
jl 0x40a992
jmp 0x40aa83
mov ebx, 0x418220
mov esi, 0xff
mov edi, dword [eax + 0xc]
xor edx, edx
mov ecx, edi
and ecx, esi
mov dh, byte [ecx + str.cw]
movzx ecx, byte [eax + 0xf]
movzx ecx, byte [ecx + str.cw]
xor edx, ecx
movzx ecx, byte [eax + 0xe]
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
movzx ecx, byte [eax + 0xd]
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
xor edx, dword [eax]
add eax, 0x10
mov ecx, edx
xor ecx, dword [ebx]
mov edx, dword [eax - 0xc]
xor edx, ecx
mov dword [eax], ecx
mov ecx, dword [eax - 8]
xor ecx, edx
mov dword [eax + 8], ecx
xor ecx, edi
mov dword [eax + 4], edx
mov dword [eax + 0xc], ecx
add ebx, 4
cmp ebx, 0x418248
jl 0x40aa1c
pop edi
xor eax, eax
pop ebx
pop esi
leave
ret