Function at 0x648c38
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
pushal
mov esi, dword [0x7d2b70]
mov edi, dword [0x7d2b78]
mov ebp, dword [0x7d2ba8]
mov ebx, dword [0x7d2b4c]
test dword [0x7d2b5c], 0xffffffff
je 0x648ca1
mov eax, dword [0x7d2b5c]
sub dword [0x7d2b84], eax
mov edx, dword [0x7d2b84]
test edx, edx
jns 0x648c8b
shl edx, 6
and edx, 0xffffff00
add edx, dword [0x7d2b94]
jns 0x648c85
xor edx, edx
mov dword [0x7d2b94], edx
xor edx, edx
idiv dword [ebx - 4]
mov dword [0x7d2b5c], edx
lea edx, [ebx + edx*4]
mov esi, dword [edx]
add esi, dword [0x7d2b70]
dec dword [0x7d2b84]
jns 0x648cc1
test dword [0x7d2b94], 0xffffffff
je 0x648cc1
test dword [0x7d2b84], 3
jne 0x648cc1
mov ecx, dword [0x7d2b7c]
and ecx, 0xffff
mov edx, dword [0x7d2bac]
test edx, edx
je 0x648dc2
xchg ecx, edx
lodsb al, byte [esi]
cmp al, 0xff
jne 0x648d0b
lodsb al, byte [esi]
and eax, 0xff
sub ecx, eax
js 0x648cee
jne 0x648cdd
lea edi, [edi + ecx*2]
neg ecx
sub edx, ecx
je 0x648eee
jns 0x648dc0
neg edx
lea edi, [edi + edx*2]
jmp 0x648eee
cmp al, 0xfe
je 0x648d1d
test dword [0x7d2b84], 0xffffffff
jns 0x648d7c
js 0x648d1e
lodsb al, byte [esi]
and eax, 0xff
lea esi, [eax + esi]
sub ecx, eax
jns 0x648d72
lea esi, [ecx + esi]
neg ecx
mov eax, ecx
sub edx, eax
jns 0x648d39
add eax, edx
xor edx, edx
push edx
mov ecx, eax
mov dx, word [edi]
mov eax, dword [0x7d2b94]
and edx, 0xf7de
mov al, byte [esi]
mov ax, word [ebp + eax*2]
shr edx, 1
and eax, 0xf7de
shr eax, 1
inc esi
add eax, edx
sub edi, 2
mov word [edi + 2], ax
dec ecx
jne 0x648d3c
pop ecx
test ecx, ecx
je 0x648eee
jmp 0x648dc2
jne 0x648cdd
mov ecx, edx
jmp 0x648dc2
and eax, 0xff
lea esi, [eax + esi]
sub ecx, eax
jns 0x648dba
lea esi, [ecx + esi]
neg ecx
mov eax, ecx
sub edx, eax
jns 0x648d97
add eax, edx
xor edx, edx
mov ecx, eax
mov eax, dword [0x7d2b94]
sub edi, 2
mov al, byte [esi]
inc esi
mov ax, word [ebp + eax*2]
mov word [edi + 2], ax
dec ecx
jne 0x648d99
add ecx, edx
je 0x648eee
jmp 0x648dc2
jne 0x648cdd
mov ecx, edx
lodsb al, byte [esi]
cmp al, 0xff
jne 0x648de6
mov al, byte [esi]
inc esi
and eax, 0xff
neg eax
lea edi, [edi + eax*2]
add ecx, eax
jns 0x648ddf
neg ecx
lea edi, [edi + ecx*2]
xor ecx, ecx
jne 0x648dc2
jmp 0x648eee
cmp al, 0xfe
je 0x648df8
test dword [0x7d2b84], 0xffffffff
jns 0x648e3d
js 0x648df9
lodsb al, byte [esi]
and eax, 0xff
sub ecx, eax
jns 0x648e06
add eax, ecx
xor ecx, ecx
push ecx
mov ecx, eax
mov edx, dword [edi]
mov eax, dword [0x7d2b94]
and edx, 0xf7de
mov al, byte [esi]
mov ax, word [ebp + eax*2]
shr edx, 1
and eax, 0xf7de
shr eax, 1
inc esi
add eax, edx
sub edi, 2
mov word [edi + 2], ax
dec ecx
jne 0x648e09
pop ecx
test ecx, ecx
jne 0x648dc2
jmp 0x648eee
mov edx, dword [0x7d2b94]
shl edx, 1
and eax, 0xff
sub ecx, eax
jns 0x648e52
add eax, ecx
xor ecx, ecx
push ecx
mov ecx, eax
add ebp, edx
cmp ecx, 8
jge 0x648e75
mov al, byte [esi]
inc esi
and eax, 0xff
sub edi, 2
mov ax, word [ebp + eax*2]
dec ecx
mov word [edi + 2], ax
jne 0x648e5c
jmp 0x648ee3
sub edi, 2
test edi, 2
je 0x648e95
mov al, byte [esi]
inc esi
and eax, 0xff
sub edi, 2
mov ax, word [ebp + eax*2]
dec ecx
mov word [edi + 4], ax
sub ecx, 2
mov al, byte [esi]
inc esi
and eax, 0xff
sub edi, 4
mov dx, word [ebp + eax*2]
mov al, byte [esi]
shl edx, 0x10
inc esi
mov dx, word [ebp + eax*2]
sub ecx, 2
mov dword [edi + 4], edx
jns 0x648e98
add edi, 2
test ecx, 1
je 0x648edb
mov al, byte [esi]
inc esi
and eax, 0xff
sub edi, 2
mov ax, word [ebp + eax*2]
dec ecx
mov word [edi + 2], ax
mov edx, dword [0x7d2b94]
shl edx, 1
pop ecx
sub ebp, edx
test ecx, ecx
jne 0x648dc2
test dword [0x7d2b50], 0xffffffff
jns 0x648f1a
mov esi, dword [0x7d2b5c]
dec esi
jns 0x648f07
mov esi, dword [ebx - 4]
dec esi
mov dword [0x7d2b5c], esi
lea esi, [ebx + esi*4]
mov esi, dword [esi]
add esi, dword [0x7d2b70]
jmp 0x648f39
mov esi, dword [0x7d2b5c]
inc esi
cmp esi, dword [ebx - 4]
jne 0x648f28
xor esi, esi
mov dword [0x7d2b5c], esi
lea esi, [ebx + esi*4]
mov esi, dword [esi]
add esi, dword [0x7d2b70]
add edi, dword [0x7d2b98]
sub dword [0x7d2b7c], 0x10000
jns 0x648ca1
popal
ret