Function at 0x10112c20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push ebx
push ebp
lea eax, [eax + edx*2]
mov ebp, 1
add eax, 2
mov dword [esp + 0x14], eax
lea eax, [edx + 1]
mov dword [esp + 8], eax
xor edx, edx
mov eax, ebp
shl eax, cl
mov dword [esp + 0xc], eax
push esi
xor esi, esi
lea ebx, [eax - 1]
mov eax, ecx
xor ecx, ecx
mov dword [esp + 0x14], ebx
bts ecx, eax
cmp eax, 0x20
push edi
cmovae edx, ecx
mov edi, ebx
mov ebx, dword [esp + 0x34]
xor ecx, edx
cmp eax, 0x40
cmovae edx, ecx
lea eax, [ebx*2 + 2]
mov ebx, edi
add eax, ecx
adc esi, edx
add eax, 8
adc esi, 0
test esi, esi
ja 0x10112f01
jb 0x10112c9e
cmp eax, dword [esp + 0x40]
ja 0x10112f01
cmp dword [esp + 0x34], 0xff
ja 0x10112f01
mov eax, dword [esp + 0x38]
cmp eax, 0xc
jbe 0x10112cc4
pop edi
pop esi
pop ebp
mov eax, 0xffffffd4
pop ebx
add esp, 0x18
ret 0x18
mov esi, dword [esp + 0x10]
lea ecx, [eax - 1]
mov word [esp + 0x36], bp
shl bp, cl
xor ecx, ecx
mov word [esp + 0x34], ax
movzx eax, bp
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x20], eax
test esi, esi
je 0x10112d4b
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
add esi, 6
sub ebp, edx
lea esi, [esi + edi*4]
nop dword [eax]
movzx eax, word [edx + ebp]
mov ebx, eax
mov dword [esp + 0x40], ebx
cmp ax, 0xffff
jne 0x10112d1d
mov byte [esi], cl
dec edi
sub esi, 4
mov eax, 1
jmp 0x10112d32
cmp ax, word [esp + 0x20]
jl 0x10112d2b
xor eax, eax
mov word [esp + 0x36], ax
mov eax, dword [esp + 0x40]
movzx eax, ax
mov word [edx], ax
inc ecx
add edx, 2
cmp ecx, dword [esp + 0x10]
jb 0x10112d00
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov dword [ecx], eax
mov eax, dword [esp + 0x14]
mov ecx, eax
shr eax, 1
shr ecx, 3
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
mov dword [esp + 0x34], edx
cmp edi, ebx
jne 0x10112e40
xor esi, esi
xorps xmm0, xmm0
mov dword [esp + 0x30], esi
movlpd qword [esp + 0x20], xmm0
cmp dword [esp + 0x10], eax
jbe 0x10112de8
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
movsx ecx, word [ebp + eax*2]
add edi, esi
mov dword [esp + 0x40], ecx
mov dword [edi], edx
mov dword [edi + 4], ebx
cmp ecx, 8
jle 0x10112dcb
add ecx, 0xfffffff7
mov dword [edi + 8], edx
shr ecx, 2
lea esi, [edi + 8]
and ecx, 0x3ffffffe
mov dword [edi + 0xc], ebx
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x30]
add esi, ecx
inc eax
add edx, 0x1010101
mov dword [esp + 0x30], esi
adc ebx, 0x1010101
cmp eax, dword [esp + 0x10]
jb 0x10112d90
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
xor esi, esi
xor edi, edi
test ebp, ebp
je 0x10112eac
mov ebp, dword [esp + 0x1c]
nop dword [eax]
movzx eax, byte [edi + ebp]
mov ecx, esi
mov edx, dword [esp + 0x2c]
and ecx, ebx
mov byte [edx + ecx*4 + 6], al
mov edx, dword [esp + 0x34]
movzx eax, byte [edi + ebp + 1]
add edi, 2
mov ebp, dword [esp + 0x2c]
lea ecx, [esi + edx]
and ecx, ebx
lea esi, [esi + edx*2]
and esi, ebx
mov byte [ebp + ecx*4 + 6], al
mov ebp, dword [esp + 0x1c]
cmp edi, dword [esp + 0x14]
jb 0x10112e00
mov ebp, dword [esp + 0x14]
xor ebx, ebx
jmp 0x10112eb2
xor ecx, ecx
mov dword [esp + 0x30], ecx
test esi, esi
je 0x10112ea8
nop word [eax + eax]
xor edx, edx
xor esi, esi
cmp dx, word [ebp]
mov edx, dword [esp + 0x34]
jge 0x10112e89
nop
mov ebx, dword [esp + 0x2c]
mov byte [ebx + eax*4 + 6], cl
add eax, edx
mov ebx, dword [esp + 0x18]
and eax, ebx
cmp eax, edi
jbe 0x10112e7c
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x10112e74
movsx ecx, word [ebp]
inc esi
cmp esi, ecx
mov ecx, dword [esp + 0x30]
jl 0x10112e60
inc ecx
add ebp, 2
mov dword [esp + 0x30], ecx
cmp ecx, dword [esp + 0x10]
jb 0x10112e50
test eax, eax
je 0x10112ea8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret 0x18
mov ebp, dword [esp + 0x14]
xor ebx, ebx
test ebp, ebp
je 0x10112ef5
mov edi, dword [esp + 0x2c]
add edi, 7
nop dword [eax]
movzx eax, byte [edi - 1]
lea edi, [edi + 4]
mov ecx, dword [esp + 0x3c]
inc ebx
movzx esi, word [ecx + eax*2]
lea edx, [ecx + eax*2]
mov ecx, esi
lea eax, [esi + 1]
mov word [edx], ax
bsr eax, ecx
mov cl, byte [esp + 0x38]
sub cl, al
shl si, cl
sub si, bp
mov byte [edi - 4], cl
mov word [edi - 7], si
cmp ebx, ebp
jb 0x10112ec0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 0x18
pop edi
pop esi
pop ebp
mov eax, 0xffffffd2
pop ebx
add esp, 0x18
ret 0x18