Function at 0x4aec97
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x24]
shld ecx, eax, 5
push esi
mov esi, dword [ebp + 8]
shl eax, 5
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
movlpd qword [ebp - 0x18], xmm0
push edi
mov edi, esi
test ecx, ecx
jb 0x4aed28
ja 0x4aeccd
test eax, eax
je 0x4aed28
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
movzx eax, byte [edi]
lea edi, [edi + 4]
mov dword [ebx], eax
movzx edx, byte [edi - 3]
shl edx, 8
or edx, eax
mov dword [ebx], edx
movzx ecx, byte [edi - 2]
shl ecx, 0x10
or ecx, edx
mov dword [ebx], ecx
movzx eax, byte [edi - 1]
shl eax, 0x18
or eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebx], eax
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
adc ecx, 0
add ebx, 4
mov dword [ebp - 0x10], ecx
cmp ecx, dword [ebp - 8]
jb 0x4aecdc
ja 0x4aed25
cmp eax, esi
jb 0x4aecdc
mov esi, dword [ebp + 8]
xor edi, edi
xor eax, eax
inc edi
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp + 0x18]
ja 0x4aed7d
jb 0x4aed3c
cmp edi, dword [ebp + 0x14]
jae 0x4aed7d
mov eax, dword [ebp + 0xc]
mov esi, eax
mov dword [ebp - 0xc], eax
shl esi, 7
push dword [ebp + 0x10]
mov eax, ebx
push dword [ebp + 0xc]
sub eax, esi
push eax
push ebx
call fcn.004aebab
mov eax, dword [ebp - 0x10]
add esp, 0x10
add edi, 1
adc eax, 0
add ebx, esi
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp + 0x18]
jb 0x4aed47
ja 0x4aed75
cmp edi, dword [ebp + 0x14]
jb 0x4aed47
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
jmp 0x4aed83
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
mov ebx, dword [ebp + 0x14]
mov eax, ebx
push dword [ebp + 0x10]
shl eax, 7
push dword [ebp + 0xc]
add eax, 0xffffff80
imul eax, edi
add eax, dword [ebp + 0x24]
push eax
push dword [ebp + 0x1c]
call fcn.004aebab
add esp, 0x10
xorps xmm0, xmm0
cmp dword [ebp + 0x18], 0
movlpd qword [ebp - 0x18], xmm0
jb 0x4aee85
ja 0x4aedc2
test ebx, ebx
je 0x4aee85
mov eax, dword [ebp - 0x14]
mov ecx, edi
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
shl ecx, 7
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x14], eax
push dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
push ebx
push 0
push dword [ecx + eax - 0x40]
call fcn.00547890
mov ecx, eax
xorps xmm0, xmm0
imul ecx, esi
movlpd qword [ebp - 0x28], xmm0
shl ecx, 7
add ecx, dword [ebp + 0x24]
cmp dword [ebp - 8], 0
jb 0x4aee44
ja 0x4aee0d
test edi, edi
je 0x4aee44
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + edx*4]
xor eax, dword [ecx]
lea ecx, [ecx + 4]
mov edi, dword [ebp + 0x20]
mov dword [edi + edx*4], eax
add edx, 1
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
adc eax, 0
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 8]
jb 0x4aee19
ja 0x4aee41
cmp edx, edi
jb 0x4aee19
mov esi, dword [ebp - 0xc]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
call fcn.004aebab
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov ecx, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x14], eax
adc ecx, 0
cmp ecx, dword [ebp + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x20]
jb 0x4aeddc
ja 0x4aee80
cmp eax, ebx
jb 0x4aeddc
mov esi, dword [ebp + 8]
jmp 0x4aee88
mov edi, dword [ebp - 4]
cmp dword [ebp - 8], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
jb 0x4aeed4
ja 0x4aee9c
test edi, edi
je 0x4aeed4
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + edx*4]
mov eax, ecx
shr eax, 8
mov byte [esi], cl
lea esi, [esi + 4]
mov byte [esi - 3], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
add edx, 1
mov byte [esi - 2], al
adc ebx, 0
mov byte [esi - 1], cl
cmp ebx, dword [ebp - 8]
jb 0x4aeea2
ja 0x4aeed4
cmp edx, edi
jb 0x4aeea2
pop edi
pop esi
pop ebx
leave
ret