Function at 0x40f46d
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [edx]
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
movzx edi, byte [ebx + 0x74]
movzx eax, byte [ebx + 0x73]
shl edi, 8
or edi, eax
movzx eax, byte [ebx + 0x72]
shl edi, 8
or edi, eax
movzx eax, byte [ebx + 0x71]
shl edi, 8
or edi, eax
movzx eax, word [ecx]
mov ecx, 0x200
mov dword [ebp - 0x10], eax
cmp ax, cx
jne 0x40f4bd
cmp edi, 0x10000
jle 0x40f4bd
xor eax, eax
jmp 0x40f6ba
movzx eax, byte [ebx + 4]
push esi
movzx esi, byte [ebx + 5]
shl esi, 8
or esi, eax
movzx eax, byte [ebx + 3]
shl esi, 8
or esi, eax
movzx eax, byte [ebx + 2]
shl esi, 8
or esi, eax
cmp esi, dword [edx + 8]
jbe 0x40f4e5
mov esi, dword [edx + 8]
movzx ecx, byte [ebx + 0x4b]
movzx eax, byte [ebx + 0x4a]
shl cx, 8
or cx, ax
movzx eax, cx
mov dword [ebp - 8], eax
cwde
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0xc]
movsx ecx, word [edx + 8]
cmp eax, ecx
jg 0x40f6b2
movzx ecx, byte [ebx + 0x4f]
movzx eax, byte [ebx + 0x4e]
shl cx, 8
or cx, ax
jl 0x40f6b2
movzx ecx, byte [ebx + 0x4d]
movzx eax, byte [ebx + 0x4c]
shl cx, 8
or cx, ax
cmp cx, word [ebp - 8]
jg 0x40f6b2
mov cl, byte [edx + 4]
mov ch, byte [edx + 5]
cmp cl, ch
ja 0x40f6b2
mov ah, byte [edx + 6]
mov al, ah
add al, cl
cmp al, ch
jbe 0x40f569
cmp ah, cl
jb 0x40f565
cmp ah, ch
ja 0x40f565
sub ah, cl
mov byte [edx + 6], ah
jmp 0x40f569
mov byte [edx + 6], 0
mov ah, byte [edx + 7]
mov al, ah
add al, cl
cmp al, ch
jbe 0x40f587
cmp ah, cl
jb 0x40f583
cmp ah, ch
ja 0x40f583
sub ah, cl
mov byte [edx + 7], ah
jmp 0x40f587
mov byte [edx + 7], 0
mov edx, dword [edx + 0x10]
mov dword [ebp - 0xc], edx
cmp edx, 0x76
je 0x40f59e
cmp edx, 0x94
jne 0x40f6b2
mov eax, dword [ebp - 4]
mov eax, dword [eax]
add eax, 2
add edx, eax
movzx eax, ch
mov dword [ebp - 8], eax
movzx eax, cl
mov ecx, dword [ebp - 8]
sub ecx, eax
mov eax, 0x200
inc ecx
mov dword [ebp - 8], ecx
cmp word [ebp - 0x10], ax
jne 0x40f607
movzx eax, word [edx]
cmp edi, eax
jne 0x40f6b2
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
lea eax, [eax + ecx*4]
add eax, 2
cmp eax, dword [edi + 8]
ja 0x40f6b2
lea edi, [edx + ecx*4]
jmp 0x40f601
movzx ecx, byte [edx + 1]
movzx eax, byte [edx]
shl ecx, 8
or ecx, eax
cmp ecx, esi
ja 0x40f6b2
add edx, 4
cmp edx, edi
jb 0x40f5ea
jmp 0x40f66f
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx]
shl ecx, 8
or ecx, eax
cmp edi, ecx
jne 0x40f6b2
imul ecx, dword [ebp - 8], 6
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
add eax, 2
add eax, ecx
cmp eax, dword [edi + 8]
ja 0x40f6b2
lea edi, [ecx + edx]
jmp 0x40f66b
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx]
shl ecx, 8
or ecx, eax
cmp ecx, esi
ja 0x40f6b2
add edx, 6
cmp edx, edi
jb 0x40f646
mov eax, 0x300
cmp word [ebp - 0x10], ax
jne 0x40f6b6
test byte [ebx + 0x76], 0xe0
jne 0x40f6b2
mov eax, dword [ebp - 4]
mov edx, dword [eax]
movzx ecx, byte [edx + 0x83]
movzx eax, byte [edx + 0x82]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x81]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x80]
shl ecx, 8
or ecx, eax
je 0x40f6b6
xor eax, eax
jmp 0x40f6b9
xor eax, eax
inc eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret