Function at 0x525390
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, ecx
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov edx, dword [eax]
cmp dword [eax + 0x10], ecx
jle 0x525682
push ebx
push esi
push edi
nop
mov eax, dword [eax + 0x18]
mov esi, edx
lea edx, [edx + eax*4]
mov eax, dword [esi]
dec eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x525667
mov eax, dword [ebp - 0x18]
add esi, 4
mov ebx, dword [ebp + 8]
xor edi, edi
mov edx, dword [esi]
mov dword [ebp - 4], edx
mov edx, dword [eax + 8]
add edx, ecx
mov ecx, dword [ebx]
mov eax, dword [ecx + 0xc]
imul eax, edx
sub edx, dword [ebx + 0x10]
add eax, dword [ecx]
mov ecx, dword [ebx + 4]
mov dword [ebx + 0x14], eax
mov eax, edx
cdq
idiv dword [ecx + 0x18]
imul edx, dword [ecx + 0xc]
add edx, dword [ecx]
sub dword [ebp - 0xc], 1
mov ecx, dword [ebp - 4]
mov dword [ebx + 0x18], edx
js 0x5255f4
nop dword [eax]
mov eax, dword [esi + 4]
add esi, 8
mov dword [ebp - 8], eax
mov dword [ebp - 0x2c], esi
mov eax, dword [esi]
mov dword [ebp - 0x24], eax
cdq
and edx, 0xff
lea esi, [edx + eax]
mov eax, ecx
cdq
and edx, 0xff
sar esi, 8
lea ecx, [edx + eax]
sar ecx, 8
cmp esi, ecx
jne 0x525454
mov ecx, dword [ebp - 0x24]
mov eax, ecx
sub eax, dword [ebp - 4]
imul eax, dword [ebp - 8]
add edi, eax
jmp 0x5255e4
mov edx, dword [ebp - 4]
movzx eax, dl
mov edx, 0x100
sub edx, eax
imul edx, dword [ebp - 8]
lea eax, [edi + edx]
cdq
and edx, 0xff
add edx, eax
sar edx, 8
mov dword [ebp - 0x28], edx
test edx, edx
jle 0x525509
mov eax, dword [ebx]
mov edi, dword [eax + 0x10]
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 4]
imul edi, ecx
mov dword [ebp - 4], eax
mov eax, ecx
sub eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 4]
add edi, dword [ebp - 0x1c]
cmp edx, 0xff
cdq
jl 0x5254c9
idiv dword [ebx + 0x14]
mov eax, ebx
mov ebx, dword [ebp + 8]
imul edx, dword [eax + 0x10]
mov eax, dword [ebx + 0x18]
movzx ebx, byte [edx + eax + 3]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
jmp 0x5254eb
idiv dword [ebx + 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [ebp + 8]
imul edx, dword [eax + 0x10]
mov eax, dword [ebx + 0x18]
movzx ebx, byte [edx + eax + 3]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
imul eax, dword [ebp - 0x28]
sar eax, 8
inc eax
mov edx, 0x100
imul ebx, eax
movzx eax, byte [edi]
shr ebx, 8
sub edx, ebx
imul edx, eax
sar edx, 8
add dl, bl
mov ebx, dword [ebp + 8]
mov byte [edi], dl
mov edx, dword [ebp - 8]
test edx, edx
jle 0x5255d8
inc ecx
sub esi, ecx
mov dword [ebp - 4], esi
test esi, esi
jle 0x5255d8
mov eax, dword [ebx]
mov eax, dword [eax + 0x10]
mov edi, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 8]
imul edi, ecx
sub ecx, dword [ebx + 0xc]
imul eax, edx
add edi, dword [ebx + 0x14]
sar eax, 8
cmp eax, 0xfe
jge 0x525596
inc eax
mov dword [ebp - 0x28], eax
nop dword [eax]
mov esi, dword [ebx + 4]
mov eax, ecx
cdq
inc ecx
idiv dword [esi + 0x14]
mov esi, dword [esi + 0x10]
mov eax, dword [ebx + 0x18]
imul esi, edx
mov edx, 0x100
movzx ebx, byte [esi + eax + 3]
imul ebx, dword [ebp - 0x28]
movzx eax, byte [edi]
shr ebx, 8
sub edx, ebx
imul edx, eax
mov eax, dword [ebp - 4]
dec eax
mov dword [ebp - 4], eax
sar edx, 8
add dl, bl
mov ebx, dword [ebp + 8]
mov byte [edi], dl
add edi, dword [ebp - 0x20]
test eax, eax
jg 0x525550
jmp 0x5255d5
mov esi, dword [ebx + 4]
mov eax, ecx
cdq
inc ecx
idiv dword [esi + 0x14]
mov esi, dword [esi + 0x10]
mov eax, dword [ebx + 0x18]
imul esi, edx
mov edx, 0x100
mov bl, byte [esi + eax + 3]
movzx eax, bl
sub edx, eax
movzx eax, byte [edi]
imul edx, eax
mov eax, dword [ebp - 4]
dec eax
mov dword [ebp - 4], eax
sar edx, 8
add dl, bl
mov ebx, dword [ebp + 8]
mov byte [edi], dl
add edi, dword [ebp - 0x20]
test eax, eax
jg 0x525596
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp + 8]
movzx edi, cl
imul edi, edx
sub dword [ebp - 0xc], 1
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 4], ecx
jns 0x525410
mov eax, edi
cdq
and edx, 0xff
lea edi, [edx + eax]
sar edi, 8
test edi, edi
jle 0x525664
mov eax, ecx
mov ecx, dword [ebx]
cdq
and edx, 0xff
add eax, edx
mov edx, dword [ebx + 0x14]
mov esi, dword [ecx + 0x10]
mov ecx, dword [ebx + 4]
sar eax, 8
imul esi, eax
sub eax, dword [ebx + 0xc]
add esi, edx
cdq
idiv dword [ecx + 0x14]
mov eax, dword [ebx + 0x18]
imul edx, dword [ecx + 0x10]
mov ecx, 0x100
movzx edx, byte [edx + eax + 3]
mov eax, dword [ebx + 8]
cmp edi, 0xff
jge 0x52564e
imul eax, edi
sar eax, 8
inc eax
imul edx, eax
movzx eax, byte [esi]
shr edx, 8
sub ecx, edx
imul ecx, eax
sar ecx, 8
add cl, dl
mov byte [esi], cl
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ecx + 0x10]
mov ecx, eax
mov eax, dword [ebp - 0x18]
jl 0x5253b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4