Function at 0x10027740
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, dword [ecx + 4]
mov esi, dword [ecx + 0x14]
movzx edx, ax
mov eax, dword [ecx + 0x24]
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x1c]
push edi
mov edi, dword [ecx + 0x20]
mov ecx, dword [ecx + 0x2c]
sar esi, 1
sar ecx, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], ebx
je 0x1002798e
add esi, esi
add ecx, ecx
mov dword [ebp - 0x14], esi
mov esi, edx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 4]
mov dword [ebp + 8], esi
lea ecx, [ecx]
dec ecx
mov dword [ebp - 4], ecx
mov ecx, eax
xor ecx, ebx
test cl, 2
je 0x100278b2
mov esi, edi
test al, 2
je 0x100277e3
movzx esi, word [ebx]
movzx edi, word [eax]
mov ebx, esi
movzx ecx, dx
mov edx, edi
mov edi, dword [ebp + 0xc]
and ebx, ecx
movzx ecx, di
and edx, ecx
add ebx, edx
mov edx, edi
movzx edi, word [eax]
mov ecx, edx
not ecx
shr ebx, 1
and ecx, esi
mov esi, dword [ebp - 0xc]
and ecx, edi
add ebx, ecx
mov word [eax], bx
add eax, 2
mov ebx, dword [ebp - 8]
add ebx, 2
dec esi
jmp 0x100277e6
mov edx, dword [ebp + 0xc]
mov edi, dword [ebx - 2]
add ebx, 2
mov dword [ebp + 8], edi
cmp esi, 1
jle 0x1002785a
movzx edx, dx
mov ecx, edx
shl ecx, 0xf
mov dword [ebp + 8], ecx
mov ecx, edx
shr ecx, 1
or dword [ebp + 8], ecx
mov ecx, edx
shl ecx, 0x10
or ecx, edx
not ecx
mov dword [ebp - 0x10], ecx
lea ecx, [esi - 2]
shr ecx, 1
inc ecx
mov dword [ebp - 8], ecx
neg ecx
lea esi, [esi + ecx*2]
mov dword [ebp - 0x18], esi
mov ecx, dword [ebx]
mov esi, dword [eax]
mov edx, dword [ebp - 0x10]
shl ecx, 0x10
shr edi, 0x10
add ecx, edi
mov edi, dword [ebx]
and edx, ecx
add ebx, 4
and edx, esi
shr ecx, 1
and ecx, dword [ebp + 8]
shr esi, 1
add edx, ecx
and esi, dword [ebp + 8]
add edx, esi
mov dword [eax], edx
add eax, 4
sub dword [ebp - 8], 1
jne 0x10027823
mov esi, dword [ebp - 0x18]
mov dword [ebp + 8], edi
test esi, esi
je 0x1002789a
mov ecx, dword [ebp + 8]
add ebx, 2
movzx edi, word [eax]
mov edx, dword [ebp + 0xc]
shr ecx, 0x10
movzx esi, cx
mov dword [ebp + 8], ecx
movzx ecx, dx
mov edx, edi
mov edi, dword [ebp + 0xc]
and esi, ecx
movzx ecx, di
and edx, ecx
mov ecx, edi
movzx edi, word [eax]
not ecx
and ecx, dword [ebp + 8]
add esi, edx
shr esi, 1
and ecx, edi
add esi, ecx
mov word [eax], si
add eax, 2
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffffe
add ebx, ecx
mov ecx, dword [ebp + 0xc]
movzx edx, cx
mov esi, edx
mov dword [ebp + 8], esi
jmp 0x1002797a
test bl, 2
je 0x100278e6
movzx esi, word [ebx]
add ebx, 2
movzx edx, word [eax]
mov ecx, esi
and ecx, dword [ebp + 8]
mov edi, edx
and edi, dword [ebp + 8]
add edi, ecx
mov ecx, dword [ebp + 0xc]
not ecx
shr edi, 1
and ecx, edx
and ecx, esi
mov esi, dword [ebp + 8]
add edi, ecx
mov word [eax], di
add eax, 2
mov edi, dword [ebp - 0xc]
dec edi
cmp edi, 1
jle 0x10027940
mov edx, esi
mov ecx, esi
shr ecx, 1
shl edx, 0xf
or edx, ecx
mov ecx, esi
shl ecx, 0x10
or ecx, esi
mov dword [ebp - 8], edx
not ecx
mov dword [ebp - 0x18], ecx
lea ecx, [edi - 2]
shr ecx, 1
inc ecx
mov dword [ebp - 0x10], ecx
neg ecx
lea edi, [edi + ecx*2]
mov dword [ebp - 0x1c], edi
mov edi, dword [eax]
mov ecx, dword [ebx]
shr ecx, 1
and ecx, dword [ebp - 8]
shr edi, 1
and edi, dword [ebp - 8]
add edi, ecx
mov ecx, dword [ebp - 0x18]
and ecx, dword [eax]
and ecx, dword [ebx]
add ebx, 4
add edi, ecx
mov dword [eax], edi
add eax, 4
sub dword [ebp - 0x10], 1
jne 0x10027916
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x1002796c
movzx edx, word [eax]
movzx esi, word [ebx]
mov edi, edx
and edi, dword [ebp + 8]
mov ecx, esi
and ecx, dword [ebp + 8]
add ebx, 2
add edi, ecx
mov ecx, dword [ebp + 0xc]
not ecx
shr edi, 1
and ecx, edx
and ecx, esi
add edi, ecx
mov word [eax], di
add eax, 2
mov ecx, dword [ebp + 0xc]
add ebx, dword [ebp - 0x14]
movzx edx, cx
mov esi, edx
mov dword [ebp + 8], edx
add eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 8], ebx
test ecx, ecx
jne 0x10027790
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret