Function at 0x4fe008
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
mov eax, dword [ebp + 8]
cmp byte [eax + 8], 3
je 0x4fe27f
xor edx, edx
mov dword [ebp - 4], edx
mov word [ebp - 0xa], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp + 8]
test byte [edx + 8], 2
je 0x4fe08c
mov ecx, dword [ebp + 8]
xor eax, eax
mov al, byte [ecx + 9]
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov cl, byte [edx]
sub eax, ecx
mov edx, dword [ebp - 4]
mov dword [ebp + edx*4 - 0x54], eax
inc dword [ebp - 4]
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 9]
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dl, byte [eax + 1]
sub ecx, edx
mov eax, dword [ebp - 4]
mov dword [ebp + eax*4 - 0x54], ecx
inc dword [ebp - 4]
mov edx, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [edx + 9]
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dl, byte [eax + 2]
sub ecx, edx
mov eax, dword [ebp - 4]
mov dword [ebp + eax*4 - 0x54], ecx
inc dword [ebp - 4]
jmp 0x4fe0a8
mov edx, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [edx + 9]
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dl, byte [eax + 3]
sub ecx, edx
mov eax, dword [ebp - 4]
mov dword [ebp + eax*4 - 0x54], ecx
inc dword [ebp - 4]
mov edx, dword [ebp + 8]
test byte [edx + 8], 4
je 0x4fe0cd
mov ecx, dword [ebp + 8]
xor eax, eax
mov al, byte [ecx + 9]
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov cl, byte [edx + 4]
sub eax, ecx
mov edx, dword [ebp - 4]
mov dword [ebp + edx*4 - 0x54], eax
inc dword [ebp - 4]
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 4]
jge 0x4fe100
mov eax, dword [ebp - 8]
cmp dword [ebp + eax*4 - 0x54], 0
jg 0x4fe0ef
mov edx, dword [ebp - 8]
xor ecx, ecx
mov dword [ebp + edx*4 - 0x54], ecx
jmp 0x4fe0f5
mov word [ebp - 0xa], 1
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
jl 0x4fe0da
cmp word [ebp - 0xa], 0
je 0x4fe27f
mov edx, dword [ebp + 8]
mov cl, byte [edx + 9]
sub cl, 2
je 0x4fe132
sub cl, 2
je 0x4fe170
sub cl, 4
je 0x4fe1d0
sub cl, 8
je 0x4fe212
jmp 0x4fe27f
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
xor eax, eax
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x1c]
jae 0x4fe27f
mov ecx, dword [ebp - 0x14]
shr byte [ecx], 1
mov eax, dword [ebp - 0x14]
and byte [eax], 0x55
inc dword [ebp - 0x14]
inc dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x1c]
jb 0x4fe152
jmp 0x4fe27f
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov dword [ebp - 0x28], edx
mov ecx, dword [ebp - 0x54]
mov eax, 0xf0
sar eax, cl
and al, 0xf0
mov ecx, dword [ebp - 0x54]
mov edx, 0xf
sar edx, cl
or al, dl
mov byte [ebp - 0x29], al
xor eax, eax
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x28]
jae 0x4fe27f
mov ecx, dword [ebp - 0x20]
mov eax, ecx
mov ecx, dword [ebp - 0x54]
shr byte [eax], cl
mov eax, dword [ebp - 0x20]
mov dl, byte [ebp - 0x29]
and byte [eax], dl
inc dword [ebp - 0x20]
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x28]
jb 0x4fe1ab
jmp 0x4fe27f
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x10]
imul ecx, dword [ebp - 4]
mov dword [ebp - 0x38], ecx
xor eax, eax
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
cmp edx, dword [ebp - 0x38]
jae 0x4fe27f
mov eax, dword [ebp - 0x34]
xor edx, edx
div dword [ebp - 4]
mov ecx, dword [ebp + edx*4 - 0x54]
mov eax, dword [ebp - 0x30]
shr byte [eax], cl
inc dword [ebp - 0x30]
inc dword [ebp - 0x34]
mov edx, dword [ebp - 0x34]
cmp edx, dword [ebp - 0x38]
jb 0x4fe1f1
jmp 0x4fe27f
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 4]
imul dword [ebp - 0x10]
mov dword [ebp - 0x44], eax
xor edx, edx
mov dword [ebp - 0x40], edx
mov ecx, dword [ebp - 0x40]
cmp ecx, dword [ebp - 0x44]
jae 0x4fe27f
mov eax, dword [ebp - 0x3c]
xor edx, edx
mov dl, byte [eax]
shl edx, 8
mov ecx, dword [ebp - 0x3c]
xor eax, eax
mov al, byte [ecx + 1]
add dx, ax
mov word [ebp - 0xa], dx
mov eax, dword [ebp - 0x40]
xor edx, edx
div dword [ebp - 4]
mov ecx, dword [ebp + edx*4 - 0x54]
shr word [ebp - 0xa], cl
movzx eax, word [ebp - 0xa]
sar eax, 8
mov edx, dword [ebp - 0x3c]
mov byte [edx], al
inc dword [ebp - 0x3c]
mov cl, byte [ebp - 0xa]
and cl, 0xff
mov eax, dword [ebp - 0x3c]
mov byte [eax], cl
inc dword [ebp - 0x3c]
inc dword [ebp - 0x40]
mov edx, dword [ebp - 0x40]
cmp edx, dword [ebp - 0x44]
jb 0x4fe22e
mov esp, ebp
pop ebp
ret