Function at 0x525e40
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 0x52612a
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 0x52610f
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 0x52609d
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 0x525f04
mov ecx, dword [ebp - 0x24]
mov eax, ecx
sub eax, dword [ebp - 4]
imul eax, dword [ebp - 8]
add edi, eax
jmp 0x52608d
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 0x525fb7
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 0x525f78
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]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
jmp 0x525f99
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]
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 0x526081
inc ecx
sub esi, ecx
mov dword [ebp - 4], esi
test esi, esi
jle 0x526081
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 0x526040
inc eax
mov dword [ebp - 0x28], 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]
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 0x525ff7
jmp 0x52607e
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]
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 0x526040
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 0x525ec0
mov eax, edi
cdq
and edx, 0xff
lea edi, [edx + eax]
sar edi, 8
test edi, edi
jle 0x52610c
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]
mov eax, dword [ebx + 8]
cmp edi, 0xff
jge 0x5260f6
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 0x525e60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4