Function at 0x4c63c3
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0x10]
cmp ebx, 3
jae 0x4c63e4
push esi
call fcn.004c756a
pop ecx
xor eax, eax
jmp 0x4c6591
mov ecx, dword [esi]
and dword [ebp - 0x20], 0
and dword [ebp - 0x1c], 0
push edi
movzx edx, byte [ecx]
movzx eax, byte [ecx + 2]
shl edx, 8
or edx, eax
mov edi, dword [ebp + 0xc]
movzx eax, byte [ecx + 1]
mov ecx, dword [esi + 0x24]
mov dword [ebp - 0x30], 2
movzx eax, word [esi + eax*4 + 0x60]
xor edx, eax
mov eax, dword [ecx + edx*4]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 4]
mov dword [ecx + edx*4], eax
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x30]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x24], edx
lea ecx, [eax + ecx*8]
mov dword [ebp - 4], ecx
lea eax, [ecx + 4]
mov dword [ebp - 8], eax
test edx, edx
je 0x4c656b
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
sub edx, eax
dec dword [ebp - 0x24]
mov dword [ebp - 0x14], edx
cmp edx, ecx
jae 0x4c6565
cmp dword [ebp - 0x3c], edx
mov esi, dword [ebp - 0xc]
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0x2c]
sub eax, edx
add eax, dword [ebp - 0x3c]
lea eax, [ecx + eax*8]
mov ecx, edx
neg ecx
mov dword [ebp - 0x28], eax
mov eax, dword [eax]
mov dword [ebp - 0x40], ecx
add ecx, esi
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
cmp dword [ebp - 0x20], edx
mov edx, dword [ebp - 0x14]
cmovb ecx, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov al, byte [ecx + eax]
cmp al, byte [ecx + esi]
mov esi, dword [ebp + 8]
jne 0x4c6505
inc ecx
cmp ecx, ebx
je 0x4c64ee
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov al, byte [ecx + eax]
cmp al, byte [ecx + edx]
mov edx, dword [ebp - 0x14]
jne 0x4c64ee
inc ecx
cmp ecx, ebx
je 0x4c64ee
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x40]
add esi, ecx
mov al, byte [esi + edx]
cmp al, byte [esi]
jne 0x4c64e8
inc ecx
inc esi
cmp ecx, ebx
jne 0x4c64db
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
cmp dword [ebp - 0x30], ecx
jae 0x4c6505
mov dword [edi], ecx
lea eax, [edx - 1]
mov dword [edi + 4], eax
add edi, 8
mov dword [ebp - 0x30], ecx
cmp ecx, ebx
je 0x4c6550
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov al, byte [ecx + eax]
cmp al, byte [ecx + edx]
jae 0x4c652b
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
mov dword [eax], edx
mov eax, dword [ebp - 0x28]
add eax, 4
mov dword [ebp - 4], eax
mov ecx, eax
jmp 0x4c653f
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 4]
mov dword [edx], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x24], 0
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
jne 0x4c645c
jmp 0x4c6568
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 4]
mov dword [edx], eax
jmp 0x4c6571
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
and dword [ecx], 0
and dword [eax], 0
sub edi, dword [ebp + 0xc]
sar edi, 2
inc dword [esi + 0x14]
inc dword [esi]
inc dword [esi + 4]
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
jne 0x4c658e
push esi
call fcn.004c7192
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret