Function at 0x1009da80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, ebx
push esi
mov esi, dword [ebp + 0x14]
mov edx, esi
and edx, 0xffffff00
sar eax, 8
shl edx, 8
add edx, eax
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0x18]
push edi
mov dword [eax], edx
mov edx, 1
mov dword [ebp - 4], edx
mov edi, ebx
sar esi, 0xa
sar edi, 0xa
imul ebx, edi, 0x15556
imul ecx, esi, 0x15556
sar ebx, 0x14
sar ecx, 0x14
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ecx
lea eax, [ebx + ebx*2]
mov dword [ebp - 0x10], ecx
shl eax, 2
sub edi, eax
lea eax, [ecx + ecx*2]
shl eax, 2
sub esi, eax
cmp edi, 6
jne 0x1009db17
cmp esi, edi
jne 0x1009db19
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x30]
imul eax, ecx
mov ecx, dword [ebp + 8]
add eax, ebx
movzx eax, byte [eax + ecx]
add eax, eax
push eax
call fcn.10098810
add esp, 0xc
jmp 0x1009dc95
jl 0x1009db24
lea eax, [ebx + 1]
sub edi, 6
mov dword [ebp - 0x14], eax
jmp 0x1009db28
add edi, 6
dec ebx
cmp esi, 6
jl 0x1009db38
lea eax, [ecx + 1]
sub esi, 6
mov dword [ebp - 0x10], eax
jmp 0x1009db3f
add esi, 6
dec ecx
mov dword [ebp - 0x1c], ecx
test ebx, ebx
js 0x1009dd3d
test ecx, ecx
js 0x1009dd3d
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x30]
cmp dword [ebp - 0x14], edx
mov dword [ebp - 0x20], edx
mov edx, dword [ebp - 4]
jge 0x1009dd3d
mov edx, dword [ebp - 0x10]
cmp edx, dword [eax + 0x34]
mov edx, dword [ebp - 4]
jge 0x1009dd3d
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
imul eax, ecx
mov ecx, dword [ebp + 8]
add eax, ebx
movzx eax, byte [eax + ecx]
shl eax, 2
push eax
call fcn.10098810
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x30]
imul eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x14]
movzx eax, byte [eax + ecx]
shl eax, 2
push eax
call fcn.10098810
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x30]
imul eax, dword [ebp - 0x10]
add eax, ebx
mov ebx, dword [ebp + 8]
movzx eax, byte [eax + ebx]
shl eax, 2
push eax
call fcn.10098810
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x30]
imul eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x14]
movzx eax, byte [eax + ebx]
shl eax, 2
push eax
call fcn.10098810
imul eax, edi, 0x1555600
mov edx, 0x100
imul esi, esi, 0x1555600
mov edi, 0x100
sar eax, 0x14
sub edx, eax
sar esi, 0x14
mov dword [ebp - 0x1c], eax
sub edi, esi
mov eax, dword [ebp - 0x28]
mov ebx, edi
imul ebx, dword [ebp - 0x24]
mov ecx, edi
imul ecx, dword [ebp - 0x2c]
imul eax, esi
add ebx, eax
mov eax, dword [ebp - 0x30]
imul eax, esi
imul ebx, edx
add ecx, eax
mov eax, dword [ebp - 0x38]
imul ecx, dword [ebp - 0x1c]
imul eax, esi
add ebx, ecx
mov ecx, edi
imul ecx, dword [ebp - 0x34]
sar ebx, 0xa
mov dword [ebp - 0xc], ebx
add ecx, eax
imul ecx, edx
imul edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
imul eax, esi
add edi, eax
imul edi, dword [ebp - 0x1c]
add ecx, edi
sar ecx, 0xa
push ecx
push ebx
mov dword [ebp - 0x18], ecx
call fcn.10098770
inc eax
lea ecx, [ebp - 0x18]
push ecx
sar eax, 1
lea ecx, [ebp - 0xc]
and eax, 0x1ff
push ecx
push eax
call fcn.10098810
add esp, 0x44
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp + 0x20]
test eax, eax
jne 0x1009dcaf
test edx, edx
jne 0x1009dcaf
mov ecx, dword [ebp - 0xc]
mov esi, ecx
neg esi
jmp 0x1009dccc
mov ecx, dword [ebp - 0xc]
mov esi, ecx
imul esi, eax
mov eax, edi
imul eax, edx
add esi, eax
mov eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x80000
jl 0x1009dd48
test esi, esi
jns 0x1009dcda
neg ecx
neg edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x18], edi
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
mov dword [ebp + 0x1c], ecx
lea esi, [esi + edi*4]
mov dword [ebp + 0x20], edi
lea ebx, [ebx + ecx*4]
add esi, edi
add ebx, ecx
mov dword [ebp + 0x14], esi
mov ecx, esi
mov dword [ebp + 0x10], ebx
sar ecx, 0xc
imul ecx, dword [eax + 0x3c]
mov eax, ebx
sar eax, 0xc
add ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx]
and al, 0xf
cmp al, 1
mov eax, dword [ebp - 4]
jne 0x1009dd3f
mov edx, esi
mov ecx, ebx
and edx, 0xffffff00
sar ecx, 8
shl edx, 8
add edx, ecx
mov ecx, dword [ebp + 0x18]
mov dword [ecx + eax*4], edx
mov edx, eax
inc edx
mov dword [ebp - 4], edx
cmp edx, 0x50
jl 0x1009dab1
mov eax, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c