Function at 0x1010a660
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov ebp, dword [esp + 0x48]
mov edx, 1
mov esi, dword [esp + 0x3c]
mov ecx, ebp
shl edx, cl
mov ecx, edx
mov dword [esp + 0x14], edx
shr ecx, 1
test ebp, ebp
lea eax, [esi + 4]
mov ebp, edx
mov dword [esp + 0x24], eax
lea ebx, [edx - 1]
mov eax, 1
mov dword [esp + 0x20], ebx
cmovne eax, ecx
mov ecx, edx
shr ecx, 3
xor edx, edx
add ecx, 3
shr ebp, 1
add ebp, ecx
mov ecx, dword [esp + 0x4c]
lea eax, [esi + eax*4]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x2c], eax
xor esi, esi
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x10], eax
mov edi, ebx
lea eax, [ecx + eax*2]
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
bts ecx, eax
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [esp + 0x44]
cmovae edx, ecx
add eax, 2
add eax, ecx
adc esi, edx
shrd eax, esi, 1
shr esi, 1
add eax, 2
adc esi, 0
shld esi, eax, 2
shl eax, 2
test esi, esi
jb 0x1010a71b
ja 0x1010a70c
cmp eax, dword [esp + 0x50]
jbe 0x1010a71b
pop edi
pop esi
pop ebp
mov eax, 0xffffffd4
pop ebx
add esp, 0x28
ret 0x18
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x10]
mov word [eax], cx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x44]
mov word [eax - 2], cx
xor ecx, ecx
mov eax, dword [esp + 0x4c]
mov word [eax], cx
mov ecx, 1
cmp esi, ecx
jb 0x1010a79e
mov edx, dword [esp + 0x40]
mov ebx, esi
sub eax, edx
mov ebp, eax
movzx eax, word [edx]
movzx esi, word [edx + ebp]
mov dword [esp + 0x3c], eax
cmp ax, 0xffff
jne 0x1010a77c
lea eax, [esi + 1]
mov esi, dword [esp + 0x4c]
mov word [esi + ecx*2], ax
lea eax, [ecx - 1]
mov esi, dword [esp + 0x18]
mov byte [edi + esi + 2], al
dec edi
jmp 0x1010a78a
mov eax, dword [esp + 0x3c]
add eax, esi
mov esi, dword [esp + 0x4c]
mov word [esi + ecx*2], ax
inc ecx
add edx, 2
cmp ecx, ebx
jbe 0x1010a752
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
movzx eax, ax
mov ecx, eax
inc eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
mov word [ecx], ax
xor eax, eax
cmp edi, ebx
jne 0x1010a89b
mov edi, dword [esp + 0x14]
xorps xmm0, xmm0
movlpd qword [esp + 0x30], xmm0
lea esi, [edi + 2]
add esi, ecx
mov dword [esp + 0x3c], esi
cmp dword [esp + 0x10], eax
jbe 0x1010a842
mov edx, dword [esp + 0x34]
xor ebx, ebx
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
movsx ecx, word [ecx + eax*2]
mov dword [esp + 0x50], ecx
mov dword [ebx + esi], ebp
mov dword [ebx + esi + 4], edx
cmp ecx, 8
jle 0x1010a821
add ecx, 0xfffffff7
mov dword [ebx + esi + 8], ebp
lea edi, [ebx + esi]
shr ecx, 2
and ecx, 0x3ffffffe
mov dword [edi + 0xc], edx
lea esi, [edi + 8]
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x3c]
add ebx, ecx
inc eax
add ebp, 0x1010101
adc edx, 0x1010101
cmp eax, dword [esp + 0x10]
jb 0x1010a7e3
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
xor edx, edx
xor esi, esi
test edi, edi
je 0x1010a8d6
mov eax, dword [esp + 0x3c]
lea ecx, [eax + 1]
mov dword [esp + 0x50], ecx
nop dword [eax]
movzx eax, byte [esi + eax]
mov ecx, edx
mov edi, dword [esp + 0x18]
and ecx, ebx
mov byte [ecx + edi + 2], al
lea ecx, [edx + ebp]
mov eax, dword [esp + 0x50]
lea edx, [edx + ebp*2]
and ecx, ebx
and edx, ebx
movzx eax, byte [eax + esi]
add esi, 2
mov byte [ecx + edi + 2], al
mov eax, dword [esp + 0x3c]
cmp esi, dword [esp + 0x14]
jb 0x1010a860
mov ebp, dword [esp + 0x14]
xor esi, esi
jmp 0x1010a8e0
xor edx, edx
test esi, esi
je 0x1010a8d6
mov ecx, dword [esp + 0x40]
movsx ecx, word [ecx + edx*2]
test ecx, ecx
jle 0x1010a8d1
mov esi, dword [esp + 0x18]
mov byte [eax + esi + 2], dl
add eax, ebp
and eax, ebx
cmp eax, edi
jbe 0x1010a8c8
nop dword [eax]
add eax, ebp
and eax, ebx
cmp eax, edi
ja 0x1010a8c0
sub ecx, 1
jne 0x1010a8b1
mov esi, dword [esp + 0x10]
inc edx
cmp edx, esi
jb 0x1010a8a1
mov ebp, dword [esp + 0x14]
xor esi, esi
test ebp, ebp
je 0x1010a912
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
movzx edi, ax
nop dword [eax + eax]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x4c]
movzx eax, byte [esi + eax + 2]
lea edx, [ecx + eax*2]
movzx eax, word [edx]
lea ecx, [edi + esi]
inc esi
mov word [ebx + eax*2], cx
inc word [edx]
cmp esi, ebp
jb 0x1010a8f0
mov edx, dword [esp + 0x2c]
xor edi, edi
mov esi, dword [esp + 0x40]
xor ebx, ebx
add edx, 8
movsx esi, word [esi + ebx*2]
cmp esi, 0xffffffff
je 0x1010a96d
test esi, esi
je 0x1010a95f
cmp esi, 1
je 0x1010a96d
mov ecx, dword [esp + 0x48]
lea eax, [esi - 1]
bsr eax, eax
sub ecx, eax
shl esi, cl
shl ecx, 0x10
sub ecx, esi
mov esi, dword [esp + 0x40]
mov dword [edx], ecx
mov ecx, edi
movsx eax, word [esi + ebx*2]
sub ecx, eax
mov dword [edx - 4], ecx
movsx eax, word [esi + ebx*2]
add edi, eax
jmp 0x1010a983
mov eax, dword [esp + 0x48]
inc eax
shl eax, 0x10
sub eax, ebp
mov dword [edx], eax
jmp 0x1010a97f
mov eax, dword [esp + 0x48]
shl eax, 0x10
sub eax, ebp
mov dword [edx], eax
lea eax, [edi - 1]
mov dword [edx - 4], eax
inc edi
mov esi, dword [esp + 0x40]
inc ebx
add edx, 8
cmp ebx, dword [esp + 0x44]
jbe 0x1010a921
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret 0x18