Function at 0x519270
Capabilities:
Encrypt data using rc4 prga

Disassembly:
lea eax, [edi + 1]
mov ecx, dword [ebp - 0x2c]
movzx ebx, byte [ecx + edi]
test bl, bl
mov dword [ebp - 0x1c], edx
js 0x519141
mov dword [ebp - 0x3c], eax
push ebx
call 0xf81d6510
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x38]
cmp byte [eax + 0x14], 0
je 0x519109
push esi
call 0xfdb4e8e0
add esp, 4
test al, al
jne 0x519109
cmp esi, 0x20
je 0x519109
mov eax, dword [ebp - 0x1c]
jmp 0x5192c5
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0xc], 0
je 0x51912d
mov dword [ebp - 0x18], esi
mov ecx, dword [ebp - 0x38]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
push eax
call 0xfaa58a10
add esp, 4
cmp dword [ebp - 0x14], 0
je 0x519101
cmp esi, 0x7f
ja 0x51917b
mov edx, dword [ebp - 0x1c]
lea edi, [edx + 1]
mov eax, esi
mov ecx, esi
jmp 0x519298
cmp eax, dword [ebp - 0x30]
je 0x5192e9
cmp bl, 0xe0
jb 0x519194
cmp bl, 0xef
ja 0x5191c2
and ebx, 0xf
movzx esi, byte [ebx + 0x19a2a208]
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + eax]
mov ecx, edx
shr ecx, 5
bt esi, ecx
jae 0x51933d
and dl, 0x3f
jmp 0x519215
cmp esi, 0x7ff
mov edx, dword [ebp - 0x1c]
ja 0x5191a5
mov eax, esi
shr eax, 6
or al, 0xc0
mov edi, esi
jmp 0x519280
cmp bl, 0xc2
jb 0x5192e9
and ebx, 0x1f
jmp 0x51922a
cmp esi, 0xffff
ja 0x519251
lea ecx, [edx + 1]
mov edi, esi
mov eax, esi
shr eax, 0xc
or al, 0xe0
jmp 0x51926f
cmp bl, 0xf4
ja 0x5192e9
add ebx, 0xffffff10
mov ecx, dword [ebp - 0x2c]
movzx eax, byte [ecx + eax]
mov ecx, eax
shr ecx, 4
movsx ecx, byte [ecx + 0x19a2a219]
bt ecx, ebx
jae 0x5192e9
add edi, 2
cmp edi, dword [ebp - 0x30]
je 0x5192e9
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + edi]
add dl, 0x80
cmp dl, 0x3f
ja 0x51933d
shl ebx, 6
and eax, 0x3f
or ebx, eax
mov eax, edi
inc eax
cmp eax, dword [ebp - 0x30]
je 0x51933d
shl ebx, 6
movzx ecx, dl
or ebx, ecx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
movzx ecx, byte [ecx + eax]
xor ecx, 0x80
cmp cl, 0x3f
ja 0x5192e9
shl ebx, 6
or ebx, ecx
js 0x5192e9
inc eax
jmp 0x5190d8
mov eax, esi
shr eax, 0x12
or al, 0xf0
mov edi, esi
mov ecx, esi
shr ecx, 0xc
and cl, 0x3f
or cl, 0x80
mov esi, dword [ebp - 0x20]
mov byte [esi + edx + 1], cl
lea ecx, [edx + 2]
invalid
mov esi, dword [ebp - 0x20]
jne 0x519252
mov byte [esi + edx], al
mov eax, edi
shr eax, 6
and al, 0x3f
or al, 0x80
mov edx, ecx
mov ecx, dword [ebp - 0x20]
mov byte [ecx + edx], al
mov esi, edx
inc edx
mov ecx, edi
mov eax, edi
and cl, 0x3f
or cl, 0x80
add esi, 2
mov edi, esi
mov esi, dword [ebp - 0x20]
mov byte [esi + edx], cl
test byte [ebp - 0x34], 1
jne 0x5192d5
cmp eax, ebx
setne cl
sete dl
mov ebx, dword [ebp - 0x24]
and bl, dl
mov dword [ebp - 0x24], ebx
mov edx, dword [ebp - 0x28]
and dl, cl
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x34], 0
mov eax, edi
mov edx, eax
mov edi, dword [ebp - 0x3c]
cmp edi, dword [ebp - 0x30]
jl 0x5190c7
jmp 0x5192eb
cmp eax, ebx
setne cl
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], ecx
jmp 0x5192c3
mov eax, edx
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x5192fd
mov ebx, dword [ebp - 0x24]
and bl, 1
mov byte [edx], bl
mov edi, dword [ebp + 8]
test ecx, ecx
je 0x51930c
mov edx, dword [ebp - 0x28]
and dl, 1
mov byte [ecx], dl
mov ecx, edi
push eax
mov esi, dword [ebp - 0x20]
push esi
call 0xfbb23360
test esi, esi
je 0x519327
push dword [ebp - 0x20]
call 0xfbacd665
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call 0xfbad1fa3
mov eax, edi
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
mov eax, dword [ebp - 0x1c]
jmp 0x5192eb