Function at 0x100bc930
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp + 0x18]
cmp byte [ebp + 0x24], 0
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
je 0x100bca68
cmp ecx, eax
jge 0x100bcbd3
xor edi, edi
mov al, byte [ebp + 0x20]
test al, al
mov ecx, 0xfffffc01
cmove ecx, edi
mov dword [ebp - 0x30], ecx
xor al, 1
movzx esi, al
shl esi, 0xa
or esi, 0x3ff
lea eax, [ebx + 1]
mov dword [ebp - 0x2c], eax
lea eax, [ebx*4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x14]
mov dl, byte [ebp + 0x20]
jge 0x100bca3e
xor ecx, ecx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x20], ecx
mov ebx, dword [ebp - 0x2c]
cmp dword [ebp + 8], 0
jle 0x100bca1d
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + ebx*4 - 8]
movzx eax, byte [ecx]
movsx edi, al
test dl, dl
cmove edi, eax
mov al, byte [ecx + 1]
mov byte [ebp - 0x14], al
mov edx, dword [ebp - 0x20]
push dword [ebp - 0x1c]
call fcn.100bd520
add esp, 4
mov dl, byte [ebp - 0x14]
mov ecx, edx
shr cl, 1
and cl, 0x78
cmp dl, 0x10
movzx ecx, cl
mov edx, 1
cmovb ecx, edx
movzx ecx, cl
imul ecx, eax
lea eax, [ecx + edi*8]
add eax, 4
mov ecx, esi
cmp esi, eax
jl 0x100bca02
mov ecx, eax
mov edi, dword [ebp - 0x30]
mov edx, edi
cmp edi, eax
jg 0x100bca0d
mov edx, ecx
mov eax, dword [ebp - 0x10]
mov dword [eax + ebx*4 - 8], edx
dec ebx
cmp ebx, 1
mov dl, byte [ebp + 0x20]
jg 0x100bc9b0
mov ecx, dword [ebp - 0x20]
cmp ecx, 2
ja 0x100bca3e
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
add eax, ecx
inc eax
inc ecx
cmp eax, dword [ebp + 0x14]
jl 0x100bc9a4
mov edi, dword [ebp - 0x1c]
cmp edi, 2
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
ja 0x100bcbd3
mov eax, dword [ebp + 0x1c]
add dword [ebp - 0x18], eax
lea eax, [edi + edx]
inc eax
inc edi
cmp eax, ecx
jl 0x100bc98a
jmp 0x100bcbd3
cmp byte [ebp + 0x20], 0
je 0x100bcb27
cmp ecx, eax
jge 0x100bcbd3
lea eax, [ebx + 1]
mov dword [ebp - 0x1c], eax
xor esi, esi
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x14]
jge 0x100bcafd
xor edx, edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov edi, dword [ebp - 0x1c]
test ebx, ebx
mov dword [ebp - 0x20], edx
jle 0x100bcae6
mov eax, dword [ebp - 0x24]
mov esi, dword [eax + edi*4 - 8]
movsx ebx, byte [esi]
mov ecx, esi
push dword [ebp - 0x10]
call fcn.100bd520
add esp, 4
movzx ecx, byte [esi + 1]
shr ecx, 4
imul ecx, eax
add ecx, ebx
cmp ecx, 0x7f
jl 0x100bcacc
mov ecx, 0x7f
cmp ecx, 0xffffff80
jg 0x100bcad6
mov ecx, 0x80
mov eax, dword [ebp - 0x14]
mov byte [eax + edi - 2], cl
dec edi
cmp edi, 1
mov edx, dword [ebp - 0x20]
jg 0x100bca9f
cmp edx, 2
mov ebx, dword [ebp + 8]
ja 0x100bcafd
add dword [ebp - 0x14], ebx
mov eax, dword [ebp + 0xc]
add eax, edx
inc eax
inc edx
cmp eax, dword [ebp + 0x14]
jl 0x100bca95
mov esi, dword [ebp - 0x10]
cmp esi, 2
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
ja 0x100bcbd3
mov eax, dword [ebp + 0x1c]
add dword [ebp - 0x18], eax
lea eax, [esi + edx]
inc eax
inc esi
cmp eax, ecx
jl 0x100bca82
jmp 0x100bcbd3
cmp ecx, eax
jge 0x100bcbd3
lea eax, [ebx + 1]
mov dword [ebp - 0x1c], eax
xor esi, esi
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x14]
jge 0x100bcbb2
xor edx, edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov edi, dword [ebp - 0x1c]
test ebx, ebx
mov dword [ebp - 0x20], edx
jle 0x100bcb9b
mov eax, dword [ebp - 0x24]
mov esi, dword [eax + edi*4 - 8]
movzx ebx, byte [esi]
mov ecx, esi
push dword [ebp - 0x10]
call fcn.100bd520
add esp, 4
movzx ecx, byte [esi + 1]
shr ecx, 4
imul ecx, eax
add ecx, ebx
mov eax, 0xff
cmp ecx, eax
jl 0x100bcb85
mov ecx, 0xff
test ecx, ecx
jg 0x100bcb8b
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov byte [eax + edi - 2], cl
dec edi
cmp edi, 1
mov edx, dword [ebp - 0x20]
jg 0x100bcb54
cmp edx, 2
mov ebx, dword [ebp + 8]
ja 0x100bcbb2
add dword [ebp - 0x14], ebx
mov eax, dword [ebp + 0xc]
add eax, edx
inc eax
inc edx
cmp eax, dword [ebp + 0x14]
jl 0x100bcb4a
mov esi, dword [ebp - 0x10]
cmp esi, 2
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
ja 0x100bcbd3
mov eax, dword [ebp + 0x1c]
add dword [ebp - 0x18], eax
lea eax, [esi + edx]
inc eax
inc esi
cmp eax, ecx
jl 0x100bcb37
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret