Function at 0x4c7cff60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push edi
mov edi, dword [ecx + 8]
movzx edx, word [edi]
movzx eax, dx
cmp eax, 4
mov dword [ebp - 8], edi
je 0x4c7cff86
cmp eax, 7
je 0x4c7cff86
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
movzx eax, word [edi + 2]
xor ecx, ecx
cmp ax, cx
push ebx
push esi
jne 0x4c7cffd8
cmp dx, 4
mov dword [ebp - 0x20], ecx
jne 0x4c7cffba
mov ebx, 0x1f
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], 5
mov dword [ebp - 0x18], 0xa
jmp 0x4c7d0055
mov ebx, 0xff
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], 8
mov dword [ebp - 0x18], 0x10
jmp 0x4c7d0055
cmp ax, 3
jne 0x4c7d0052
cmp dword [edi + 0x10], 0xc
jae 0x4c7cffed
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov ebx, dword [edi + 0x18]
lea eax, [edi + 0x18]
xor esi, esi
add eax, 4
test bl, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], ecx
jne 0x4c7d0013
shr ebx, 1
add ecx, 1
test bl, 1
je 0x4c7d0006
mov dword [ebp - 0x18], ecx
mov ecx, dword [eax]
add eax, 4
test cl, 1
mov dword [ebp - 0x28], ecx
jne 0x4c7d0030
shr ecx, 1
add esi, 1
test cl, 1
je 0x4c7d0020
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], ecx
mov eax, dword [eax]
test al, 1
mov dword [ebp - 0x2c], eax
jne 0x4c7d0055
lea esp, [esp]
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x20], 1
shr eax, 1
test al, 1
mov dword [ebp - 0x2c], eax
je 0x4c7d0040
jmp 0x4c7d0055
mov ebx, dword [ebp - 0x24]
cmp dx, 4
lea esi, [edi + 0x18]
jne 0x4c7d0175
mov ecx, dword [edi + 0x10]
add ecx, esi
cmp dword [edi + 8], 0
mov dword [ebp - 0x14], 0
jbe 0x4c7d016a
xor eax, eax
cmp dword [edi + 0xc], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], eax
jbe 0x4c7d0119
lea esp, [esp]
cmp eax, dword [edi + 4]
jae 0x4c7d0119
movzx eax, word [ecx]
movzx edi, ax
add ecx, 2
mov dword [ebp - 0x10], ecx
movzx ecx, byte [ebp - 0x20]
mov eax, edi
shr eax, cl
xor edx, edx
movzx ecx, byte [ebp - 0x1c]
and eax, dword [ebp - 0x2c]
add esi, 1
imul eax, eax, 0xff
div dword [ebp - 0x2c]
xor edx, edx
add dword [ebp - 4], 1
add esi, 1
add esi, 1
mov byte [esi - 3], al
mov eax, edi
shr eax, cl
mov ecx, dword [ebp - 0x28]
and eax, ecx
imul eax, eax, 0xff
div ecx
movzx ecx, byte [ebp - 0x18]
xor edx, edx
mov byte [esi - 2], al
mov eax, edi
shr eax, cl
mov ecx, dword [ebp - 8]
mov edi, ecx
and eax, ebx
imul eax, eax, 0xff
div ebx
mov byte [esi - 1], al
mov eax, dword [ebp - 0xc]
add eax, 2
cmp eax, dword [ecx + 0xc]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
jb 0x4c7d0090
mov edx, dword [ebp - 0xc]
cmp edx, dword [edi + 0xc]
jae 0x4c7d0133
mov edx, dword [edi + 0xc]
sub edx, dword [ebp - 0xc]
sub edx, 1
shr edx, 1
lea ecx, [ecx + edx*2 + 2]
mov dword [ebp - 0x10], ecx
lea eax, [eax + eax*2]
test al, 3
je 0x4c7d014d
lea ebx, [ebx]
add eax, 1
mov byte [esi], 0
add esi, 1
test al, 3
jne 0x4c7d0140
mov edx, dword [ebp - 0x14]
add edx, 1
add eax, 1
cmp edx, dword [edi + 8]
mov dword [ebp - 0x14], edx
jb 0x4c7d0078
add eax, 0xffffffff
jmp 0x4c7d0253
mov eax, dword [ebp - 4]
add eax, 0xffffffff
jmp 0x4c7d0253
mov eax, dword [edi + 0x10]
add eax, esi
cmp dword [edi + 8], 0
mov dword [ebp - 0xc], 0
jbe 0x4c7d0240
jmp 0x4c7d0190
xor ecx, ecx
cmp dword [edi + 0xc], ecx
mov dword [ebp - 0x10], ecx
jbe 0x4c7d0211
lea ebx, [ebx]
mov edi, dword [eax]
mov ecx, dword [ebp - 0x20]
add eax, 4
mov dword [ebp - 0x14], eax
mov eax, edi
shr eax, cl
xor edx, edx
mov ecx, dword [ebp - 0x1c]
add esi, 1
and eax, dword [ebp - 0x2c]
add esi, 1
imul eax, eax, 0xff
div dword [ebp - 0x2c]
xor edx, edx
add esi, 1
mov byte [esi - 3], al
mov eax, edi
shr eax, cl
mov ecx, dword [ebp - 0x28]
and eax, ecx
imul eax, eax, 0xff
div ecx
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov byte [esi - 2], al
mov eax, edi
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
div ebx
mov edx, dword [ebp - 8]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x10]
add eax, 4
cmp eax, dword [edx + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
jb 0x4c7d01a0
mov ecx, dword [ebp - 0x10]
mov edi, edx
shr ecx, 2
lea ecx, [ecx + ecx*2]
test cl, 3
je 0x4c7d022e
lea esp, [esp]
add ecx, 1
mov byte [esi], 0
add esi, 1
test cl, 3
jne 0x4c7d0220
mov ecx, dword [ebp - 0xc]
add ecx, 1
cmp ecx, dword [edi + 8]
mov dword [ebp - 0xc], ecx
jb 0x4c7d0190
mov eax, dword [edi + 0xc]
shr eax, 2
add eax, 1
lea eax, [eax + eax*2]
shr eax, 2
add eax, eax
add eax, eax
mov dword [edi + 0xc], eax
mov ecx, dword [edi + 0xc]
xor eax, eax
imul ecx, dword [edi + 8]
pop esi
mov word [edi + 2], ax
mov dword [edi + 0x10], eax
pop ebx
mov word [edi], 5
mov dword [edi + 0x14], ecx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret