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

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x20]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
mov ecx, dword [esi + 0x10]
xor ecx, dword [eax]
mov edx, dword [esi + 0x14]
xor edx, dword [eax + 4]
mov ebx, dword [esi + 0x1c]
xor ebx, dword [eax + 0xc]
mov dword [esp + 0xc], ecx
mov ecx, dword [esi + 0x18]
xor ecx, dword [eax + 8]
mov eax, ecx
mov dword [esp + 0x10], ecx
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov ebp, dword [esi]
add esi, 0x20
mov ecx, dword [ecx*4 + 0x464180]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
mov eax, dword [esp + 0xc]
movzx eax, al
xor ecx, dword [eax*4 + 0x463980]
mov eax, ebx
xor ecx, dword [esi]
shr eax, 0x10
mov dword [esp + 0x18], ecx
movzx ecx, al
mov eax, dword [esp + 0x10]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x464180]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, dword [esp + 0xc]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
movzx eax, dl
xor ecx, dword [eax*4 + 0x463980]
mov eax, ebx
xor ecx, dword [esi + 4]
shr eax, 8
mov dword [esp + 0x2c], ecx
movzx ecx, al
mov eax, dword [esp + 0xc]
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x463d80]
xor ecx, dword [eax*4 + 0x464180]
mov eax, edx
shr eax, 0x18
shr edx, 0x10
xor ecx, dword [eax*4 + 0x464580]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x463980]
xor ecx, dword [esi + 8]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x24], ecx
shr eax, 8
movzx eax, al
movzx ecx, dl
mov ecx, dword [ecx*4 + 0x464180]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, dword [esp + 0x10]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
movzx eax, bl
xor ecx, dword [eax*4 + 0x463980]
xor ecx, dword [esi + 0xc]
sub ebp, 1
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], ebp
je 0x402d7d
push edi
mov eax, dword [esp + 0x28]
shr eax, 0x10
movzx ecx, al
mov ebx, dword [esp + 0x30]
mov eax, ebx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x464180]
mov ebp, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, ebp
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
movzx eax, dl
xor ecx, dword [eax*4 + 0x463980]
mov eax, ebp
xor ecx, dword [esi + 0x10]
shr eax, 0x10
mov dword [esp + 0x14], ecx
movzx ecx, al
mov eax, dword [esp + 0x28]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x464180]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
movzx eax, bl
xor ecx, dword [eax*4 + 0x463980]
mov eax, ebp
xor ecx, dword [esi + 0x14]
shr eax, 8
mov dword [esp + 0x18], ecx
movzx ecx, al
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ebx, dword [ecx*4 + 0x463d80]
mov ecx, dword [esp + 0x30]
xor ebx, dword [eax*4 + 0x464180]
mov eax, ecx
shr eax, 0x18
shr ecx, 0x10
movzx ecx, cl
xor ebx, dword [eax*4 + 0x464580]
mov eax, dword [esp + 0x28]
movzx eax, al
xor ebx, dword [eax*4 + 0x463980]
xor ebx, dword [esi + 0x18]
movzx eax, dl
mov edx, dword [ecx*4 + 0x464180]
xor edx, dword [eax*4 + 0x463d80]
mov eax, dword [esp + 0x28]
shr eax, 0x18
xor edx, dword [eax*4 + 0x464580]
mov eax, ebp
movzx eax, al
xor edx, dword [eax*4 + 0x463980]
mov eax, ebx
xor edx, dword [esi + 0x1c]
add esi, 0x20
shr eax, 0x10
movzx ecx, al
mov eax, dword [esp + 0x18]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x464180]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ecx, dword [eax*4 + 0x463980]
mov eax, edx
xor ecx, dword [esi]
mov dword [esp + 0x1c], ecx
shr eax, 0x10
movzx ecx, al
mov eax, ebx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x464180]
xor ecx, dword [eax*4 + 0x463d80]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x464580]
mov eax, dword [esp + 0x18]
movzx eax, al
xor ecx, dword [eax*4 + 0x463980]
mov eax, edx
xor ecx, dword [esi + 4]
shr eax, 8
mov dword [esp + 0x30], ecx
movzx ecx, al
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x463d80]
xor ecx, dword [eax*4 + 0x464180]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
mov eax, ecx
mov edi, dword [esp + 0x28]
shr eax, 0x18
shr ecx, 0x10
movzx ecx, cl
xor edi, dword [eax*4 + 0x464580]
movzx eax, bl
mov ecx, dword [ecx*4 + 0x464180]
shr ebx, 0x18
xor edi, dword [eax*4 + 0x463980]
mov eax, edi
mov dword [esp + 0x28], edi
xor eax, dword [esi + 8]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x463d80]
xor ecx, dword [ebx*4 + 0x464580]
movzx eax, dl
xor ecx, dword [eax*4 + 0x463980]
xor ecx, dword [esi + 0xc]
sub dword [esp + 0x20], 1
mov dword [esp + 0x10], ecx
jne 0x402b69
pop edi
mov eax, ecx
mov ebx, dword [esp + 0x18]
shr eax, 0x18
mov edx, dword [esp + 0x28]
movzx ecx, byte [eax + str.cw]
mov eax, dword [esp + 0x24]
shr eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0x2c]
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0xc]
xor ecx, dword [esi + 0x10]
shr eax, 0x10
movzx eax, al
mov dword [edx], ecx
movzx ecx, byte [eax + str.cw]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + str.cw]
shl eax, 8
or ecx, eax
mov eax, dword [esp + 0x24]
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0x2c]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0x2c]
xor ecx, dword [esi + 0x14]
shr eax, 0x18
mov dword [edx + 4], ecx
movzx ecx, byte [eax + str.cw]
mov eax, ebx
shr eax, 0x10
movzx eax, al
shl ecx, 8
shr ebx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0xc]
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0x24]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0x24]
xor ecx, dword [esi + 0x18]
shr eax, 0x18
mov dword [edx + 8], ecx
movzx ecx, byte [eax + str.cw]
mov eax, dword [esp + 0x2c]
shr eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, dword [esp + 0xc]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
xor ecx, dword [esi + 0x1c]
pop esi
pop ebp
mov dword [edx + 0xc], ecx
pop ebx
add esp, 0x14
ret 0xc