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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c
call fcn.005e38a0
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x24]
push edi
mov edi, dword [ebp + 0xc]
mov ecx, edi
shld edx, ecx, 5
shl ecx, 5
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], ecx
test edx, edx
jb 0x4af868
ja 0x4af82d
test ecx, ecx
je 0x4af868
movzx ecx, byte [eax]
mov dword [esi], ecx
movzx ecx, byte [eax + 1]
shl ecx, 8
or dword [esi], ecx
movzx ecx, byte [eax + 2]
shl ecx, 0x10
or dword [esi], ecx
movzx ecx, byte [eax + 3]
shl ecx, 0x18
or dword [esi], ecx
add eax, 4
add dword [ebp - 0x10], 1
adc ebx, 0
add esi, 4
cmp ebx, edx
jb 0x4af82d
ja 0x4af868
mov ecx, dword [ebp - 8]
cmp dword [ebp - 0x10], ecx
jb 0x4af82d
mov ebx, dword [ebp + 0x18]
xor eax, eax
mov ecx, 1
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
ja 0x4af8c4
jb 0x4af883
cmp ecx, dword [ebp + 0x14]
jae 0x4af8c4
mov eax, edi
shl eax, 7
mov dword [ebp - 4], eax
jmp 0x4af893
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
push edx
mov ecx, esi
push edi
sub ecx, eax
push ecx
push esi
call fcn.004af480
mov eax, dword [ebp - 0xc]
add esp, 0x10
add dword [ebp - 0x10], 1
adc eax, 0
add esi, dword [ebp - 4]
mov dword [ebp - 0xc], eax
cmp eax, ebx
jb 0x4af890
ja 0x4af8c4
mov edx, dword [ebp + 0x14]
cmp dword [ebp - 0x10], edx
jb 0x4af890
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x1c]
dec ecx
imul ecx, edi
push eax
shl ecx, 7
add ecx, dword [ebp + 0x24]
push edi
push ecx
push esi
call fcn.004af480
xor eax, eax
add esp, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
cmp ebx, eax
jb 0x4af995
ja 0x4af8fe
cmp dword [ebp + 0x14], eax
jbe 0x4af995
mov edx, edi
shl edx, 7
lea eax, [edx + esi - 0x40]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push ebx
push eax
push 0
push edx
call fcn.005edd10
imul eax, edi
shl eax, 7
add eax, dword [ebp + 0x24]
xor ecx, ecx
xor edx, edx
test esi, esi
jb 0x4af961
ja 0x4af939
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4af95e
mov esi, dword [ebp + 0x1c]
mov esi, dword [esi + ecx*4]
xor esi, dword [eax]
mov ebx, dword [ebp + 0x20]
mov dword [ebx + ecx*4], esi
mov esi, dword [ebp - 0x14]
add eax, 4
add ecx, 1
adc edx, 0
cmp edx, esi
jb 0x4af939
ja 0x4af95e
cmp ecx, dword [ebp - 0x18]
jb 0x4af939
mov ebx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
push ecx
push edi
push edx
push eax
call fcn.004af480
mov eax, dword [ebp - 0xc]
add esp, 0x10
add dword [ebp - 0x10], 1
adc eax, 0
mov dword [ebp - 0xc], eax
cmp eax, ebx
jb 0x4af90d
ja 0x4af995
mov ecx, dword [ebp + 0x14]
cmp dword [ebp - 0x10], ecx
jb 0x4af90d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
xor edi, edi
xor esi, esi
test edx, edx
jb 0x4af9e2
ja 0x4af9b0
test ecx, ecx
je 0x4af9e2
lea esp, [esp]
mov ecx, dword [ebp + 0x1c]
mov ecx, dword [ecx + edi*4]
mov byte [eax], cl
mov ebx, ecx
shr ebx, 8
mov byte [eax + 1], bl
mov ebx, ecx
shr ebx, 0x10
shr ecx, 0x18
mov byte [eax + 2], bl
mov byte [eax + 3], cl
add eax, 4
add edi, 1
adc esi, 0
cmp esi, edx
jb 0x4af9b0
ja 0x4af9e2
cmp edi, dword [ebp - 0x18]
jb 0x4af9b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret