Function at 0x403d32
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
movzx eax, word [0xaa1df8]
mov ecx, 0x1641
push ebx
mov ebx, dword [0xaa1e14]
push ebp
push esi
mov esi, dword [esp + 0x38]
push edi
mov edi, dword [esp + 0x38]
mov ebp, edi
mov dword [esp + 0x38], edi
mov eax, dword [esi + eax*4]
mov dword [esp + 0x20], eax
movzx eax, byte [0xaa1dfa]
mov dword [esp + 0x10], eax
mov eax, dword [esi + ebx*8]
xor eax, 0x190d
mov dword [esp + 0x1c], 0x1882
mov dword [esp + 0x28], eax
mov eax, dword [0xaa1e00]
cdq
idiv ecx
mov eax, dword [esi + 0x1f40]
dec ebx
mov ecx, dword [0xaa1e30]
mov dword [esp + 0x24], eax
mov eax, dword [0xaa1e0c]
mov dword [0xaa1e14], ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
movzx eax, word [eax + ebx*2]
cdq
idiv dword [esi + ecx*8]
mov ecx, dword [0xaa1e00]
lea eax, [edi + 1]
or dword [esp + 0x14], ecx
add eax, eax
imul ecx, edi, 0xc
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x30], edx
xor edx, edx
mov esi, dword [esi + eax*8]
mov eax, ebx
div dword [ecx + edi]
mov eax, dword [0xaa1e20]
mov ecx, ebp
mov edi, edx
movzx eax, word [eax + ecx*8]
or eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
movzx ecx, word [eax]
mov eax, dword [0xaa1de4]
movzx ecx, word [eax + ecx*2]
mov eax, dword [0xaa1e24]
or eax, 0x1d97
cdq
idiv ecx
mov ecx, 0xffff
xor edx, edx
xor ebx, eax
mov ax, word [0xaa1df8]
add ax, cx
mov dword [0xaa1e14], ebx
mov ecx, dword [esp + 0x10]
mov ebx, ebp
mov word [0xaa1df8], ax
movzx eax, ax
movzx ecx, word [ecx + eax*4]
mov eax, dword [0xaa1df0]
imul ecx, dword [eax + 0x5e38]
mov eax, 0x2bd
mov dword [esi + ebx*4], ecx
movzx ecx, byte [ebp + 0x19e]
div ecx
or eax, dword [0xaa1de8]
sub eax, dword [ebx*4 + 0x17a3]
mov dword [ebx*4 + 0x17a3], eax
mov eax, dword [esp + 0x14]
mov edx, dword [0xaa1e18]
imul ecx, dword [eax], 3
mov eax, dword [0xaa1dec]
mov esi, dword [esp + 0x3c]
movzx eax, byte [ecx + eax]
mov ecx, dword [esp + 0x10]
imul eax, eax, 0x5f
sub al, byte [0xaa1e24]
xor byte [edx + ebx - 1], al
movzx eax, word [ecx]
movzx ecx, word [ecx + 0x2dae]
sub ecx, dword [edi + eax*4]
imul eax, ebx, 0xc
mov dword [eax + esi], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add ecx, 2
inc ebx
mov dword [esp + 0x10], ecx
movzx eax, word [eax + 0x2000]
mov ebp, dword [esi + ebx*4]
cmp ebp, eax
jg 0x403f28
mov edi, ebx
shl edi, 4
add edi, esi
mov esi, ecx
movzx edx, word [esi]
lea edi, [edi - 0x10]
mov ecx, dword [0xaa1df0]
mov eax, ebp
xor eax, dword [esp + 0x2c]
mov esi, 0x110
or dword [ecx + edx*4], eax
dec ebx
mov ecx, dword [esp + 0x1c]
mov eax, ecx
cdq
idiv esi
mov esi, dword [esp + 0x14]
cdq
idiv dword [esi + ebx*4]
movzx eax, byte [0xaa1dfb]
mov esi, dword [esp + 0x10]
or edx, eax
sub edx, dword [edi]
dec ecx
mov eax, dword [esp + 0x18]
mov dword [edi], edx
and dword [0xaa1de4], ecx
inc ebp
mov dword [esp + 0x1c], ecx
movzx eax, word [eax + 0x2000]
cmp ebp, eax
jle 0x403ec8
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
dec ebx
mov edi, dword [esi + ebx*4]
cmp edi, dword [esp + 0x28]
jb 0x403ff6
mov eax, dword [esp + 0x20]
mov ebp, edi
shl ebp, 4
add ebp, dword [esp + 0x30]
lea edx, [eax + ebx*4]
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x20]
mov dword [esp + 0x3c], eax
movzx eax, word [ecx]
sub edx, 4
mov dword [esp + 0x38], edx
mov ax, word [ecx + eax*2]
mov ecx, 0x1362
xor ax, bx
xor ax, cx
and word [0xaa1df8], ax
mov eax, dword [esp + 0x24]
movzx ecx, byte [edi + eax]
mov eax, dword [esp + 0x18]
movzx eax, word [eax + 0x4de]
xor ecx, eax
movzx eax, byte [0xaa1dfb]
imul ecx, eax
mov eax, edi
xor eax, 0xb03
cdq
sub ecx, dword [esi + ebx*8]
mov dword [esi + ebx*8], ecx
lea ecx, [esi + edi*4]
idiv dword [ecx]
mov eax, dword [esp + 0x38]
dec ebx
mov dword [ecx], edx
mov ecx, dword [esp + 0x3c]
mov edx, dword [0xaa1e14]
movzx ecx, byte [ecx + eax]
and ecx, dword [eax]
mov eax, dword [esp + 0x10]
movzx eax, word [eax]
xor ecx, dword [esi + eax*8]
mov eax, edi
xor dword [esi + edx*4], ecx
xor eax, ebx
xor dword [ebp], eax
mov eax, edi
mov ecx, dword [0xaa1e24]
lea ebp, [ebp + 0x10]
sub eax, dword [0xaa1e00]
mov edx, dword [esp + 0x38]
add dword [esi + ecx*4], eax
inc edi
mov ecx, dword [esp + 0x10]
cmp edi, dword [esp + 0x28]
jae 0x403f52
mov eax, dword [esi + ebx*4 - 4]
pop edi
pop esi
pop ebp
xor eax, 0x14b9
pop ebx
add esp, 0x24
ret