Function at 0x529ab0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push ebx
push ebp
lea eax, [eax + edx*2]
mov dword [esp + 0x14], ecx
add eax, 2
mov ebp, 1
mov dword [esp + 0x10], eax
lea eax, [edx + 1]
mov dword [esp + 8], eax
xor edx, edx
mov eax, ebp
shl eax, cl
mov dword [esp + 0x30], eax
push esi
xor esi, esi
lea ebx, [eax - 1]
mov eax, ecx
xor ecx, ecx
mov dword [esp + 0x10], ebx
bts ecx, eax
cmp eax, 0x20
push edi
cmovae edx, ecx
mov edi, ebx
mov ebx, dword [esp + 0x34]
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 0x529d90
jb 0x529b32
cmp eax, dword [esp + 0x40]
ja 0x529d90
cmp dword [esp + 0x34], 0xff
ja 0x529d90
mov eax, dword [esp + 0x1c]
cmp eax, 0xc
jbe 0x529b56
pop edi
pop esi
pop ebp
mov eax, 0xffffffd4
pop ebx
add esp, 0x18
ret
mov esi, dword [esp + 0x10]
lea ecx, [eax - 1]
mov word [esp + 0x36], bp
xor edx, edx
shl bp, cl
mov word [esp + 0x34], ax
movzx eax, bp
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x40], eax
test esi, esi
je 0x529bd1
mov esi, dword [esp + 0x2c]
mov ebx, ebp
mov ecx, dword [esp + 0x3c]
add esi, 6
mov ebp, dword [esp + 0x10]
sub ebx, ecx
lea esi, [esi + edi*4]
movzx eax, word [ebx + ecx]
cmp ax, 0xffff
jne 0x529ba8
mov byte [esi], dl
dec edi
sub esi, 4
mov eax, 1
jmp 0x529bba
cmp ax, word [esp + 0x40]
jl 0x529bba
xor ebp, ebp
mov word [esp + 0x36], bp
mov ebp, dword [esp + 0x10]
mov word [ecx], ax
inc edx
add ecx, 2
cmp edx, ebp
jb 0x529b91
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov dword [ecx], eax
mov eax, dword [esp + 0x38]
mov ecx, eax
shr ecx, 3
shr eax, 1
cmp edi, ebx
jne 0x529cce
lea edi, [eax + 3]
xor esi, esi
add edi, ecx
mov dword [esp + 0x34], esi
xor eax, eax
mov dword [esp + 0x40], edi
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
cmp dword [esp + 0x10], eax
jbe 0x529c78
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
nop word [eax + eax]
mov edi, dword [esp + 0x18]
movsx ecx, word [ebp + eax*2]
add edi, esi
mov dword [esp + 0x20], ecx
mov dword [edi], ebx
mov dword [edi + 4], edx
cmp ecx, 8
jle 0x529c5b
add ecx, 0xfffffff7
mov dword [edi + 8], ebx
shr ecx, 2
lea esi, [edi + 8]
and ecx, 0x3ffffffe
mov dword [edi + 0xc], edx
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x34]
add esi, ecx
inc eax
add ebx, 0x1010101
mov dword [esp + 0x34], esi
adc edx, 0x1010101
cmp eax, dword [esp + 0x10]
jb 0x529c20
mov ebx, dword [esp + 0x14]
xor edx, edx
xor esi, esi
cmp dword [esp + 0x38], edx
jbe 0x529d36
mov ebp, dword [esp + 0x18]
nop word [eax + eax]
movzx eax, byte [esi + ebp]
mov ecx, edx
mov edi, dword [esp + 0x2c]
and ecx, ebx
mov byte [edi + ecx*4 + 6], al
mov edi, dword [esp + 0x40]
movzx eax, byte [esi + ebp + 1]
add esi, 2
mov ebp, dword [esp + 0x2c]
lea ecx, [edi + edx]
and ecx, ebx
lea edx, [edx + edi*2]
and edx, ebx
mov byte [ebp + ecx*4 + 6], al
mov ebp, dword [esp + 0x18]
cmp esi, dword [esp + 0x38]
jb 0x529c90
mov ebx, dword [esp + 0x38]
jmp 0x529d3e
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
xor ecx, ecx
mov dword [esp + 0x34], ecx
test esi, esi
je 0x529d36
nop
xor ebx, ebx
xor esi, esi
cmp bx, word [ebp]
jge 0x529d19
nop word [eax + eax]
mov ebx, dword [esp + 0x2c]
mov byte [ebx + eax*4 + 6], cl
add eax, edx
mov ebx, dword [esp + 0x14]
and eax, ebx
cmp eax, edi
jbe 0x529d0c
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x529d04
movsx ecx, word [ebp]
inc esi
cmp esi, ecx
mov ecx, dword [esp + 0x34]
jl 0x529cf0
inc ecx
add ebp, 2
mov dword [esp + 0x34], ecx
cmp ecx, dword [esp + 0x10]
jb 0x529ce0
test eax, eax
je 0x529d36
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x529d86
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x3c]
add esi, 7
movzx edi, bx
nop dword [eax]
movzx eax, byte [esi - 1]
lea esi, [esi + 4]
lea ecx, [eax*2]
movzx edx, word [ecx + ebp]
lea eax, [edx + 1]
mov word [ecx + ebp], ax
mov eax, edx
mov cl, byte [esp + 0x1c]
bsr eax, eax
sub cl, al
shl dx, cl
sub dx, di
mov byte [esi - 4], cl
mov word [esi - 7], dx
sub ebx, 1
jne 0x529d50
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
mov eax, 0xffffffd2
pop ebx
add esp, 0x18
ret