Function at 0x526d13
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x61890c
call fcn.005d1d1c
sub esp, 0x70
push ebx
push esi
mov dword [ebp - 0x18], ecx
push edi
mov ecx, 0x6a13a0
call fcn.00506673
mov esi, dword [ebp + 0x10]
xor ebx, ebx
cmp dword [eax], ebx
push 0x8000
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x38], ebx
setne byte [ebp - 0xd]
lea edi, [esi + esi*2 + 6]
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x7c], ebx
call fcn.0050d31a
mov eax, dword [ebp - 0x78]
push edi
lea ecx, [ebp - 0x74]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], ebx
call fcn.0050d31a
mov eax, dword [ebp - 0x70]
push edi
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
call fcn.0050d31a
mov eax, dword [ebp - 0x68]
push 0x300
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 2
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x64], ebx
call fcn.0050702f
mov eax, dword [ebp - 0x60]
push 0x200
mov dword [ebp - 0x34], eax
add eax, 0x100
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x5c], ebx
call fcn.0050702f
mov ecx, dword [ebp - 0x58]
mov byte [ebp - 4], 4
mov dword [ebp - 0x40], ecx
lea eax, [ecx + 0x100]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x18]
lea edx, [eax - 3]
add eax, 3
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x44], edx
lea edx, [eax - 1]
inc eax
cmp dword [ebp - 0x34], ebx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x54], eax
je 0x527183
cmp dword [ebp - 0x30], ebx
je 0x527183
cmp dword [ebp - 0x20], ebx
je 0x527183
cmp dword [ebp - 0x2c], ebx
je 0x527183
cmp ecx, ebx
je 0x527183
cmp edi, ebx
jle 0x526e37
mov ecx, edi
mov edi, dword [ebp - 0x20]
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x30]
mov ecx, 0x4000
or eax, 0xffffffff
mov dword [ebp + 0x18], ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x14]
mov dword [ebp + 0x1c], eax
mov edx, 0x100
sub dword [ebp + 0x1c], ecx
sub eax, ecx
lea edi, [eax + 0x200]
mov eax, dword [ebp + 0x1c]
or byte [edi + ecx], 0xff
mov byte [eax + ecx], bl
mov al, byte [ebp + 0x18]
inc dword [ebp + 0x18]
mov byte [ecx], al
inc ecx
cmp dword [ebp + 0x18], edx
jl 0x526e60
mov eax, dword [ebp - 0x1c]
mov ecx, 0xffffff00
sub ecx, dword [ebp - 0x40]
mov dword [ebp + 0x18], ecx
mov edi, dword [ebp - 0x18]
mov cl, byte [edi + 0x1139]
neg cl
mov byte [eax - 0x100], cl
mov cl, byte [edi + 0x1139]
mov byte [eax], cl
mov ecx, dword [ebp + 0x18]
inc eax
add ecx, eax
cmp ecx, edx
jl 0x526e86
mov ecx, edi
movsx edx, byte [ecx + 0x1139]
mov eax, edx
neg eax
jmp 0x526ec6
mov edx, dword [ebp - 0x1c]
mov byte [edx + eax], al
inc eax
movsx edx, byte [ecx + 0x1139]
cmp eax, edx
jle 0x526eb8
cmp dword [ebp + 0x14], ebx
mov dword [ebp + 0x18], ebx
ja 0x526edd
xor esi, esi
inc esi
jmp 0x527185
mov esi, dword [ebp + 0x10]
cmp dword [ebp - 0x38], ebx
je 0x526f05
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x20]
add dword [ebp + 8], ecx
mov ecx, dword [ebp - 0x48]
or eax, 0xffffffff
add dword [ebp + 0xc], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
lea edi, [ecx + 6]
lea ecx, [esi + esi*2]
lea esi, [edx + ecx*2]
jmp 0x526f1e
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], 1
lea edi, [eax + 6]
lea eax, [esi + esi*2]
lea esi, [ecx + eax*2]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 0x10]
mov word [esi + 4], bx
cmp ecx, ebx
mov word [esi + 2], bx
mov word [esi], bx
jbe 0x5270f7
lea eax, [eax + eax*2]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
cmp dword [eax + 4], ebx
movzx ecx, byte [ecx]
movsx eax, word [edi]
jne 0x526f84
sar eax, 1
add edx, eax
movzx eax, byte [ecx + edx]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
movsx eax, word [edi + 2]
movzx ecx, byte [ecx + 1]
sar eax, 1
add edx, eax
movzx eax, byte [ecx + edx]
movsx ecx, word [edi + 4]
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 8]
sar ecx, 1
movzx eax, byte [eax + 2]
jmp 0x526fc1
add eax, 8
sar eax, 4
add edx, eax
movzx eax, byte [ecx + edx]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
movsx eax, word [edi + 2]
movzx ecx, byte [ecx + 1]
add eax, 8
sar eax, 4
add edx, eax
movzx eax, byte [ecx + edx]
mov ecx, dword [ebp + 8]
mov dword [ebp + 0x1c], eax
movsx eax, word [edi + 4]
movzx ecx, byte [ecx + 2]
add eax, 8
sar eax, 4
mov edx, dword [ebp - 0x14]
add edx, eax
movzx eax, byte [ecx + edx]
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
mov ecx, 0xf8
and eax, ecx
and edx, ecx
mov ecx, dword [ebp - 0x28]
shl eax, 5
or eax, edx
shl eax, 2
sar ecx, 3
or eax, ecx
mov ecx, dword [ebp - 0x30]
lea eax, [ecx + eax*2]
mov dword [ebp - 0x3c], eax
cmp word [eax], bx
jge 0x527019
push dword [ebp + 0x28]
mov ecx, dword [ebp - 0x18]
push dword [ebp + 0x24]
push dword [ebp - 0x28]
push dword [ebp + 0x1c]
push dword [ebp - 0x24]
call fcn.005271d3
mov ecx, dword [ebp - 0x3c]
mov word [ecx], ax
mov eax, ecx
mov edx, dword [ebp + 0xc]
mov cl, byte [eax]
mov byte [edx], cl
mov ecx, dword [ebp + 0x28]
movsx eax, word [eax]
mov edx, dword [ebp - 0x1c]
add ecx, eax
mov dword [ebp - 0x3c], ecx
movzx eax, byte [ecx]
movzx ecx, byte [ecx + 0x100]
sub edx, eax
mov eax, dword [ebp - 0x24]
movsx eax, byte [edx + eax]
mov edx, dword [ebp - 0x1c]
sub edx, ecx
mov ecx, dword [ebp + 0x1c]
movsx ecx, byte [edx + ecx]
mov edx, dword [ebp - 0x1c]
mov dword [ebp + 0x1c], ecx
mov ecx, dword [ebp - 0x3c]
movzx ecx, byte [ecx + 0x200]
sub edx, ecx
mov ecx, dword [ebp - 0x28]
movsx ecx, byte [edx + ecx]
mov edx, dword [ebp - 0x18]
cmp dword [edx + 4], ebx
jne 0x527088
lea edx, [edi + 6]
mov word [esi], ax
add word [edx], ax
mov eax, dword [ebp + 0x1c]
mov word [esi + 2], ax
add word [edi + 8], ax
mov word [esi + 4], cx
jmp 0x5270d9
lea edx, [eax + eax]
mov word [esi - 6], ax
add eax, edx
add word [esi + 6], ax
add eax, edx
add word [esi], ax
add eax, edx
lea edx, [edi + 6]
mov dword [ebp - 0x3c], edx
add word [edx], ax
mov eax, dword [ebp + 0x1c]
mov word [esi - 4], ax
lea edx, [eax + eax]
add eax, edx
add word [esi + 8], ax
add eax, edx
add word [esi + 2], ax
add eax, edx
add word [edi + 8], ax
lea eax, [ecx + ecx]
mov edx, dword [ebp - 0x3c]
mov word [esi - 2], cx
add ecx, eax
add word [esi + 0xa], cx
add ecx, eax
add word [esi + 4], cx
add ecx, eax
mov eax, dword [ebp - 0x4c]
add word [edi + 0xa], cx
add dword [ebp + 8], eax
mov eax, dword [ebp - 0x34]
add dword [ebp + 0xc], eax
sub esi, 6
dec dword [ebp - 0x40]
mov edi, edx
jne 0x526f3d
mov eax, dword [ebp + 0x18]
push 2
cdq
pop ecx
idiv ecx
cmp edx, 1
jne 0x527111
mov eax, dword [ebp - 0x50]
add dword [ebp + 8], eax
mov eax, dword [ebp - 0x54]
add dword [ebp + 0xc], eax
xor eax, eax
cmp dword [ebp - 0x38], ebx
sete al
cmp byte [ebp - 0xd], bl
mov dword [ebp - 0x38], eax
je 0x527166
mov esi, 0x6a13a0
mov ecx, esi
call fcn.00506673
cmp dword [eax + 4], 1
jne 0x527160
mov ecx, esi
call fcn.00506673
cmp dword [eax], ebx
je 0x527160
mov ecx, esi
call fcn.00506673
mov ecx, esi
mov edi, eax
call fcn.00506673
push dword [eax + 8]
push dword [ebp + 0x14]
push dword [ebp + 0x18]
call dword [edi]
neg eax
sbb eax, eax
inc eax
jmp 0x527162
xor eax, eax
cmp eax, ebx
jne 0x52717a
inc dword [ebp + 0x18]
mov eax, dword [ebp + 0x18]
cmp eax, dword [ebp + 0x14]
jb 0x526eda
jmp 0x526ed2
mov eax, dword [ebp - 0x18]
mov dword [eax], 0xe
xor esi, esi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.00521530
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.00521530
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.00521530
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], bl
call fcn.00521530
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.00521530
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x24