Function at 0x10001aa5
Capabilities:
Encrypt data using rc4 prga

Disassembly:
jmp 0x10005080
sub esp, 0x20
xor eax, eax
cmp dword [esp + 0x2c], eax
mov dword [esp + 4], eax
mov dword [esp + 0x14], eax
jbe 0x1000536f
push ebx
push ebp
push esi
push edi
jmp 0x100050a4
mov eax, dword [esp + 0x1c]
mov esi, dword [0x100d1170]
lea eax, [eax + esi*2]
lea eax, [esi + eax + 1]
cdq
mov ebx, dword [0x100d1164]
mov ecx, 0x784e
idiv ecx
mov edi, dword [0x100d115c]
mov ecx, dword [0x100d1168]
mov ebp, ebx
sub ebp, esi
add ebp, 1
imul ebp, edi
mov eax, dword [0x100d1160]
add ebp, edx
mov edx, dword [0x100d1160]
imul edx, esi
sub ebp, edx
add ebp, eax
mov edx, ecx
imul edx, dword [0x100d116c]
add edx, ebp
add edx, dword [0x100d116c]
add edx, ebx
mov ebp, edx
lea edx, [ebx + esi]
mov dword [esp + 0x2c], edx
mov edx, dword [0x100d116c]
imul edx, edx
mov dword [esp + 0x28], edx
mov edx, eax
imul edx, ebx
mov dword [esp + 0x18], edx
mov edx, ecx
imul edx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edx
lea edx, [eax + eax]
mov eax, dword [esp + 0x34]
sub ebp, edx
movzx eax, byte [eax + ebp]
add eax, dword [esp + 0x14]
mov ebp, 0x784e
cdq
idiv ebp
mov ebp, dword [0x100d1160]
mov eax, edx
mov edx, dword [esp + 0x18]
sub edx, dword [esp + 0x28]
sub edx, ecx
sub edx, 3
imul edx, esi
add eax, edx
mov edx, dword [0x100d116c]
imul ebp, edx
imul ebp, ebx
add eax, ebp
mov ebp, eax
mov eax, dword [esp + 0x20]
sub ebp, eax
sub ebp, eax
sub ebp, dword [esp + 0x28]
sub ebp, ecx
sub ebp, edx
sub ebp, edx
add ebp, dword [esp + 0x18]
mov eax, ebp
mov ebp, dword [0x100d1160]
add eax, ebp
add eax, ebp
add eax, edi
add eax, ebx
mov dword [esp + 0x14], eax
mov eax, edi
sub eax, esi
sub eax, 1
imul eax, ebp
mov ebp, ecx
imul ebp, ecx
imul ecx, edi
imul ebp, edi
imul ebp, edi
add eax, ebp
lea ebp, [esi + 1]
imul ebp, edx
add eax, ebp
mov ebp, dword [esp + 0x2c]
imul ebp, ebx
add eax, ebp
mov ebp, dword [esp + 0x1c]
lea ebp, [ebp + eax*4]
add ebp, eax
add ecx, 1
imul ecx, esi
mov eax, ebp
mov ebp, dword [esp + 0x34]
movzx eax, byte [eax + ebp]
mov byte [esp + 0x13], al
mov eax, dword [0x100d1160]
sub edi, edx
add ecx, ebx
lea ecx, [ecx + eax*2]
mov eax, dword [esp + 0x14]
lea ecx, [ecx + ecx*2]
add ecx, ecx
sub eax, ecx
mov ecx, dword [esp + 0x18]
lea edx, [ecx + ecx - 2]
imul edx, ebx
add edx, dword [esp + 0x1c]
sub edi, esi
lea ecx, [edx + edi*2]
mov dl, byte [eax + ebp]
mov byte [ecx + ebp], dl
mov edx, dword [0x100d1168]
mov ecx, dword [0x100d1164]
mov eax, edx
imul eax, ecx
add eax, 1
imul eax, dword [0x100d1160]
lea esi, [ecx + ecx*2]
lea esi, [esi + esi - 6]
imul esi, dword [0x100d116c]
sub eax, 2
mov edi, edx
imul edi, edx
lea eax, [eax + eax*2]
lea esi, [esi + eax*2]
imul esi, dword [0x100d1170]
add esi, dword [esp + 0x14]
mov eax, ecx
imul eax, ecx
sub eax, edi
add eax, dword [0x100d115c]
mov ebx, dword [esp + 0x38]
lea ecx, [eax + eax*2]
movzx eax, byte [esp + 0x13]
lea edx, [esi + ecx*2]
mov byte [edx + ebp], al
mov ecx, dword [0x100d1160]
mov esi, dword [0x100d1170]
mov edi, dword [0x100d115c]
mov edx, ecx
imul edx, dword [0x100d1164]
mov eax, dword [0x100d1168]
mov dword [esp + 0x18], edx
imul eax, ecx
mov edx, esi
imul edx, esi
mov dword [esp + 0x2c], edx
mov edx, dword [0x100d116c]
sub edx, edi
sub edx, esi
add edx, 1
imul edx, ecx
add edx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
add edx, ebx
mov ebx, 2
sub ebx, dword [0x100d116c]
mov dword [esp + 0x28], edx
mov edx, dword [0x100d1168]
imul ebx, esi
lea ebx, [ebx + edx*2]
imul edx, dword [0x100d1164]
sub ebx, ecx
add ebx, eax
add ebx, dword [0x100d116c]
add ebx, dword [esp + 0x14]
movzx eax, byte [ebx + ebp]
mov ebx, dword [0x100d116c]
imul ebx, dword [0x100d1164]
sub ebx, edx
add ebx, dword [0x100d1168]
add ebx, ecx
add ebx, esi
add ebx, dword [esp + 0x1c]
movzx edx, byte [ebx + ebp]
add eax, edx
cdq
mov ebx, 0x784e
idiv ebx
mov eax, edi
imul edi, dword [0x100d1164]
imul eax, esi
mov esi, 2
sub esi, eax
imul esi, dword [0x100d116c]
sub esi, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
sub esi, dword [esp + 0x18]
sub edi, ecx
add esi, dword [esp + 0x2c]
add edx, ebp
lea ecx, [edi + edi*2]
lea edx, [edx + esi*2]
mov cl, byte [ecx + edx]
xor byte [eax], cl
mov eax, dword [esp + 0x24]
add eax, 1
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
jb 0x100050a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret