Function at 0x41cc20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
cmp edx, 2
push ebx
push esi
push edi
mov edi, ecx
mov esi, edi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], esi
jae 0x41cc46
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov al, byte [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
dec al
mov byte [ebp - 1], al
mov byte [ebp - 2], 0
mov ax, word [ebp - 2]
mov word [edi], ax
add edi, 2
lea eax, [ecx + ecx]
sub eax, esi
add eax, edi
cmp eax, edx
mov dword [ebp - 8], edi
jg 0x41ce9b
test ecx, ecx
mov eax, 0x2c
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
jbe 0x41ccd5
mov edx, ecx
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x3c]
movsx ebx, word [ecx]
mov dword [eax], ebx
mov word [edi], bx
add ecx, 2
add edi, 2
add eax, 4
dec edx
jne 0x41cc88
mov dword [ebp - 8], edi
mov ebx, dword [ebp + 0xc]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
sub eax, edi
add esi, eax
mov eax, dword [ebp + 0x10]
xor edx, edx
test esi, esi
setl dl
shr ebx, 1
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], eax
dec edx
and edx, esi
cmp eax, ebx
lea esi, [eax - 1]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], esi
jae 0x41ce94
jmp 0x41cce0
mov ecx, dword [ebp + 8]
jmp 0x41cc9f
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x24]
mov ebx, edi
sub ebx, edx
add ebx, 2
cmp ebx, dword [ebp - 0x28]
jg 0x41cea4
cmp eax, 2
jne 0x41cd04
xor edx, edx
test esi, esi
sete dl
mov esi, edx
mov dword [ebp - 0xc], esi
movsx eax, word [ecx]
mov edi, dword [ebp + esi*4 - 0x3c]
add ecx, 2
mov dword [ebp + esi*4 - 0x44], eax
mov esi, dword [ebp + esi*4 - 0x34]
mov dword [ebp + 8], ecx
mov ecx, eax
sub eax, edi
cdq
xor eax, edx
xor ebx, ebx
sub eax, edx
mov edx, dword [esi*4 + 0x43c8f8]
mov esi, dword [ebp + 0x14]
cmp ecx, edi
setge bl
and esi, 0xff
mov edi, edx
mov ecx, esi
shr edi, cl
dec ebx
and ebx, 0x40
cmp eax, edi
jae 0x41cd66
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + esi*4 - 0x34]
test eax, eax
je 0x41cd57
dec eax
mov dword [ebp + esi*4 - 0x34], eax
mov edi, dword [ebp - 8]
mov byte [edi], 0x80
inc edi
mov dword [ebp - 8], edi
jmp 0x41ce82
lea ecx, [edx + edx]
cmp eax, ecx
jbe 0x41cdb5
mov ecx, dword [ebp - 0xc]
cmp dword [ebp + ecx*4 - 0x34], 0x58
jge 0x41cdb5
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x41cdb5
mov edx, dword [ebp + ecx*4 - 0x34]
add edx, 8
cmp edx, 0x58
mov dword [ebp + ecx*4 - 0x34], edx
jle 0x41cd96
mov dword [ebp + ecx*4 - 0x34], 0x58
mov edi, dword [ebp - 8]
mov edx, dword [ebp + ecx*4 - 0x34]
mov edx, dword [edx*4 + 0x43c8f8]
mov byte [edi], 0x81
inc edi
mov dword [ebp - 8], edi
dec dword [ebp - 0x10]
lea edi, [edx + edx]
cmp eax, edi
ja 0x41cd70
mov cl, byte [ebp - 1]
mov edi, edx
shr edi, cl
lea ecx, [esi - 2]
mov esi, 1
shl esi, cl
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp + 0xc], 1
cmp esi, 0x20
mov dword [ebp - 0x1c], 0x20
ja 0x41cdea
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp - 0x18]
lea esi, [ecx + edx]
cmp esi, eax
mov ecx, dword [ebp - 0x14]
ja 0x41ce00
or ecx, dword [ebp + 0xc]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ecx
mov esi, dword [ebp - 0x1c]
cmp dword [ebp + 0xc], esi
je 0x41ce14
mov ecx, dword [ebp + 0xc]
shr edx, 1
shl ecx, 1
mov dword [ebp + 0xc], ecx
jmp 0x41cdea
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + esi*4 - 0x3c]
add edx, edi
test ebx, ebx
je 0x41ce34
sub eax, edx
cmp eax, 0xffff8000
jge 0x41ce42
mov eax, 0xffff8000
jmp 0x41ce42
add eax, edx
cmp eax, 0x7fff
jle 0x41ce42
mov eax, 0x7fff
mov edi, dword [ebp - 8]
mov dl, cl
or dl, bl
and ecx, 0x1f
mov dword [ebp + esi*4 - 0x3c], eax
mov byte [edi], dl
mov eax, dword [ecx*4 + 0x43c878]
mov ecx, dword [ebp + esi*4 - 0x34]
inc edi
add ecx, eax
mov dword [ebp - 8], edi
mov dword [ebp + esi*4 - 0x34], ecx
mov eax, ecx
jns 0x41ce75
mov dword [ebp + esi*4 - 0x34], 0
jmp 0x41ce82
cmp eax, 0x58
jle 0x41ce82
mov dword [ebp + esi*4 - 0x34], 0x58
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
inc eax
cmp eax, ecx
mov dword [ebp - 0x20], eax
jb 0x41ccda
mov ecx, dword [ebp - 0x24]
mov eax, edi
sub eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, edi
pop edi
sub eax, edx
pop esi
add eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x10