Function at 0x4aa202
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 4
mov edi, ecx
call fcn.00a87ac7
mov esi, eax
push 4
mov dword [ebp - 0x10], esi
call fcn.00a87ac7
mov ebx, dword [edi + 4]
mov edx, eax
and dword [ebp - 0xc], 0
pop ecx
pop ecx
mov ecx, ebx
mov dword [ebp - 8], edx
shl ecx, 2
test ecx, ecx
jle 0x4aa25b
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub edx, ecx
mov esi, dword [ebp - 0xc]
mov al, byte [edx + ecx]
inc esi
mov byte [ecx], al
inc ecx
mov ebx, dword [edi + 4]
mov eax, ebx
shl eax, 2
cmp esi, eax
jl 0x4aa242
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
mov eax, dword [edi + 8]
shl ebx, 2
inc eax
imul eax, dword [edi]
shl eax, 2
cmp ebx, eax
jge 0x4aa3cb
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffffd
add ecx, ebx
mov dword [ebp - 0xc], ecx
mov al, byte [ecx - 1]
mov byte [esi], al
mov byte [ebp - 2], al
mov al, byte [ecx]
mov byte [esi + 1], al
mov byte [ebp + 0xb], al
mov al, byte [ecx + 1]
mov byte [esi + 2], al
mov cl, byte [ecx + 2]
mov byte [ebp - 1], al
mov eax, ebx
cdq
and edx, 3
mov byte [esi + 3], cl
add eax, edx
sar eax, 2
cdq
idiv dword [edi + 4]
test edx, edx
jne 0x4aa336
mov al, byte [ebp + 0xb]
mov byte [esi], al
mov al, byte [ebp - 1]
mov byte [esi + 1], al
mov al, byte [ebp - 2]
push esi
mov byte [esi + 2], cl
mov byte [esi + 3], al
call fcn.004aa1d8
mov ecx, dword [edi + 4]
mov eax, ebx
shl ecx, 2
cdq
idiv ecx
mov byte [ebp + 0xb], 1
dec eax
mov dword [ebp - 0x14], eax
test eax, eax
jle 0x4aa307
mov dh, byte [ebp + 0xb]
mov esi, eax
mov dl, dh
add dl, dl
mov al, dl
xor al, 0x1b
test dh, dh
movzx ecx, al
movzx eax, dl
cmovns ecx, eax
mov dh, cl
sub esi, 1
jne 0x4aa2e7
mov esi, dword [ebp - 0x10]
mov byte [ebp + 0xb], dh
mov edx, dword [ebp - 8]
mov ecx, esi
mov al, byte [ebp + 0xb]
push 4
mov byte [edx], al
xor eax, eax
mov word [edx + 2], ax
mov byte [edx + 1], al
mov eax, edx
sub eax, esi
mov dword [ebp + 8], eax
mov esi, eax
pop edx
mov al, byte [esi + ecx]
xor byte [ecx], al
inc ecx
sub edx, 1
jne 0x4aa326
mov esi, dword [ebp - 0x10]
jmp 0x4aa347
cmp dword [edi + 4], 6
jle 0x4aa347
cmp edx, 4
jne 0x4aa347
push esi
call fcn.004aa1d8
mov ecx, dword [edi + 4]
mov eax, ebx
shl ecx, 2
sub eax, ecx
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx]
xor al, byte [esi]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 3], al
mov eax, ebx
mov ecx, dword [edi + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx + 1]
xor al, byte [esi + 1]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 4], al
mov eax, ebx
mov ecx, dword [edi + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx + 2]
xor al, byte [esi + 2]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 5], al
mov eax, ebx
mov ecx, dword [edi + 4]
add ebx, 4
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx + 3]
xor al, byte [esi + 3]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 6], al
add ecx, 4
mov eax, dword [edi + 8]
inc eax
mov dword [ebp - 0xc], ecx
imul eax, dword [edi]
shl eax, 2
cmp ebx, eax
jl 0x4aa27b
push edx
call fcn.00a87991
push esi
call fcn.00a87991
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8