Function at 0x416a00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xcc
push ebx
push ebp
push esi
push edi
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0xa5]
mov byte [esp + 0xa4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0xe8]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
jne 0x416a60
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0xcc
ret 0x18
mov ebp, dword [esp + 0xf4]
cmp bp, 0x38
jbe 0x416a7e
pop edi
pop esi
pop ebp
mov ax, 0x14
pop ebx
add esp, 0xcc
ret 0x18
lea ecx, [esp + 0x1c]
push ebp
push ecx
push eax
call fcn.0040ce40
and ebp, 0xffff
mov edx, ebp
and edx, 3
je 0x416ac0
mov ecx, 4
sub ecx, edx
je 0x416ab7
mov esi, ecx
lea edi, [esp + ebp + 0x1c]
mov eax, 0xa5a5a5a5
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, 4
sub eax, edx
add ebp, eax
mov cl, byte [esp + 0x1c]
mov al, byte [esp + 0x1e]
mov dl, byte [esp + 0x1d]
mov byte [esp + 0x54], cl
mov cl, byte [esp + 0x1f]
mov byte [esp + 0x56], al
mov byte [esp + 0x57], cl
cmp ebp, 4
mov byte [esp + 0x55], dl
lea eax, [esp + 0x20]
mov ecx, ebp
jbe 0x416b0f
mov dl, byte [eax]
sub ecx, 4
inc eax
mov byte [esp + ecx + 0x54], dl
mov dl, byte [eax]
inc eax
mov byte [esp + ecx + 0x55], dl
mov dl, byte [eax]
inc eax
mov byte [esp + ecx + 0x56], dl
mov dl, byte [eax]
inc eax
cmp ecx, 4
mov byte [esp + ecx + 0x57], dl
ja 0x416aeb
mov esi, dword [esp + 0x1f]
mov eax, dword [esp + 0x1e]
mov ecx, dword [esp + 0x1d]
and esi, 0xff
mov edx, dword [esp + 0x1c]
and eax, 0xff
shl esi, 8
or esi, eax
and ecx, 0xff
shl esi, 8
or esi, ecx
and edx, 0xff
shl esi, 8
mov ecx, dword [esp + 0xe4]
mov eax, 4
or esi, edx
cmp eax, ebp
sbb eax, eax
mov edx, ebp
neg eax
add eax, 0x12
cmp cx, 0xff
mov dword [esp + 0x18], edx
jbe 0x416b80
xor edx, edx
mov eax, 0x27
mov dl, ch
mov byte [esp + ebp + 0x54], dl
lea edx, [ebp + 2]
mov byte [esp + ebp + 0x55], 0
mov dword [esp + 0x18], edx
lea edi, [esp + 0x18]
and ecx, 0xff
push edi
lea edi, [esp + 0x58]
push ebp
push edi
push edx
lea edx, [esp + 0x64]
push edx
push ebx
push ecx
push eax
mov eax, dword [esp + 0x100]
push eax
call fcn.004151f0
mov ebx, eax
lea eax, [esp + 0xa4]
mov ecx, dword [esp + 0x18]
cmp ecx, 4
jb 0x416be1
mov dl, byte [esp + ecx + 0x50]
sub ecx, 4
mov byte [eax], dl
inc eax
mov dl, byte [esp + ecx + 0x55]
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x56]
inc eax
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x57]
inc eax
mov byte [eax], dl
inc eax
cmp ecx, 4
jae 0x416bb9
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0xa7]
mov ecx, dword [esp + 0xa6]
mov edx, dword [esp + 0xa5]
and eax, 0xff
shl eax, 8
and ecx, 0xff
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0xa4]
shl eax, 8
or eax, edx
and ecx, 0xff
shl eax, 8
or eax, ecx
test bl, bl
mov dword [esp + 0x10], eax
jne 0x416ca0
lea edx, [esi + esi]
xor edx, eax
je 0x416ca0
mov eax, dword [esp + 0xec]
test eax, eax
je 0x416c53
mov ecx, dword [esp + 0xf4]
lea edx, [esp + 0xa4]
push ecx
push eax
push edx
call fcn.0040ce40
mov esi, dword [esp + 0xf0]
test esi, esi
je 0x416d15
lea eax, [esp + 0x10]
push 4
lea ecx, [esp + ebp + 0xa4]
push eax
push ecx
call fcn.0040ce40
pop edi
mov dx, word [esp + 0xe]
mov ax, word [esp + 0xc]
mov word [esp + 0x10], dx
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
mov ax, bx
mov dword [esi], ecx
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret 0x18
cmp bx, 3
jne 0x416cb6
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0xcc
ret 0x18
mov eax, dword [esp + 0xec]
test eax, eax
je 0x416cd7
mov edx, dword [esp + 0xf4]
push edx
push eax
mov eax, dword [esp + 0xf0]
push eax
call fcn.0040ce40
mov esi, dword [esp + 0xf0]
test esi, esi
je 0x416d0d
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + ebp + 0x1c]
push ecx
push edx
call fcn.0040ce40
mov ax, word [esp + 0x12]
mov cx, word [esp + 0x10]
mov word [esp + 0x14], ax
mov word [esp + 0x16], cx
mov edx, dword [esp + 0x14]
mov dword [esi], edx
cmp bx, 2
jne 0x416d15
xor ebx, ebx
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0xcc
ret 0x18