Function at 0x4c646c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x528
mov eax, dword [0x577830]
xor eax, esp
mov dword [esp + 0x524], eax
push ebx
mov ebx, dword [esp + 0x530]
push esi
mov esi, ecx
test esi, esi
push edi
mov dword [esp + 0x14], ebx
mov edi, edx
jl 0x4c647f
cmp esi, 4
jl 0x4c6497
mov eax, dword [ebx]
mov dword [eax + 0x14], 0x34
mov ecx, dword [ebx]
mov dword [ecx + 0x18], esi
mov edx, dword [ebx]
mov eax, dword [edx]
push ebx
call eax
add esp, 4
cmp byte [esp + 0x53c], 0
push ebp
je 0x4c64af
mov ebp, dword [ebx + esi*4 + 0xa8]
mov dword [esp + 0x10], ebp
jmp 0x4c64bc
mov ecx, dword [ebx + esi*4 + 0xb8]
mov dword [esp + 0x10], ecx
mov ebp, ecx
test ebp, ebp
jne 0x4c64d8
mov edx, dword [ebx]
mov dword [edx + 0x14], 0x34
mov eax, dword [ebx]
mov dword [eax + 0x18], esi
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call edx
add esp, 4
cmp dword [edi], 0
jne 0x4c64f1
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
push 0x494
push 1
push ebx
call ecx
add esp, 0xc
mov dword [edi], eax
mov ebx, dword [edi]
mov dword [ebx + 0x90], ebp
mov dword [esp + 0x20], ebx
xor edi, edi
mov ebp, 1
mov edx, dword [esp + 0x10]
movzx esi, byte [edx + ebp]
test esi, esi
jl 0x4c651a
lea eax, [esi + edi]
cmp eax, 0x100
jle 0x4c6531
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov dword [ecx + 0x14], 0xa
mov edx, dword [eax]
push eax
mov eax, dword [edx]
call eax
add esp, 4
test esi, esi
je 0x4c6549
push esi
lea eax, [esp + edi + 0x434]
push ebp
push eax
call fcn.005185b0
add esp, 0xc
add edi, esi
add ebp, 1
cmp ebp, 0x10
jle 0x4c6504
mov byte [esp + edi + 0x430], 0
mov al, byte [esp + 0x430]
mov dword [esp + 0x24], edi
xor edi, edi
xor esi, esi
test al, al
movsx ebp, al
je 0x4c65cb
lea eax, [esp + 0x430]
movsx ecx, byte [eax]
cmp ecx, ebp
jne 0x4c6596
lea ecx, [ecx]
movsx edx, byte [esp + esi + 0x431]
mov dword [esp + esi*4 + 0x2c], edi
add esi, 1
add edi, 1
cmp edx, ebp
je 0x4c6580
mov eax, 1
mov ecx, ebp
shl eax, cl
cmp edi, eax
jl 0x4c65ba
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov dword [ecx + 0x14], 0xa
mov edx, dword [eax]
push eax
mov eax, dword [edx]
call eax
add esp, 4
lea eax, [esp + esi + 0x430]
add edi, edi
add ebp, 1
cmp byte [eax], 0
jne 0x4c6576
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov eax, 1
cmp byte [eax + edx], 0
je 0x4c65f5
mov esi, ecx
sub esi, dword [esp + ecx*4 + 0x2c]
mov dword [ebx + eax*4 + 0x48], esi
movzx esi, byte [eax + edx]
add ecx, esi
mov esi, dword [esp + ecx*4 + 0x28]
mov dword [ebx + eax*4], esi
jmp 0x4c65fc
mov dword [ebx + eax*4], 0xffffffff
add eax, 1
cmp eax, 0x10
jle 0x4c65d6
xor ebp, ebp
lea edi, [ebx + 0x94]
mov dword [ebx + 0x8c], ebp
mov dword [ebx + 0x44], 0xfffff
mov ecx, 0x100
mov eax, 0x900
rep stosd dword es:[edi], eax
mov ecx, 7
lea ebx, [ebp + 1]
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x10]
mov eax, 1
cmp byte [ebx + esi], al
mov dword [esp + 0x1c], eax
jb 0x4c66a2
shl eax, cl
lea edi, [esi + ebp + 0x11]
mov dword [esp + 0x28], eax
lea ecx, [ecx]
mov edx, dword [esp + ebp*4 + 0x2c]
mov ecx, dword [esp + 0x14]
shl edx, cl
test eax, eax
jle 0x4c6689
mov ecx, dword [esp + 0x20]
mov esi, ebx
shl esi, 8
lea edx, [ecx + edx*4 + 0x94]
mov edi, edi
movzx ecx, byte [edi]
or ecx, esi
mov dword [edx], ecx
sub eax, 1
add edx, 4
test eax, eax
jg 0x4c6670
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
movzx ecx, byte [ebx + esi]
add edx, 1
add ebp, 1
add edi, 1
cmp edx, ecx
mov dword [esp + 0x1c], edx
jle 0x4c6650
mov ecx, dword [esp + 0x14]
add ebx, 1
sub ecx, 1
mov dword [esp + 0x14], ecx
jns 0x4c6631
cmp byte [esp + 0x540], 0
pop ebp
je 0x4c66fc
mov ebx, dword [esp + 0x20]
xor edi, edi
test ebx, ebx
jle 0x4c66fc
jmp 0x4c66d0
movzx eax, byte [esi + edi + 0x11]
test eax, eax
jl 0x4c66de
cmp eax, 0xf
jle 0x4c66f5
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
mov dword [edx + 0x14], 0xa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call edx
add esp, 4
add edi, 1
cmp edi, ebx
jl 0x4c66d0
mov ecx, dword [esp + 0x530]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005120db
add esp, 0x528