Function at 0x417c10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0xc], ecx
mov eax, 1
mov ecx, dword [ebp + 0xc]
shl eax, cl
push ebx
mov dword [ebp - 0x10], eax
push esi
lea ebx, [eax - 1]
mov dword [ebp - 4], edx
mov eax, ecx
mov dword [ebp - 8], ebx
xor ecx, ecx
xor esi, esi
bts ecx, eax
xor edx, edx
cmp eax, 0x20
push edi
cmovae edx, ecx
mov edi, ebx
mov ebx, dword [ebp + 8]
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 0x417eef
jb 0x417c76
cmp eax, dword [ebp + 0x14]
ja 0x417eef
mov edx, dword [ebp + 8]
cmp edx, 0xff
ja 0x417eef
mov ecx, dword [ebp + 0xc]
cmp ecx, 0xc
jbe 0x417c99
mov eax, 0xffffffd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
mov word [ebp + 0x14], cx
dec ecx
mov word [ebp + 0x16], ax
shl ax, cl
xor ecx, ecx
movzx eax, ax
mov dword [ebp - 0x20], eax
lea eax, [edx + 1]
test eax, eax
je 0x417d13
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add ebx, 6
mov edx, dword [ebp + 0x10]
sub eax, edx
mov dword [ebp - 0x14], eax
lea ebx, [ebx + edi*4]
nop dword [eax]
movzx eax, word [edx + eax]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp ax, 0xffff
jne 0x417cec
mov byte [ebx], cl
dec edi
sub ebx, 4
mov eax, 1
jmp 0x417cfe
cmp ax, word [ebp - 0x20]
jl 0x417cf8
xor eax, eax
mov word [ebp + 0x16], ax
mov eax, dword [ebp - 0x1c]
movzx eax, ax
mov word [edx], ax
inc ecx
mov eax, dword [ebp + 8]
add edx, 2
inc eax
cmp ecx, eax
mov eax, dword [ebp - 0x14]
jb 0x417cd0
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
mov ecx, eax
shr eax, 1
shr ecx, 3
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
mov dword [ebp + 0x14], edx
cmp edi, ebx
jne 0x417e34
mov ecx, dword [ebp + 8]
xor edi, edi
mov esi, dword [ebp - 4]
xorps xmm0, xmm0
mov dword [ebp - 0x20], edi
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x1c], eax
add ecx, 1
je 0x417dd8
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
nop dword [eax]
movsx ecx, word [esi + eax*2]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
lea esi, [eax + ecx*2]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov dword [esi + edi + 2], edx
mov dword [esi + edi + 6], ebx
cmp ecx, 8
jle 0x417db5
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
inc ecx
lea esi, [eax + ecx*2]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
add edi, esi
add ecx, 0xfffffff7
shr ecx, 2
and ecx, 0x3ffffffe
mov dword [edi + 8], edx
lea esi, [edi + 8]
mov dword [edi + 0xc], ebx
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 4]
add edi, ecx
mov ecx, dword [ebp + 8]
inc eax
add edx, 0x1010101
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
adc ebx, 0x1010101
inc ecx
cmp eax, ecx
jb 0x417d60
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
xor esi, esi
xor edi, edi
test eax, eax
je 0x417e9f
mov edx, dword [ebp + 8]
mov ecx, esi
and ecx, ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebx + edx*2]
mov edx, dword [ebp - 0xc]
movzx eax, byte [eax + edi + 2]
mov ebx, dword [ebp + 8]
mov byte [edx + ecx*4 + 6], al
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
add ecx, esi
and ecx, dword [ebp - 8]
lea eax, [edx + ebx*2]
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp + 0x14]
movzx eax, byte [eax + edi + 3]
add edi, 2
mov byte [ebx + ecx*4 + 6], al
mov ebx, dword [ebp - 8]
lea esi, [esi + edx*2]
and esi, ebx
cmp edi, dword [ebp - 0x10]
jb 0x417de7
xor ebx, ebx
jmp 0x417ea5
mov esi, dword [ebp + 8]
xor ecx, ecx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x14], ecx
add esi, 1
je 0x417e9c
mov ecx, dword [ebp - 4]
xor edx, edx
xor esi, esi
cmp dx, word [ecx]
mov ecx, dword [ebp - 0x14]
jge 0x417e7b
mov edx, dword [ebp - 0xc]
mov byte [edx + eax*4 + 6], cl
mov edx, dword [ebp + 0x14]
add eax, edx
and eax, ebx
cmp eax, edi
jbe 0x417e6d
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x417e65
mov ecx, dword [ebp - 4]
inc esi
movsx ecx, word [ecx]
cmp esi, ecx
mov ecx, dword [ebp - 0x14]
jl 0x417e53
mov esi, dword [ebp + 8]
inc ecx
add dword [ebp - 4], 2
inc esi
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x14], ecx
cmp ecx, esi
jb 0x417e44
test eax, eax
je 0x417e9c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
xor ebx, ebx
test eax, eax
je 0x417ee6
mov edi, dword [ebp - 0xc]
add edi, 7
nop dword [eax + eax]
movzx eax, byte [edi - 1]
lea edi, [edi + 4]
mov ecx, dword [ebp + 0x10]
inc ebx
movzx esi, word [ecx + eax*2]
lea edx, [ecx + eax*2]
mov ecx, esi
lea eax, [esi + 1]
mov word [edx], ax
bsr eax, ecx
mov cl, byte [ebp + 0xc]
sub cl, al
mov eax, dword [ebp - 0x10]
shl si, cl
sub si, ax
mov byte [edi - 4], cl
mov word [edi - 7], si
cmp ebx, eax
jb 0x417eb0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd2
pop ebx
mov esp, ebp
pop ebp
ret