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

Disassembly:
mov edx, dword [esp + 0xc]
push ebp
mov eax, edx
sub eax, 0x80
je 0xaaf23f9
sub eax, 0x40
je 0xaaf23ec
sub eax, 0x40
je 0xaaf23df
mov eax, 1
pop ebp
ret
mov ebp, dword [esp + 8]
mov dword [ebp], 0xe
jmp 0xaaf2404
mov ebp, dword [esp + 8]
mov dword [ebp], 0xc
jmp 0xaaf2404
mov ebp, dword [esp + 8]
mov dword [ebp], 0xa
mov ecx, edx
push ebx
sar ecx, 5
push esi
push edi
test ecx, ecx
lea eax, [ebp + 4]
jle 0xaaf2447
mov edx, dword [esp + 0x18]
mov edi, eax
lea esi, [edx + 2]
xor edx, edx
xor ebx, ebx
mov dh, byte [esi - 2]
mov bl, byte [esi]
mov dl, byte [esi - 1]
add esi, 4
shl edx, 8
or edx, ebx
xor ebx, ebx
mov bl, byte [esi - 3]
add edi, 4
shl edx, 8
or edx, ebx
dec ecx
mov dword [edi - 4], edx
jne 0xaaf241c
mov edx, dword [esp + 0x1c]
mov ecx, edx
sub ecx, 0x80
je 0xaaf25f4
sub ecx, 0x40
je 0xaaf2559
sub ecx, 0x40
jne 0xaaf2676
mov edi, 0xaaf89e0
mov esi, dword [eax + 0x1c]
add edi, 4
mov edx, esi
mov ecx, esi
shr edx, 8
shr ecx, 0x10
and edx, 0xff
and ecx, 0xff
add eax, 0x20
mov ebx, dword [edx*4 + 0xaaf61e0]
mov ecx, dword [ecx*4 + 0xaaf61e0]
xor edx, edx
mov dl, byte [eax - 4]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, esi
shl ecx, 8
shr edx, 0x18
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, dword [edi - 4]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [eax - 0x20]
xor ecx, ebx
xor ecx, edx
mov edx, dword [eax - 0x1c]
mov dword [eax], ecx
xor edx, ecx
mov ecx, dword [eax - 0x18]
mov dword [eax + 4], edx
xor ecx, edx
mov edx, dword [eax - 0x14]
xor edx, ecx
mov dword [eax + 8], ecx
mov ecx, edx
mov ebx, edx
shr ecx, 0x18
mov dword [eax + 0xc], edx
mov ecx, dword [ecx*4 + 0xaaf61e0]
shr ebx, 0x10
shr edx, 8
and ebx, 0xff
and edx, 0xff
shl ecx, 8
xor ecx, dword [ebx*4 + 0xaaf61e0]
mov ebx, dword [edx*4 + 0xaaf61e0]
xor edx, edx
mov dl, byte [eax + 0xc]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, dword [eax - 0x10]
shl ecx, 8
xor ecx, ebx
xor ecx, edx
mov edx, dword [eax - 0xc]
mov dword [eax + 0x10], ecx
xor edx, ecx
mov ecx, dword [eax - 8]
mov dword [eax + 0x14], edx
xor ecx, edx
mov dword [eax + 0x18], ecx
xor ecx, esi
mov dword [eax + 0x1c], ecx
cmp edi, 0xaaf89fc
jl 0xaaf246c
jmp 0xaaf2676
mov edi, 0xaaf89e0
mov esi, dword [eax + 0x14]
add edi, 4
mov edx, esi
mov ecx, esi
shr edx, 8
shr ecx, 0x10
and edx, 0xff
and ecx, 0xff
add eax, 0x18
mov ebx, dword [edx*4 + 0xaaf61e0]
mov ecx, dword [ecx*4 + 0xaaf61e0]
xor edx, edx
mov dl, byte [eax - 4]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, esi
shl ecx, 8
shr edx, 0x18
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, dword [edi - 4]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [eax - 0x18]
xor ecx, ebx
xor ecx, edx
mov edx, dword [eax - 0x14]
mov dword [eax], ecx
xor edx, ecx
mov ecx, dword [eax - 0x10]
mov dword [eax + 4], edx
xor ecx, edx
mov edx, dword [eax - 0xc]
mov dword [eax + 8], ecx
xor edx, ecx
mov ecx, dword [eax - 8]
mov dword [eax + 0xc], edx
xor ecx, edx
xor esi, ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], esi
cmp edi, 0xaaf8a00
jl 0xaaf255e
jmp 0xaaf2676
mov edi, 0xaaf89e0
mov esi, dword [eax + 0xc]
add edi, 4
mov edx, esi
mov ecx, esi
shr edx, 8
shr ecx, 0x10
and edx, 0xff
and ecx, 0xff
add eax, 0x10
mov ebx, dword [edx*4 + 0xaaf61e0]
mov ecx, dword [ecx*4 + 0xaaf61e0]
xor edx, edx
mov dl, byte [eax - 4]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, esi
shl ecx, 8
shr edx, 0x18
xor ecx, ebx
mov ebx, dword [edx*4 + 0xaaf61e0]
mov edx, dword [edi - 4]
shl ecx, 8
xor ecx, ebx
mov ebx, dword [eax - 0x10]
xor ecx, ebx
xor ecx, edx
mov edx, dword [eax - 0xc]
mov dword [eax], ecx
xor edx, ecx
mov ecx, dword [eax - 8]
mov dword [eax + 4], edx
xor ecx, edx
xor esi, ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
cmp edi, 0xaaf8a08
jl 0xaaf25f9
mov edx, dword [ebp]
xor eax, eax
test edx, edx
jl 0xaaf26c9
lea ecx, [ebp + 0x108]
sub edx, eax
add ecx, 0x10
shl edx, 4
mov edx, dword [edx + ebp + 4]
mov dword [ecx - 0x14], edx
mov edx, dword [ebp]
sub edx, eax
shl edx, 4
mov edx, dword [edx + ebp + 8]
mov dword [ecx - 0x10], edx
mov edx, dword [ebp]
sub edx, eax
shl edx, 4
mov edx, dword [edx + ebp + 0xc]
mov dword [ecx - 0xc], edx
mov edx, dword [ebp]
sub edx, eax
inc edx
shl edx, 4
inc eax
mov edx, dword [edx + ebp]
mov dword [ecx - 8], edx
mov edx, dword [ebp]
cmp eax, edx
jle 0xaaf2685
mov ecx, dword [ebp]
mov edx, 1
cmp ecx, edx
lea eax, [ebp + 0x114]
jle 0xaaf2873
mov ecx, dword [eax]
mov edi, ecx
mov esi, ecx
shr edi, 0x10
shr ecx, 8
and edi, 0xff
and ecx, 0xff
shr esi, 0x18
mov edi, dword [edi*4 + 0xaaf61e0]
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov esi, dword [esi*4 + 0xaaf61e0]
mov ebx, dword [edi*4 + 0xaaf7de0]
mov edi, dword [ecx*4 + 0xaaf81e0]
mov esi, dword [esi*4 + 0xaaf79e0]
xor ecx, ecx
mov cl, byte [eax]
xor esi, ebx
xor esi, edi
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov ebx, dword [ecx*4 + 0xaaf85e0]
mov ecx, dword [eax + 4]
xor esi, ebx
mov edi, ecx
mov dword [eax], esi
mov esi, ecx
shr edi, 0x10
shr ecx, 8
and edi, 0xff
and ecx, 0xff
shr esi, 0x18
mov edi, dword [edi*4 + 0xaaf61e0]
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov esi, dword [esi*4 + 0xaaf61e0]
mov ebx, dword [edi*4 + 0xaaf7de0]
mov edi, dword [ecx*4 + 0xaaf81e0]
mov esi, dword [esi*4 + 0xaaf79e0]
xor ecx, ecx
mov cl, byte [eax + 4]
xor esi, ebx
xor esi, edi
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov ebx, dword [ecx*4 + 0xaaf85e0]
mov ecx, dword [eax + 8]
xor esi, ebx
mov edi, ecx
mov dword [eax + 4], esi
mov esi, ecx
shr edi, 0x10
shr ecx, 8
and edi, 0xff
and ecx, 0xff
shr esi, 0x18
mov edi, dword [edi*4 + 0xaaf61e0]
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov esi, dword [esi*4 + 0xaaf61e0]
mov ebx, dword [edi*4 + 0xaaf7de0]
mov edi, dword [ecx*4 + 0xaaf81e0]
mov esi, dword [esi*4 + 0xaaf79e0]
xor ecx, ecx
mov cl, byte [eax + 8]
xor esi, ebx
xor esi, edi
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov ebx, dword [ecx*4 + 0xaaf85e0]
mov ecx, dword [eax + 0xc]
xor esi, ebx
mov edi, ecx
mov dword [eax + 8], esi
mov esi, ecx
shr edi, 0x10
shr esi, 0x18
and edi, 0xff
mov esi, dword [esi*4 + 0xaaf61e0]
mov edi, dword [edi*4 + 0xaaf61e0]
mov esi, dword [esi*4 + 0xaaf79e0]
mov ebx, dword [edi*4 + 0xaaf7de0]
shr ecx, 8
xor esi, ebx
and ecx, 0xff
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov edi, dword [ecx*4 + 0xaaf81e0]
xor ecx, ecx
xor esi, edi
mov cl, byte [eax + 0xc]
add eax, 0x10
mov ecx, dword [ecx*4 + 0xaaf61e0]
mov ebx, dword [ecx*4 + 0xaaf85e0]
xor esi, ebx
inc edx
mov dword [eax - 4], esi
mov ecx, dword [ebp]
cmp edx, ecx
jl 0xaaf26df
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
ret