Function at 0x100015c4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x1002912c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
push 1
push ebx
mov eax, dword [esi + 0xc2]
mov dword [ebp - 0x1c], ebx
mov byte [eax], bl
inc eax
push dword [esi]
mov dword [ebp - 0x18], eax
call dword [esi + 0x28]
push ebx
push 0xa
push dword [esi]
mov edi, eax
call dword [esi + 0x28]
add esp, 0x18
test eax, eax
jns 0x1000160f
push 0xc
pop eax
mov dword [esi + 0x34], eax
jmp 0x10001824
push 3
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 3
je 0x10001631
push 0
push edi
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
push 0xa
jmp 0x10001606
mov cl, byte [ebp - 0x14]
xor eax, eax
test cl, cl
jns 0x10001647
movzx ecx, cl
inc eax
and ecx, 7
inc ecx
shl eax, cl
imul eax, eax, 3
push 1
push eax
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
test eax, eax
jns 0x100017fd
push 0
push edi
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
jmp 0x10001604
push 1
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 1
jne 0x10001622
mov al, byte [ebp - 0x14]
cmp al, 0x21
je 0x100016ed
cmp al, 0x2c
jne 0x10001837
push 0xa
lea eax, [ebp - 0x13]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 0xa
jne 0x10001622
mov al, byte [ebp - 0xb]
test al, al
jns 0x100016bd
movzx ecx, al
xor eax, eax
and ecx, 7
inc eax
inc ecx
shl eax, cl
imul eax, eax, 3
push 1
push eax
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
push 1
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 1
jne 0x10001622
push eax
movzx eax, byte [ebp - 0x14]
push eax
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
cmp byte [ebp - 0x14], 0
jne 0x100016bd
jmp 0x10001667
push 2
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 2
jne 0x10001622
movzx eax, byte [ebp - 0x14]
sub eax, 1
je 0x100017f6
sub eax, 0xf8
je 0x100017a8
sub eax, 5
je 0x10001782
sub eax, 1
je 0x100017f6
jmp 0x100017fd
mov ecx, dword [ebp - 0x1c]
add ecx, ebx
mov dword [ebp - 0x20], ecx
cmp ecx, 0xffc
jge 0x1000178c
mov eax, dword [ebp - 0x18]
dec eax
push ebx
push eax
push dword [esi]
mov dword [ebp - 0x18], eax
call dword [esi + 0x20]
add esp, 0xc
cmp eax, ebx
jne 0x10001622
mov eax, dword [ebp - 0x18]
add eax, ebx
push 1
mov byte [eax], 0
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x13]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 1
jne 0x10001622
mov al, byte [ebp - 0x13]
movzx ebx, al
test al, al
jne 0x1000172f
mov ebx, dword [ebp - 0x1c]
cmp ebx, 0xffc
jl 0x100017fd
movzx eax, al
push 1
inc eax
push eax
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
jmp 0x100017fd
push 5
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0xc
cmp eax, 5
jne 0x10001622
test byte [ebp - 0x14], 1
je 0x100017cb
movzx eax, byte [ebp - 0x11]
jmp 0x100017ce
or eax, 0xffffffff
mov word [esi + 0x60], ax
jmp 0x100017fd
push 1
movzx eax, al
push eax
push dword [esi]
call dword [esi + 0x28]
push 1
lea eax, [ebp - 0x13]
push eax
push dword [esi]
call dword [esi + 0x20]
add esp, 0x18
cmp eax, 1
jne 0x1000162d
mov al, byte [ebp - 0x13]
test al, al
jne 0x100017d4
cmp byte [ebp - 0x14], 0x3b
jne 0x10001667
push 0
push edi
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
test eax, eax
js 0x10001604
xor eax, eax
test ebx, ebx
push 4
pop ecx
cmove eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10020c63
mov esp, ebp
pop ebp
ret 4
cmp al, 0x3b
je 0x10001807
push 0
push edi
push dword [esi]
call dword [esi + 0x28]
add esp, 0xc
push 6
jmp 0x10001606