Function at 0x29b70a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
add eax, ebp
sub eax, dword [esp + 0x4c]
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [ebx + 8], 0
mov dword [esp + 0x24], eax
cmp eax, ebp
jbe 0x29b73c7
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x4c]
lea esi, [eax - 1]
xor eax, eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0x20], esi
jmp 0x29b7133
mov esi, ebx
mov ebx, eax
mov edi, dword [esp + 8]
sub ebx, edi
mov edx, ebx
sar edx, 2
cmp eax, dword [esp + 4]
je 0x29b7189
mov dword [edi + edx*4], ebp
add eax, 4
mov dword [esi + 4], eax
mov edx, dword [esp + 0x20]
add ebp, edx
mov ebx, esi
mov esi, edx
inc ebp
cmp ebp, dword [esp + 0x24]
jae 0x29b73c7
test ecx, ecx
je 0x29b713c
cmp byte [ecx], 0x3f
je 0x29b7148
movzx edx, byte [ebp]
mov edi, dword [esp + 0x48]
cmp dl, byte [edi]
jne 0x29b7128
cmp dword [esp + 0x4c], 2
jb 0x29b7100
xor edx, edx
jmp 0x29b717c
movzx ecx, byte [ebp + edx + 1]
mov edi, dword [esp + 0x48]
cmp cl, byte [edi + edx + 1]
mov ecx, dword [esp + 0x50]
jne 0x29b727f
inc edx
cmp esi, edx
je 0x29b7100
test ecx, ecx
je 0x29b7160
cmp byte [ecx + edx + 1], 0x3f
jne 0x29b7160
jmp 0x29b7177
mov dword [esp], ebx
lea eax, [edx + 1]
mov ecx, edx
shr ecx, 1
mov dword [esp + 0x1c], edx
add ecx, edx
cmp ecx, eax
cmovbe ecx, eax
mov dword [esp + 4], ecx
lea eax, [ecx*4]
push eax
call fcn.02989550
add esp, 4
mov ebx, eax
test edi, edi
je 0x29b72e7
cmp ebx, edi
mov edx, dword [esp]
mov dword [esp + 0x14], ebx
jbe 0x29b7286
lea eax, [edi + edx]
cmp eax, ebx
jbe 0x29b7286
test edx, edx
je 0x29b72d3
mov ebx, edx
mov eax, dword [esp + 8]
lea esi, [eax + edx]
dec esi
mov ecx, dword [esp + 0x14]
add edx, ecx
dec edx
cmp ebx, 4
jae 0x29b730d
mov eax, esi
mov ecx, edx
mov esi, ebx
lea edx, [esi - 1]
mov ebx, esi
and ebx, 7
je 0x29b7221
mov dword [esp], edx
xor edi, edi
nop dword [eax]
movzx edx, byte [eax]
dec eax
mov byte [ecx], dl
dec ecx
inc edi
cmp ebx, edi
jne 0x29b7210
sub esi, edi
mov edx, dword [esp]
cmp edx, 7
jb 0x29b72d3
neg esi
xor edx, edx
nop
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
add edx, 0xfffffff8
cmp esi, edx
jne 0x29b7230
jmp 0x29b72d3
add ebp, edx
jmp 0x29b7128
mov esi, edi
mov ecx, edx
shr ecx, 2
mov eax, edi
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, edx
xor ecx, 3
mov eax, edx
or eax, 0xfffffffc
and eax, ecx
add eax, ebx
mov ebx, edx
and ebx, 0xfffffffc
add ebx, esi
mov ecx, edx
shr ecx, 1
and ecx, 1
mov esi, ebx
mov dword [esp + 0xc], ebx
mov edi, eax
mov esi, dword [esp + 0xc]
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
test dl, 1
je 0x29b72d3
and edx, 2
movzx ecx, byte [ebx + edx]
mov byte [eax + edx], cl
push dword [esp + 8]
call fcn.02989560
add esp, 4
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x14]
mov dword [esi], ebx
mov edx, dword [esp + 0x1c]
lea eax, [ebx + edx*4]
mov ecx, dword [esp + 4]
lea ecx, [ebx + ecx*4]
mov dword [esp + 4], ecx
mov dword [esi + 8], ecx
mov dword [esp + 8], ebx
mov ecx, dword [esp + 0x50]
mov edi, ebx
jmp 0x29b7115
cmp ecx, edx
ja 0x29b71f8
cmp eax, esi
ja 0x29b71f8
sub eax, ecx
cmp eax, 0x10
jb 0x29b71f8
xor edi, edi
cmp ebx, 0x10
jb 0x29b735e
mov edi, ebx
and edi, 0xfffffff0
mov eax, edi
neg eax
xor ecx, ecx
nop word [eax + eax]
movups xmm0, xmmword [esi + ecx - 0xf]
movups xmmword [edx + ecx - 0xf], xmm0
add ecx, 0xfffffff0
cmp eax, ecx
jne 0x29b7340
cmp ebx, edi
je 0x29b72d3
test bl, 0xc
je 0x29b73bb
mov ecx, ebx
and ecx, 0xfffffffc
mov dword [esp + 0x10], ecx
mov eax, ecx
neg eax
mov dword [esp + 0xc], eax
mov eax, esi
sub eax, ecx
mov ecx, edx
sub ecx, dword [esp + 0x10]
mov dword [esp + 0x18], esi
mov esi, ebx
and esi, 3
neg edi
nop word cs:[eax + eax]
mov ebx, edx
mov edx, dword [esp + 0x18]
mov edx, dword [edx + edi - 3]
mov dword [ebx + edi - 3], edx
mov edx, ebx
add edi, 0xfffffffc
cmp dword [esp + 0xc], edi
jne 0x29b7390
mov edx, dword [esp + 0x10]
cmp dword [esp], edx
jne 0x29b71fe
jmp 0x29b72d3
and ebx, 0xf
sub edx, edi
sub esi, edi
jmp 0x29b71f8
mov eax, ebx
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret