Function at 0x5281e0
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]
mov esi, dword [ecx + 0x10]
movzx edx, ax
mov eax, dword [ecx + 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x14]
push edi
mov edi, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x24]
sar esi, 1
sar ecx, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], ebx
je 0x52842e
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 esp, [esp]
dec ecx
mov dword [ebp - 4], ecx
mov ecx, eax
xor ecx, ebx
test cl, 2
je 0x528352
mov esi, edi
test al, 2
je 0x528283
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 0x528286
mov edx, dword [ebp + 0xc]
mov edi, dword [ebx - 2]
add ebx, 2
mov dword [ebp + 8], edi
cmp esi, 1
jle 0x5282fa
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 0x5282c3
mov esi, dword [ebp - 0x18]
mov dword [ebp + 8], edi
test esi, esi
je 0x52833a
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 0x52841a
test bl, 2
je 0x528386
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 0x5283e0
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 0x5283b6
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x52840c
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 0x528230
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret