Function at 0x4a5c80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x44
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [esp + 0x4c], esi
mov edi, dword [esi + 0x10]
cmp edi, 3
jae 0x4a5ca4
call fcn.004a7f50
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov ecx, dword [esi]
push ebp
mov dword [esp + 0x30], 2
mov dword [esp + 0x38], 0
movzx edx, byte [ecx]
movzx eax, byte [ecx + 2]
shl edx, 8
or edx, eax
mov dword [esp + 0x20], 0
movzx eax, byte [ecx + 1]
movzx eax, word [esi + eax*4 + 0x60]
xor edx, eax
mov eax, dword [esi + 0x24]
lea ecx, [eax + edx*4]
mov eax, dword [esi + 4]
mov edx, dword [ecx]
mov dword [ecx], eax
mov eax, dword [esi + 0x30]
mov ebp, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [esi]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
sub eax, ebp
cmp ebp, dword [esp + 0x28]
mov dword [esp + 0x44], ebp
sbb ebp, ebp
mov dword [esp + 0x40], ecx
lea ecx, [esi + ecx*8]
mov dword [esp + 0x14], edx
and ebp, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x48], ebp
lea esi, [ecx + 4]
mov dword [esp + 0x1c], esi
cmp ebp, edx
jae 0x4a5e41
jmp 0x4a5d40
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
sub ebp, edx
cmp dword [esp + 0x40], ebp
mov esi, ebp
mov edx, dword [esp + 0x10]
sbb eax, eax
neg esi
and eax, dword [esp + 0x44]
add edx, esi
sub eax, ebp
mov dword [esp + 0x34], edx
add eax, dword [esp + 0x40]
lea ecx, [ecx + eax*8]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x24], ecx
cmp eax, dword [esp + 0x20]
jb 0x4a5d7d
mov eax, dword [esp + 0x20]
mov ecx, dword [ecx]
mov dword [esp + 0x4c], ecx
mov cl, byte [eax + edx]
mov edx, dword [esp + 0x10]
cmp cl, byte [eax + edx]
mov edx, dword [esp + 0x14]
jne 0x4a5de5
inc eax
cmp eax, edi
je 0x4a5dc8
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edx]
mov edx, dword [esp + 0x14]
jne 0x4a5dc8
inc eax
cmp eax, edi
je 0x4a5dc8
mov edx, dword [esp + 0x10]
add edx, eax
mov cl, byte [edx + esi]
cmp cl, byte [edx]
jne 0x4a5dc4
inc eax
inc edx
cmp eax, edi
jne 0x4a5db7
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x30], eax
jae 0x4a5de5
mov dword [ebx], eax
lea ecx, [ebp - 1]
mov dword [ebx + 4], ecx
add ebx, 8
mov dword [esp + 0x30], eax
cmp eax, edi
je 0x4a5e73
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x10]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + ebp]
jae 0x4a5e12
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x24]
add ecx, 4
mov dword [esp + 0x18], ecx
mov edx, dword [ecx]
jmp 0x4a5e2c
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x38], eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x24]
mov esi, ecx
mov dword [esp + 0x1c], esi
mov edx, dword [ecx]
mov ecx, dword [esp + 0x18]
sub dword [esp + 0x3c], 1
mov dword [esp + 0x14], edx
je 0x4a5e41
cmp dword [esp + 0x48], edx
jb 0x4a5d40
mov dword [ecx], 0
mov dword [esi], 0
mov eax, dword [esp + 0x50]
pop ebp
mov ecx, dword [eax + 4]
inc dword [eax + 0x14]
inc ecx
inc dword [eax]
mov dword [eax + 4], ecx
cmp ecx, dword [eax + 8]
jne 0x4a5e6a
mov ecx, eax
call fcn.004a77f0
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x4c]
mov dword [ecx], eax
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 4]
mov ecx, dword [esp + 0x1c]
mov dword [ecx], eax
jmp 0x4a5e4d