Function at 0x10001ae0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp + 0xc], edx
cmp dword [esp + 0x24], edx
jbe 0x10001db3
push ebx
push ebp
push esi
push edi
jmp 0x10001b04
mov edx, dword [esp + 0x14]
mov ecx, dword [0x1004710c]
mov esi, dword [0x10047110]
mov edi, dword [0x10047104]
mov eax, ecx
imul eax, esi
mov dword [esp + 0x24], eax
inc eax
imul eax, ecx
mov ebx, edi
sub ebx, esi
lea eax, [eax + ebx*2]
mov ebx, dword [0x10047108]
sub eax, ebx
add eax, dword [0x100470fc]
mov ebp, 0x2d02
lea edx, [edx + eax*2]
lea eax, [eax + edx + 1]
cdq
idiv ebp
mov eax, dword [0x100470fc]
mov ebp, eax
imul ebp, eax
mov eax, ecx
sub eax, ebp
lea ebp, [edi + edi - 2]
imul ebp, ebx
lea eax, [ebp + eax*2 - 6]
imul eax, esi
add edx, eax
mov eax, dword [0x10047100]
lea ebp, [eax - 2]
imul ebp, eax
mov eax, ecx
imul eax, ecx
sub ebp, eax
mov eax, dword [0x10047100]
sub ebp, edi
add ebp, dword [0x100470fc]
lea edx, [edx + ebp*2]
lea ebp, [eax + esi]
lea eax, [edi + 2]
imul ebp, eax
lea eax, [ebx + edi + 2]
imul eax, ecx
sub eax, ebp
sub eax, ebx
mov ebx, dword [0x100470fc]
add eax, ebx
mov dword [esp + 0x14], edx
lea ebp, [eax + eax*2]
mov edx, edi
imul edx, ecx
lea eax, [edx + ebx]
imul eax, edi
add eax, ecx
imul eax, ebx
mov ebx, dword [0x10047100]
mov dword [esp + 0x20], eax
add ebx, ebx
mov eax, ebx
mov ebx, dword [esp + 0x20]
sub eax, ebx
add eax, edx
mov edx, dword [esp + 0x14]
lea edx, [edx + eax*2]
add edx, eax
mov eax, dword [esp + 0x2c]
movzx eax, byte [edx + eax]
add eax, dword [esp + 0x18]
mov ebx, 0x2d02
cdq
idiv ebx
mov ebx, 2
add ebp, edx
mov edx, dword [0x10047108]
mov dword [esp + 0x18], ebp
mov ebp, dword [0x10047100]
mov eax, ebp
imul eax, edx
sub ebx, eax
imul ebx, edi
mov eax, dword [0x100470fc]
add eax, 4
imul eax, esi
sub ebx, eax
add ebx, edx
mov edx, dword [esp + 0x14]
lea eax, [edx + ebx*2]
mov ebx, dword [esp + 0x2c]
movzx edx, byte [eax + ebx]
mov eax, dword [0x100470fc]
imul eax, ebp
mov byte [esp + 0x13], dl
mov edx, eax
imul edx, ecx
imul edx, ecx
add edx, esi
imul edx, ebp
mov ebp, edx
mov edx, dword [esp + 0x24]
sub edx, ebp
add eax, ecx
lea ebp, [edi + edi]
sub edx, ebp
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x24], edx
lea edx, [ebp + edx*2]
add edx, dword [esp + 0x24]
lea ebp, [eax + esi + 2]
movzx edx, byte [edx + ebx]
imul ebp, ecx
mov ecx, dword [esp + 0x14]
mov eax, 1
sub eax, dword [0x10047108]
sub eax, esi
imul eax, edi
sub eax, ebp
sub eax, dword [0x10047100]
sub eax, esi
lea ecx, [ecx + eax*2]
add ecx, eax
mov byte [ecx + ebx], dl
mov eax, dword [0x10047100]
mov ecx, dword [0x100470fc]
mov esi, dword [0x10047104]
mov edx, eax
imul edx, dword [0x10047108]
lea edx, [edx + ecx + 2]
imul edx, ecx
mov ecx, dword [0x1004710c]
imul esi, ecx
inc esi
imul esi, eax
mov eax, dword [esp + 0x18]
sub esi, edx
mov edx, dword [esp + 0x1c]
add esi, ecx
movzx ecx, byte [esp + 0x13]
add esi, eax
mov byte [esi + ebx], cl
mov edi, dword [0x10047104]
mov esi, dword [0x10047100]
lea ecx, [edi + edx]
mov edx, dword [esp + 0x30]
add ecx, edx
mov dword [esp + 0x24], ecx
mov ecx, dword [0x1004710c]
mov edx, esi
imul edx, ecx
mov ebp, edi
sub ebp, edx
add ebp, dword [0x10047110]
lea edx, [ecx + ecx*2]
imul ebp, esi
add ebp, edx
mov edx, dword [0x10047108]
sub ebp, edx
sub ebp, edi
lea eax, [eax + ebp*2]
movzx eax, byte [eax + ebx]
mov ebp, esi
imul ebp, edx
mov edx, dword [esp + 0x14]
sub edx, ebp
movzx edx, byte [edx + ebx]
add eax, edx
cdq
mov ebp, 0x2d02
idiv ebp
mov ebp, dword [0x100470fc]
imul ebp, dword [0x10047108]
imul ebp, dword [0x10047110]
mov eax, edi
imul eax, ecx
imul eax, ecx
sub eax, ebp
mov ebp, dword [0x10047110]
imul eax, ebp
inc eax
imul eax, esi
inc eax
imul eax, ecx
inc ebp
imul ebp, edi
mov edi, dword [0x100470fc]
imul edi, dword [0x10047110]
sub eax, ebp
sub eax, edi
mov edi, dword [0x10047108]
add edi, edi
sub eax, edi
sub eax, esi
lea edi, [ebx + eax*2]
add edi, eax
mov eax, dword [esp + 0x24]
sub ecx, esi
add edi, edx
movzx ecx, byte [edi + ecx*4]
xor byte [eax], cl
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x34]
jb 0x10001b00
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret