Function at 0x66f8e590
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x10
mov esi, dword [esp + 0x24]
movzx eax, byte [esi + 0x56]
mov byte [esp + 9], al
mov eax, dword [esi + 0x228]
shl eax, 4
mov cl, al
movzx eax, byte [esi + 0x55]
and cl, 0x10
cmp dword [esi + 0x268], 1
mov byte [esp + 0xa], cl
mov bl, al
sbb ecx, ecx
sar bl, 7
not cl
and cl, 0x25
and bl, 0x44
test al, 0xc
setne dl
and al, 3
shl dl, 2
or dl, byte [esp + 0xa]
or dl, cl
or dl, bl
or al, dl
cmp byte [esp + 9], al
je 0x66f8e6c5
mov byte [esi + 0x56], al
mov dl, al
and dl, 0x30
cmp dl, 0x10
je 0x66f8e6d0
movzx ecx, word [0x66ffa414]
mov ebp, dword [esi + 0xf70]
mov edi, dword [esi + 0xf7c]
mov edx, dword [esi + 0xf88]
lea ebx, [ecx + 0x66f814b0]
movzx ecx, word [0x66ffa41a]
mov dword [esp], ebx
lea ebx, [ecx + 0x66f814b0]
mov dword [esp + 4], ebx
mov ebx, 0x66f8290e
mov dword [esi + 0xf6c], ebp
movzx ecx, byte [esp + 9]
mov dword [esi + 0xf78], edi
mov dword [esi + 0xf48], ebx
mov dword [esi + 0xf84], edx
xor cl, al
mov byte [esp + 0xa], cl
mov cl, al
and cl, 4
test byte [esp + 0xa], 0x64
je 0x66f8e780
test cl, cl
je 0x66f8e852
mov dl, al
mov ecx, 0x66f84c6e
and dl, 0x40
je 0x66f8e802
lea edx, [esi + 0xbc8]
lea ebx, [esi + 0xd2c]
lea esi, [esi]
mov dword [edx], ecx
add edx, 4
cmp edx, ebx
jne 0x66f8e690
movzx edx, byte [esp + 0xa]
mov cl, al
and cl, 1
and dl, 1
jne 0x66f8e730
test cl, cl
je 0x66f8e75e
and al, 0x10
je 0x66f8e6c5
movzx eax, byte [esp + 9]
and al, 0x10
je 0x66f8e819
add esp, 0x10
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ecx, word [0x66ffa412]
movzx ebp, word [0x66ffa3fe]
movzx edi, word [0x66ffa404]
movzx ebx, word [0x66ffa3ec]
add ecx, 0x66f814b0
movzx edx, word [0x66ffa40a]
mov dword [esp], ecx
movzx ecx, word [str.ee]
add ebp, 0x66f814b0
add edi, 0x66f814b0
add ebx, 0x66f814b0
add edx, 0x66f814b0
add ecx, 0x66f814b0
mov dword [esp + 4], ecx
jmp 0x66f8e636
test cl, cl
jne 0x66f8e7e0
mov edx, 0x59
lea esi, [esi]
movzx ecx, word [edx + edx + 0x66ffa360]
add ecx, 0x66f814b0
mov dword [esi + edx*4 + 0xbc8], ecx
inc edx
cmp edx, 0x9a
jne 0x66f8e740
mov edi, dword [esp]
mov dword [esi + 0xd2c], edi
mov edi, dword [esp + 4]
mov dword [esi + 0xd38], edi
jmp 0x66f8e6b4
test cl, cl
jne 0x66f8e699
mov dword [esi + 0xd1c], edx
mov dl, al
mov dword [esi + 0xd04], ebp
and dl, 2
mov dword [esi + 0xd10], edi
mov dword [esi + 0xce0], ebx
jne 0x66f8e8e7
mov edx, dword [esi + 0xf54]
mov dword [esi + 0xcec], edx
mov edx, dword [esi + 0xf58]
mov dword [esi + 0xcf0], edx
mov edx, dword [esi + 0xf5c]
mov dword [esi + 0xcf4], edx
mov edx, dword [esi + 0xf60]
mov dword [esi + 0xcf8], edx
jmp 0x66f8e699
lea edx, [esi + 0xd2c]
lea ecx, [esi + 0xe30]
lea esi, [esi]
mov dword [edx], 0x66f84b91
add edx, 4
cmp ecx, edx
jne 0x66f8e7f0
jmp 0x66f8e6b4
mov dl, al
mov ecx, 0x66f84aec
and dl, 0x20
mov edx, 0x66f84b14
cmove ecx, edx
jmp 0x66f8e681
mov eax, dword [esi + 0x7e4]
lea edx, [eax + eax - 1]
lea eax, [esi + 0xb48]
movzx edx, dx
add esi, 0xbc8
lea esi, [esi]
lea esi, [esi]
mov word [eax], dx
add eax, 2
cmp esi, eax
jne 0x66f8e840
add esp, 0x10
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, 1
mov ebx, 0x164
lea ebp, [esi + 0xbc8]
lea ecx, [esi + 0xe30]
jne 0x66f8e92d
test ebp, 2
jne 0x66f8e918
mov byte [esp + 0xb], al
mov edi, ebx
xor edx, edx
mov dword [esp + 0xc], ebx
and edi, 0xfffffff8
mov eax, dword [ecx + edx + 4]
mov ebx, dword [ecx + edx]
mov dword [ebp + edx + 4], eax
mov dword [ebp + edx], ebx
add edx, 8
cmp edx, edi
jb 0x66f8e88a
mov ebx, dword [esp + 0xc]
add ebp, edx
add ecx, edx
xor edx, edx
movzx eax, byte [esp + 0xb]
test bl, 4
je 0x66f8e8be
mov edx, dword [ecx]
mov dword [ebp], edx
mov edx, 4
test bl, 2
je 0x66f8e8cf
movzx edi, word [ecx + edx]
mov word [ebp + edx], di
add edx, 2
test bl, 1
je 0x66f8e8dc
movzx ebx, byte [ecx + edx]
mov byte [ebp + edx], bl
mov dl, al
and dl, 2
je 0x66f8e699
mov edx, 0x66f84b07
mov ecx, 0x66f84b07
mov dword [esi + 0xcec], edx
mov ebx, 0x66f84b07
mov edi, 0x66f84b07
mov dword [esi + 0xcf0], ecx
mov dword [esi + 0xcf4], ebx
mov dword [esi + 0xcf8], edi
jmp 0x66f8e699
movzx edi, word [ecx]
add ebp, 2
add ecx, 2
sub ebx, 2
mov word [ebp - 2], di
jmp 0x66f8e87b
movzx ebx, byte [esi + 0xe30]
lea ebp, [esi + 0xbc9]
lea ecx, [esi + 0xe31]
mov byte [esi + 0xbc8], bl
mov ebx, 0x163
jmp 0x66f8e86f