Function at 0x528f50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
lea edi, [esi + 0x68]
mov eax, dword [esi + 0x3c]
mov ebp, edi
mov ecx, edi
cmp eax, 0x102
ja 0x528f9d
push esi
call fcn.004cc430
mov eax, dword [esi + 0x3c]
add esp, 4
mov edx, dword [esp + 0x1c]
cmp eax, 0x102
ja 0x528f92
test edx, edx
je 0x529161
lea edi, [esi + 0x68]
test eax, eax
je 0x529169
lea ecx, [esi + 0x68]
mov edi, ecx
cmp eax, 3
jb 0x52901e
mov edx, dword [ebp]
test edx, edx
je 0x52901e
mov eax, dword [esi + 0x48]
mov bl, byte [eax + edx]
cmp byte [eax + edx - 1], bl
mov ebx, dword [esp + 0x10]
jne 0x52901e
mov cl, byte [eax + edx]
cmp cl, byte [eax + edx + 1]
jne 0x52901e
lea edi, [eax + edx]
xor ecx, ecx
movzx eax, word [eax + edx - 1]
mov edx, eax
shl edx, 0x10
or edx, eax
mov eax, dword [edi + ecx + 2]
xor eax, edx
jne 0x528fef
add ecx, 4
cmp ecx, 0x100
jb 0x528fd5
mov eax, 0x100
jmp 0x528ffe
tzcnt eax, eax
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, ecx
mov ebx, dword [esi + 0x3c]
lea edi, [esi + 0x68]
add eax, 2
cmp eax, ebx
cmovbe ebx, eax
mov eax, 0x102
cmp ebx, 0x102
cmova ebx, eax
mov dword [esp + 0x10], ebx
cmp ebx, 3
jb 0x5290af
mov ecx, dword [esi + 0x16f0]
lea edx, [ebx - 3]
mov eax, dword [esi + 0x16ec]
mov byte [ecx + eax], 1
mov ecx, dword [esi + 0x16f0]
mov eax, dword [esi + 0x16ec]
inc ecx
mov dword [esi + 0x16f0], ecx
mov byte [ecx + eax], 0
mov ecx, dword [esi + 0x16f0]
mov eax, dword [esi + 0x16ec]
inc ecx
mov dword [esi + 0x16f0], ecx
mov byte [ecx + eax], dl
xor ecx, ecx
inc dword [esi + 0x16f0]
inc dword [esi + 0x1700]
movzx eax, byte [edx + 0x59fe90]
inc word [esi + eax*4 + 0x4e8]
movzx eax, byte [0x59fc90]
inc word [esi + eax*4 + 0x9d8]
mov eax, dword [esi + 0x16f0]
cmp eax, dword [esi + 0x16f4]
sete cl
sub dword [esi + 0x3c], ebx
add dword [edi], ebx
xor ebx, ebx
mov dword [esp + 0x10], ebx
jmp 0x52911b
mov ecx, dword [edi]
mov eax, dword [esi + 0x48]
mov dl, byte [ecx + eax]
mov ecx, dword [esi + 0x16f0]
mov eax, dword [esi + 0x16ec]
mov byte [ecx + eax], 0
mov ecx, dword [esi + 0x16f0]
mov eax, dword [esi + 0x16ec]
inc ecx
mov dword [esi + 0x16f0], ecx
mov byte [ecx + eax], 0
mov ecx, dword [esi + 0x16f0]
mov eax, dword [esi + 0x16ec]
inc ecx
mov dword [esi + 0x16f0], ecx
mov byte [ecx + eax], dl
xor ecx, ecx
inc dword [esi + 0x16f0]
movzx eax, dl
inc word [esi + eax*4 + 0xe4]
mov eax, dword [esi + 0x16f0]
cmp eax, dword [esi + 0x16f4]
sete cl
dec dword [esi + 0x3c]
inc dword [edi]
mov edx, dword [edi]
mov ebp, edi
test ecx, ecx
je 0x528f62
mov ecx, dword [esi + 0x58]
test ecx, ecx
js 0x529135
mov eax, dword [esi + 0x48]
add eax, ecx
jmp 0x529137
xor eax, eax
push 0
sub edx, ecx
push edx
push eax
push esi
call fcn.00528bd0
mov eax, dword [ebp]
mov edi, ebp
push dword [esi]
mov dword [esi + 0x58], eax
call fcn.004cc610
mov eax, dword [esi]
add esp, 0x14
cmp dword [eax + 0x10], 0
jne 0x528f62
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov dword [esi + 0x1704], 0
cmp edx, 4
jne 0x5291b8
mov edx, dword [esi + 0x58]
test edx, edx
js 0x529186
mov ecx, dword [esi + 0x48]
add ecx, edx
jmp 0x529188
xor ecx, ecx
mov eax, dword [edi]
push 1
sub eax, edx
push eax
push ecx
push esi
call fcn.00528bd0
mov eax, dword [edi]
push dword [esi]
mov dword [esi + 0x58], eax
call fcn.004cc610
mov ecx, dword [esi]
add esp, 0x14
xor eax, eax
cmp dword [ecx + 0x10], eax
pop edi
pop esi
setne al
pop ebp
add eax, 2
pop ebx
pop ecx
ret
cmp dword [esi + 0x16f0], 0
je 0x5291fa
mov edx, dword [esi + 0x58]
test edx, edx
js 0x5291cf
mov ecx, dword [esi + 0x48]
add ecx, edx
jmp 0x5291d1
xor ecx, ecx
mov eax, dword [edi]
push 0
sub eax, edx
push eax
push ecx
push esi
call fcn.00528bd0
mov eax, dword [edi]
push dword [esi]
mov dword [esi + 0x58], eax
call fcn.004cc610
mov eax, dword [esi]
add esp, 0x14
cmp dword [eax + 0x10], 0
je 0x529161
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret