Function at 0x41c640
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0xc90
push ebx
mov eax, dword [edx + 0x870]
push esi
add eax, 0x20
mov dword [esp + 8], eax
push edi
push ebp
and eax, 0x1fffffff
mov dword [esp + 0x14], eax
cmp eax, 0x64
jb 0x41c676
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc90
ret
mov esi, dword [esp + 0x10]
lea edi, [esp + 0x660]
shl esi, 4
xor eax, eax
mov ecx, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [esp + 0x20]
mov ecx, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0xcb8]
test eax, eax
je 0x41c879
mov edi, dword [esp + 0xca8]
mov ebp, dword [esp + 0xcac]
mov esi, dword [esp + 0xcb4]
mov dword [esp + 0x18], eax
mov ebx, edi
xor eax, eax
shr ebx, 3
mov ecx, dword [edx + 0x34]
mov al, byte [ebx + ecx]
mov ebx, 1
mov ecx, edi
and cl, 7
shl ebx, cl
mov ecx, dword [edx + 0x30]
test ebx, eax
jne 0x41c6f8
xor eax, eax
mov al, byte [ecx + edi]
jmp 0x41c794
mov bl, byte [ecx + edi]
mov eax, dword [edx + 0x2c]
mov ecx, dword [esp + 0xcb0]
cmp bl, 7
mov ecx, dword [eax + ecx*4]
jae 0x41c750
cmp ecx, 0x400
jb 0x41c73a
cmp ecx, 0x80000
jb 0x41c729
shr ecx, 0x11
xor eax, eax
mov al, cl
add eax, 0x22
jmp 0x41c743
shr ecx, 9
xor eax, eax
mov al, byte [ecx + edx + 0x45c]
add eax, 0x12
jmp 0x41c743
xor eax, eax
mov al, byte [edx + ecx + 0x45c]
xor ecx, ecx
mov cl, bl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x41c78d
cmp ecx, 0x400
jb 0x41c77d
cmp ecx, 0x80000
jb 0x41c76c
shr ecx, 0x11
xor eax, eax
mov al, cl
add eax, 0x22
jmp 0x41c786
shr ecx, 9
xor eax, eax
mov al, byte [ecx + edx + 0x45c]
add eax, 0x12
jmp 0x41c786
xor eax, eax
mov al, byte [edx + ecx + 0x45c]
lea eax, [eax*8 + 0x107]
inc dword [esp + 0xcb0]
inc word [esp + eax*2 + 0x660]
inc edi
mov ebx, ebp
xor eax, eax
shr ebx, 3
mov ecx, dword [edx + 0x34]
mov al, byte [ebx + ecx]
mov ebx, 1
mov ecx, ebp
and cl, 7
shl ebx, cl
test ebx, eax
jne 0x41c7c7
mov ecx, dword [edx + 0x30]
xor eax, eax
mov al, byte [ecx + ebp]
jmp 0x41c869
mov eax, dword [edx + 0x30]
mov bl, byte [eax + ebp]
cmp bl, 7
jae 0x41c821
mov eax, dword [edx + 0x2c]
mov ecx, dword [eax + esi*4]
cmp ecx, 0x400
jb 0x41c808
cmp ecx, 0x80000
jb 0x41c7f4
shr ecx, 0x11
xor eax, eax
mov al, cl
add eax, 0x22
jmp 0x41c814
mov ecx, dword [eax + esi*4]
xor eax, eax
shr ecx, 9
mov al, byte [ecx + edx + 0x45c]
add eax, 0x12
jmp 0x41c814
mov ecx, dword [eax + esi*4]
xor eax, eax
mov al, byte [ecx + edx + 0x45c]
xor ecx, ecx
mov cl, bl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x41c868
mov ecx, dword [edx + 0x2c]
mov eax, dword [ecx + esi*4]
cmp eax, 0x400
jb 0x41c855
cmp eax, 0x80000
jb 0x41c841
shr eax, 0x11
xor ecx, ecx
mov cl, al
add ecx, 0x22
jmp 0x41c861
mov eax, dword [ecx + esi*4]
xor ecx, ecx
shr eax, 9
mov cl, byte [eax + edx + 0x45c]
add ecx, 0x12
jmp 0x41c861
mov eax, dword [ecx + esi*4]
xor ecx, ecx
mov cl, byte [eax + edx + 0x45c]
lea eax, [ecx*8 + 0x107]
inc esi
inc word [esp + eax*2 + 0x20]
inc ebp
dec dword [esp + 0x18]
jne 0x41c6ce
xor edi, edi
cmp dword [esp + 0x14], edi
je 0x41c906
lea esi, [esp + 0x20]
lea ecx, [esp + 0x660]
mov ebx, dword [esp + 0x10]
shl ebx, 3
mov ax, word [ecx]
cmp ax, 0x100
jb 0x41c8b4
shr ax, 8
movzx edx, ax
xor eax, eax
mov al, byte [edx + 0x41e7a8]
add eax, 8
jmp 0x41c8bf
movzx edx, ax
xor eax, eax
mov al, byte [edx + 0x41e7a8]
mov dx, word [esi]
cmp dx, 0x100
jb 0x41c8dd
shr dx, 8
movzx ebp, dx
xor edx, edx
mov dl, byte [ebp + 0x41e7a8]
add edx, 8
jmp 0x41c8e8
movzx ebp, dx
xor edx, edx
mov dl, byte [ebp + 0x41e7a8]
mov eax, dword [eax*4 + 0x41e760]
add esi, 2
sub eax, dword [edx*4 + 0x41e760]
add ecx, 2
cdq
xor eax, edx
sub edi, edx
add edi, eax
dec ebx
jne 0x41c897
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc90
ret