Function at 0x4a06f0
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 0x4a0714
call fcn.004a29a0
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]
xor edx, dword [esi + eax*4 + 0x60]
mov eax, dword [esi + 0x24]
movzx ecx, dx
mov edx, dword [eax + ecx*4]
lea ecx, [eax + ecx*4]
mov eax, dword [esi + 4]
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 0x4a08b1
lea esp, [esp]
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 0x4a07ed
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 0x4a0855
inc eax
cmp eax, edi
je 0x4a0838
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 0x4a0838
inc eax
cmp eax, edi
je 0x4a0838
mov edx, dword [esp + 0x10]
add edx, eax
mov cl, byte [edx + esi]
cmp cl, byte [edx]
jne 0x4a0834
inc eax
inc edx
cmp eax, edi
jne 0x4a0827
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x30], eax
jae 0x4a0855
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 0x4a08e3
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x10]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + ebp]
jae 0x4a0882
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 0x4a089c
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 0x4a08b1
cmp dword [esp + 0x48], edx
jb 0x4a07b0
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 0x4a08da
mov ecx, eax
call fcn.004a2260
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 0x4a08bd