Function at 0xb29d20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add eax, ebp
sub eax, dword [esp + 0x48]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x20], eax
cmp eax, ebp
jbe 0xb29fd3
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
lea esi, [eax - 1]
xor edi, edi
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0x1c], esi
jmp 0xb29db7
mov ebx, edi
mov esi, dword [esp + 4]
sub edi, esi
mov ecx, edi
sar ecx, 2
mov dword [esp], ebx
cmp ebx, dword [esp + 8]
je 0xb29e09
mov ebx, dword [esp + 0x38]
mov edi, dword [esp]
mov dword [esi + ecx*4], ebp
add edi, 4
mov dword [ebx + 4], edi
mov esi, dword [esp + 0x1c]
add ebp, esi
inc ebp
cmp ebp, dword [esp + 0x20]
jae 0xb29fd3
test edx, edx
je 0xb29dc0
cmp byte [edx], 0x3f
je 0xb29dcc
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x44]
cmp cl, byte [eax]
jne 0xb29dac
cmp dword [esp + 0x48], 2
jb 0xb29d80
xor ecx, ecx
jmp 0xb29dfc
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x44]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x4c]
jne 0xb29f23
inc ecx
cmp esi, ecx
je 0xb29d80
test edx, edx
je 0xb29de0
cmp byte [edx + ecx + 1], 0x3f
jne 0xb29de0
jmp 0xb29df7
mov dword [esp + 0x10], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov dword [esp + 0x18], ecx
add edx, ecx
cmp edx, eax
ja 0xb29e20
mov edx, eax
mov dword [esp + 8], edx
lea eax, [edx*4]
push eax
call fcn.00af9490
add esp, 4
mov esi, eax
mov edx, dword [esp + 4]
test edx, edx
je 0xb29fab
cmp esi, edx
mov ebx, dword [esp + 0x10]
mov dword [esp + 0xc], esi
jbe 0xb29f2a
lea eax, [edx + ebx]
cmp eax, esi
jbe 0xb29f2a
test ebx, ebx
je 0xb29f9b
mov eax, ebx
or eax, 0xfffffffe
mov ecx, ebx
and ecx, 0xfffffffe
add ecx, eax
mov edx, dword [esp + 4]
lea eax, [edx + ecx]
inc eax
mov ecx, dword [esp + 0xc]
add ecx, ebx
dec ecx
mov esi, edx
not esi
add esi, dword [esp]
mov edx, ebx
and edx, 7
je 0xb29eb6
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
dec edi
cmp edx, edi
jne 0xb29ea0
add eax, edi
add ecx, edi
mov ebx, dword [esp + 0x10]
add ebx, edi
cmp esi, 7
jb 0xb29f9b
neg ebx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, ebx
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
movzx ebx, byte [eax + edx - 1]
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx - 2]
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 3]
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 4]
mov byte [ecx + edx - 4], bl
movzx ebx, byte [eax + edx - 5]
mov byte [ecx + edx - 5], bl
movzx ebx, byte [eax + edx - 6]
mov byte [ecx + edx - 6], bl
movzx ebx, byte [eax + edx - 7]
mov byte [ecx + edx - 7], bl
mov ebx, edi
add edx, 0xfffffff8
cmp edi, edx
jne 0xb29ed0
jmp 0xb29f9b
add ebp, ecx
jmp 0xb29dac
mov ecx, ebx
shr ecx, 2
mov dword [esp], edx
mov eax, esi
mov edi, esi
mov esi, dword [esp]
xchg esi, esi
rep movsd dword es:[edi], dword [esi]
xchg esi, esi
mov ecx, edx
mov edx, ebx
and edx, 0xfffffffc
lea edi, [eax + edx]
mov dword [esp + 0x14], edi
add edx, ecx
mov eax, ebx
and eax, 3
mov ecx, eax
shr ecx, 1
mov dword [esp], edx
mov esi, dword [esp]
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
mov esi, dword [esp + 0x14]
mov ecx, eax
xor ecx, 0xfffffffe
or eax, 1
and eax, ecx
je 0xb29f9b
and ebx, 2
movzx ecx, byte [edx + ebx]
mov byte [esi + ebx], cl
cmp eax, 1
je 0xb29f9b
movzx ecx, byte [edx + ebx + 1]
mov byte [esi + ebx + 1], cl
cmp eax, 2
je 0xb29f9b
movzx eax, byte [edx + ebx + 2]
mov byte [esi + ebx + 2], al
push dword [esp + 4]
call fcn.00af94a0
add esp, 4
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 0x38]
mov dword [ebx], esi
mov ecx, dword [esp + 0x18]
lea edi, [esi + ecx*4]
mov eax, dword [esp + 8]
lea eax, [esi + eax*4]
mov dword [esp + 8], eax
mov dword [ebx + 8], eax
mov dword [esp + 4], esi
mov edx, dword [esp + 0x4c]
jmp 0xb29d9d
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret