Function at 0x4683e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x18], ecx
lea eax, [eax + edx*2]
add eax, 2
mov dword [ebp - 4], eax
lea eax, [edx + 1]
mov dword [ebp - 0xc], eax
xor edx, edx
mov eax, 1
shl eax, cl
mov dword [ebp + 0x14], eax
push esi
xor esi, esi
lea ebx, [eax - 1]
mov eax, ecx
xor ecx, ecx
mov dword [ebp - 8], ebx
bts ecx, eax
cmp eax, 0x20
push edi
cmovae edx, ecx
mov edi, ebx
mov ebx, dword [ebp + 0x10]
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 0x46869c
jb 0x468458
cmp eax, dword [ebp + 0x1c]
ja 0x46869c
cmp dword [ebp + 0x10], 0xff
ja 0x46869c
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xc
jbe 0x468479
pop edi
pop esi
mov eax, 0xffffffd4
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xc]
mov eax, 1
mov edx, dword [ebp + 0xc]
mov word [ebp + 0x1c], cx
dec ecx
mov word [ebp + 0x1e], ax
shl ax, cl
movzx eax, ax
mov dword [ebp - 0x14], eax
mov dword [ebp + 0x10], edx
test esi, esi
je 0x4684ef
mov esi, dword [ebp + 8]
mov ebx, edx
mov ecx, dword [ebp + 0x18]
add esi, 6
sub ebx, ecx
xor edx, edx
lea esi, [esi + edi*4]
nop
movzx eax, word [ebx + ecx]
cmp ax, 0xffff
jne 0x4684c7
mov byte [esi], dl
dec edi
sub esi, 4
mov eax, 1
jmp 0x4684da
cmp ax, word [ebp - 0x14]
jl 0x4684d7
xor eax, eax
mov word [ebp + 0x1e], ax
movzx eax, word [ebx + ecx]
movzx eax, ax
mov word [ecx], ax
inc edx
add ecx, 2
cmp edx, dword [ebp - 0xc]
jb 0x4684b0
mov ebx, dword [ebp - 8]
mov edx, dword [ebp + 0x10]
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x14]
mov ecx, eax
shr ecx, 3
shr eax, 1
cmp edi, ebx
jne 0x4685e1
add eax, 3
xor edi, edi
add eax, ecx
mov dword [ebp + 0x1c], edi
mov dword [ebp - 0x14], eax
xorps xmm0, xmm0
xor eax, eax
movlpd qword [ebp - 0x24], xmm0
test esi, esi
je 0x468594
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x10], ecx
nop dword [eax]
movsx esi, word [edx + eax*2]
mov edx, dword [ebp - 4]
add edx, edi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 4]
mov dword [edi + edx], ecx
mov dword [edi + edx + 4], ebx
mov edx, dword [ebp + 0x10]
cmp esi, 8
jle 0x468577
mov edi, dword [ebp - 0x1c]
mov dword [edi + 8], ecx
lea ecx, [esi - 9]
shr ecx, 2
lea esi, [edi + 8]
mov dword [edi + 0xc], ebx
and ecx, 0x3ffffffe
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 0x1c]
add edi, esi
inc eax
add ecx, 0x1010101
mov dword [ebp + 0x1c], edi
mov dword [ebp - 0x10], ecx
adc ebx, 0x1010101
cmp eax, dword [ebp - 0xc]
jb 0x468530
mov ebx, dword [ebp - 8]
xor edx, edx
xor esi, esi
cmp dword [ebp + 0x14], edx
jbe 0x46864b
mov edi, dword [ebp - 4]
movzx eax, byte [esi + edi]
mov ecx, edx
mov edi, dword [ebp + 8]
and ecx, ebx
mov byte [edi + ecx*4 + 6], al
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
add ecx, edx
and ecx, ebx
movzx eax, byte [esi + edi + 1]
add esi, 2
mov edi, dword [ebp + 8]
mov byte [edi + ecx*4 + 6], al
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 4]
lea edx, [edx + eax*2]
and edx, ebx
cmp esi, dword [ebp + 0x14]
jb 0x4685a4
mov ebx, dword [ebp + 0x14]
jmp 0x468652
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
mov dword [ebp + 0x1c], eax
test esi, esi
je 0x46864b
mov ecx, dword [ebp + 0x10]
xor ebx, ebx
xor esi, esi
cmp bx, word [ecx]
jge 0x46862b
nop dword [eax + eax]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x1c]
mov byte [ebx + eax*4 + 6], cl
add eax, edx
mov ebx, dword [ebp - 8]
and eax, ebx
mov ecx, dword [ebp + 0x10]
cmp eax, edi
jbe 0x468620
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x468618
movsx ecx, word [ecx]
inc esi
cmp esi, ecx
jl 0x468600
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0x1c]
add ecx, 2
inc esi
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x1c], esi
cmp esi, dword [ebp - 0xc]
jb 0x4685f2
test eax, eax
je 0x46864b
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x468693
mov esi, dword [ebp + 8]
movzx edi, bx
add esi, 7
nop dword [eax + eax]
movzx eax, byte [esi - 1]
lea esi, [esi + 4]
mov ecx, dword [ebp + 0x18]
movzx edx, word [ecx + eax*2]
lea ecx, [ecx + eax*2]
lea eax, [edx + 1]
mov word [ecx], ax
mov eax, edx
mov cl, byte [ebp - 0x18]
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 0x468660
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd2
pop ebx
mov esp, ebp
pop ebp
ret