Function at 0x10027740
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov eax, 1
shl eax, cl
push ebx
mov dword [ebp - 0x14], eax
push esi
lea ebx, [eax - 1]
mov dword [ebp - 4], edx
mov eax, ecx
mov dword [ebp - 8], ebx
xor ecx, ecx
xor esi, esi
bts ecx, eax
xor edx, edx
cmp eax, 0x20
push edi
cmovae edx, ecx
mov edi, ebx
mov ebx, dword [ebp + 8]
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 0x10027a11
jb 0x100277ad
cmp eax, dword [ebp + 0x14]
ja 0x10027a11
cmp dword [ebp + 8], 0xff
ja 0x10027a11
mov ecx, dword [ebp + 0xc]
cmp ecx, 0xc
jbe 0x100277ce
mov eax, 0xffffffd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
mov word [ebp + 0x14], cx
dec ecx
mov word [ebp + 0x16], ax
shl ax, cl
xor ecx, ecx
movzx eax, ax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0xc], ecx
jbe 0x10027840
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
add ebx, 6
mov edx, dword [ebp + 0x10]
sub eax, edx
mov dword [ebp - 0x1c], eax
lea ebx, [ebx + edi*4]
movzx eax, word [eax + edx]
mov esi, eax
mov dword [ebp - 0x24], esi
cmp ax, 0xffff
jne 0x1002781c
mov byte [ebx], cl
dec edi
sub ebx, 4
mov eax, 1
jmp 0x1002782e
cmp ax, word [ebp - 0x28]
jl 0x10027828
xor eax, eax
mov word [ebp + 0x16], ax
mov eax, dword [ebp - 0x24]
movzx eax, ax
mov word [edx], ax
inc ecx
mov eax, dword [ebp - 0x1c]
add edx, 2
cmp ecx, dword [ebp - 0xc]
jb 0x10027800
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
mov ecx, eax
shr eax, 1
shr ecx, 3
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
mov dword [ebp + 0x14], edx
cmp edi, ebx
jne 0x1002795d
xor edi, edi
mov dword [ebp - 0x24], eax
xorps xmm0, xmm0
mov dword [ebp - 0x28], edi
movlpd qword [ebp - 0x20], xmm0
cmp dword [ebp - 0xc], eax
jbe 0x100278fa
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
movsx ecx, word [esi + eax*2]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 8]
lea esi, [eax + ecx*2]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
mov dword [edi + esi + 2], edx
mov dword [edi + esi + 6], ebx
mov esi, dword [ebp - 4]
cmp ecx, 8
jle 0x100278dd
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
inc ecx
lea esi, [eax + ecx*2]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
add edi, esi
add ecx, 0xfffffff7
shr ecx, 2
and ecx, 0x3ffffffe
mov dword [edi + 8], edx
lea esi, [edi + 8]
mov dword [edi + 0xc], ebx
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x28]
add edi, ecx
inc eax
add edx, 0x1010101
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], eax
adc ebx, 0x1010101
cmp eax, dword [ebp - 0xc]
jb 0x10027882
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
xor esi, esi
xor edi, edi
test eax, eax
je 0x100279c6
nop dword [eax]
mov edx, dword [ebp + 8]
mov ecx, esi
and ecx, ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebx + edx*2]
mov edx, dword [ebp - 0x10]
movzx eax, byte [edi + eax + 2]
mov ebx, dword [ebp + 8]
mov byte [edx + ecx*4 + 6], al
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
add ecx, esi
and ecx, dword [ebp - 8]
lea eax, [edx + ebx*2]
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp + 0x14]
movzx eax, byte [eax + edi + 3]
add edi, 2
mov byte [ebx + ecx*4 + 6], al
mov ebx, dword [ebp - 8]
lea esi, [esi + edx*2]
and esi, ebx
cmp edi, dword [ebp - 0x14]
jb 0x10027910
xor ebx, ebx
jmp 0x100279cc
xor ecx, ecx
mov dword [ebp + 8], ecx
cmp dword [ebp - 0xc], eax
jbe 0x100279c3
mov ecx, dword [ebp - 4]
xor edx, edx
xor esi, esi
cmp dx, word [ecx]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
jge 0x100279a8
nop dword [eax]
mov ebx, dword [ebp - 0x10]
mov byte [ebx + eax*4 + 6], cl
add eax, edx
mov ebx, dword [ebp - 8]
and eax, ebx
cmp eax, edi
jbe 0x1002799a
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x10027992
mov ecx, dword [ebp - 4]
inc esi
movsx ecx, word [ecx]
cmp esi, ecx
mov ecx, dword [ebp + 8]
jl 0x10027980
add dword [ebp - 4], 2
inc ecx
mov dword [ebp + 8], ecx
cmp ecx, dword [ebp - 0xc]
jb 0x10027967
test eax, eax
je 0x100279c3
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
xor ebx, ebx
test eax, eax
je 0x10027a08
mov edi, dword [ebp - 0x10]
add edi, 7
movzx eax, byte [edi - 1]
lea edi, [edi + 4]
mov ecx, dword [ebp + 0x10]
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 [ebp + 0xc]
sub cl, al
mov eax, dword [ebp - 0x14]
shl si, cl
sub si, ax
mov byte [edi - 4], cl
mov word [edi - 7], si
cmp ebx, eax
jb 0x100279d2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd2
pop ebx
mov esp, ebp
pop ebp
ret