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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
movzx ecx, byte [eax]
inc eax
movzx esi, byte [eax]
inc eax
shl esi, 0x10
inc eax
shl ecx, 0x18
or ecx, esi
movzx esi, byte [eax - 1]
shl esi, 8
or ecx, esi
movzx esi, byte [eax]
inc eax
inc eax
movzx edi, byte [eax]
or ecx, esi
movzx esi, byte [eax - 1]
shl edi, 0x10
inc eax
shl esi, 0x18
or esi, edi
movzx edi, byte [eax]
inc eax
shl edi, 8
or esi, edi
movzx edi, byte [eax]
xor ecx, dword [ebx + 8]
inc eax
movzx ebp, byte [eax + 1]
or esi, edi
movzx edi, byte [eax]
xor esi, dword [ebx + 0xc]
inc eax
shl ebp, 0x10
inc eax
shl edi, 0x18
or edi, ebp
movzx ebp, byte [eax]
shl ebp, 8
or edi, ebp
movzx ebp, byte [eax + 1]
inc eax
or edi, ebp
xor edi, dword [ebx + 0x10]
movzx ebx, byte [eax + 1]
inc eax
movzx ebp, byte [eax + 1]
inc eax
shl ebp, 0x10
shl ebx, 0x18
or ebx, ebp
movzx ebp, byte [eax + 1]
inc eax
movzx eax, byte [eax + 1]
shl ebp, 8
or ebp, eax
or ebp, ebx
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx + 0x3d0]
xor ebp, dword [ebx + 0x14]
cmp eax, 1
mov dword [esp + 0x1c], eax
jle 0x422722
add ebx, 0x30
dec eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov eax, edi
sar eax, 0x10
and eax, 0xff
mov edx, ebp
sar edx, 8
and edx, 0xff
mov dword [esp + 0x18], eax
mov eax, dword [edx*4 + 0x53bb28]
mov edx, dword [esp + 0x18]
xor eax, dword [edx*4 + 0x53b728]
mov edx, esi
sar edx, 0x18
and edx, 0xff
xor eax, dword [edx*4 + 0x53b328]
mov edx, ecx
and edx, 0xff
xor eax, dword [edx*4 + 0x53bf28]
mov edx, ebp
xor eax, dword [ebx - 4]
sar edx, 0x10
and edx, 0xff
mov edx, dword [edx*4 + 0x53b728]
mov ebx, edi
sar ebx, 0x18
and ebx, 0xff
xor edx, dword [ebx*4 + 0x53b328]
mov ebx, ecx
sar ebx, 8
and ebx, 0xff
xor edx, dword [ebx*4 + 0x53bb28]
mov ebx, esi
and ebx, 0xff
xor edx, dword [ebx*4 + 0x53bf28]
mov ebx, dword [esp + 0x10]
xor edx, dword [ebx]
mov ebx, esi
mov dword [esp + 0x18], edx
sar ebx, 8
mov edx, ebp
sar edx, 0x18
and ebx, 0xff
and edx, 0xff
mov edx, dword [edx*4 + 0x53b328]
xor edx, dword [ebx*4 + 0x53bb28]
mov ebx, ecx
sar ebx, 0x10
and ebx, 0xff
xor edx, dword [ebx*4 + 0x53b728]
mov ebx, edi
sar edi, 8
and edi, 0xff
mov edi, dword [edi*4 + 0x53bb28]
sar esi, 0x10
and esi, 0xff
xor edi, dword [esi*4 + 0x53b728]
sar ecx, 0x18
and ecx, 0xff
xor edi, dword [ecx*4 + 0x53b328]
and ebx, 0xff
xor edx, dword [ebx*4 + 0x53bf28]
mov ebx, dword [esp + 0x10]
xor edx, dword [ebx + 4]
and ebp, 0xff
xor edi, dword [ebp*4 + 0x53bf28]
add ebx, 0x20
xor edi, dword [ebx - 0x28]
sub dword [esp + 0x14], 1
mov ecx, edi
mov edi, dword [esp + 0x18]
mov esi, eax
mov ebp, edx
mov dword [esp + 0x10], ebx
jne 0x4225d0
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
shl eax, 5
lea eax, [eax + ebx + 8]
mov dword [esp + 0x28], eax
mov eax, dword [eax]
mov dword [esp + 0x24], eax
sar eax, 0x18
mov ebx, ecx
sar ebx, 0x18
and ebx, 0xff
xor al, byte [ebx + str.cw]
mov ebx, dword [esp + 0x24]
mov byte [edx], al
sar ebx, 0x10
mov eax, esi
sar eax, 0x10
and eax, 0xff
xor bl, byte [eax + str.cw]
mov eax, edi
sar eax, 8
mov byte [edx + 1], bl
mov ebx, dword [esp + 0x24]
and eax, 0xff
sar ebx, 8
xor bl, byte [eax + str.cw]
mov eax, ebp
and eax, 0xff
mov byte [edx + 2], bl
movzx eax, byte [eax + str.cw]
xor al, byte [esp + 0x24]
mov ebx, esi
mov byte [edx + 3], al
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 4]
mov dword [esp + 0x24], eax
sar eax, 0x18
sar ebx, 0x18
and ebx, 0xff
xor al, byte [ebx + str.cw]
mov ebx, dword [esp + 0x24]
mov byte [edx + 4], al
sar ebx, 0x10
mov eax, edi
sar eax, 0x10
and eax, 0xff
xor bl, byte [eax + str.cw]
mov eax, ebp
mov byte [edx + 5], bl
mov ebx, dword [esp + 0x24]
sar eax, 8
and eax, 0xff
sar ebx, 8
xor bl, byte [eax + str.cw]
mov eax, ecx
and eax, 0xff
mov byte [edx + 6], bl
movzx eax, byte [eax + str.cw]
xor al, byte [esp + 0x24]
mov ebx, edi
mov byte [edx + 7], al
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 8]
mov dword [esp + 0x24], eax
sar ebx, 0x18
sar eax, 0x18
and ebx, 0xff
xor al, byte [ebx + str.cw]
mov ebx, dword [esp + 0x24]
mov byte [edx + 8], al
mov eax, ebp
sar eax, 0x10
and eax, 0xff
sar ebx, 0x10
xor bl, byte [eax + str.cw]
mov eax, ecx
mov byte [edx + 9], bl
mov ebx, dword [esp + 0x24]
sar eax, 8
and eax, 0xff
sar ebx, 8
xor bl, byte [eax + str.cw]
mov byte [edx + 0xa], bl
mov eax, esi
and eax, 0xff
movzx eax, byte [eax + str.cw]
xor al, byte [esp + 0x24]
sar ebp, 0x18
mov byte [edx + 0xb], al
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0xc]
and ebp, 0xff
mov ebx, eax
sar ebx, 0x18
xor bl, byte [ebp + str.cw]
sar ecx, 0x10
mov byte [edx + 0xc], bl
and ecx, 0xff
mov ebx, eax
sar ebx, 0x10
xor bl, byte [ecx + str.cw]
sar esi, 8
and esi, 0xff
mov ecx, eax
sar ecx, 8
mov byte [edx + 0xd], bl
xor cl, byte [esi + str.cw]
and edi, 0xff
mov byte [edx + 0xe], cl
mov cl, byte [edi + str.cw]
pop edi
pop esi
xor cl, al
pop ebp
mov byte [edx + 0xf], cl
pop ebx
add esp, 0x10
ret 8