Function at 0x4a9a80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
and ecx, 7
je 0x4a9aea
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
and eax, 7
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0x10]
jge 0x4a9ab4
mov eax, dword [ebp + 8]
push eax
call fcn.0049e690
add esp, 4
mov edx, 1
mov ecx, dword [ebp - 0x10]
shl edx, cl
sub edx, 1
mov eax, dword [ebp + 8]
and edx, dword [eax + 0xc]
mov dword [ebp - 0x20], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
mov ecx, dword [ebp - 0x10]
shr edx, cl
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov dword [eax + 8], edx
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 8], 0
jle 0x4a9b35
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
and eax, 0xff
mov ecx, dword [ebp - 4]
mov byte [ebp + ecx - 0xc], al
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
shr ecx, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
sub ecx, 8
mov edx, dword [ebp + 8]
mov dword [edx + 8], ecx
jmp 0x4a9af1
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jge 0x4a9b50
push 0x5621ac
call fcn.0049e420
add esp, 4
jmp 0x4a9c9a
cmp dword [ebp - 4], 4
jge 0x4a9baf
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx]
cmp eax, dword [edx + 4]
jb 0x4a9b6c
mov dword [ebp - 0x14], 1
jmp 0x4a9b73
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x4a9b82
mov dword [ebp - 0x18], 0
jmp 0x4a9b9a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, byte [edx]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov ecx, dword [ebp - 4]
mov dl, byte [ebp - 0x18]
mov byte [ebp + ecx - 0xc], dl
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x4a9b50
mov ecx, 1
shl ecx, 0
movzx edx, byte [ebp + ecx - 0xc]
shl edx, 8
mov eax, 1
imul ecx, eax, 0
movzx eax, byte [ebp + ecx - 0xc]
add edx, eax
mov dword [ebp - 8], edx
mov ecx, 1
imul edx, ecx, 3
movzx eax, byte [ebp + edx - 0xc]
shl eax, 8
mov ecx, 1
shl ecx, 1
movzx edx, byte [ebp + ecx - 0xc]
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
xor eax, 0xffff
cmp dword [ebp - 0x1c], eax
je 0x4a9c11
push 0x5621ac
call fcn.0049e420
add esp, 4
jmp 0x4a9c9a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
cmp edx, dword [eax + 4]
jbe 0x4a9c30
push 0x5621bc
call fcn.0049e420
add esp, 4
jmp 0x4a9c9a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
cmp edx, dword [eax + 0x18]
jbe 0x4a9c60
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004b0940
add esp, 0xc
test eax, eax
jne 0x4a9c60
xor eax, eax
jmp 0x4a9c9a
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
push eax
call fcn.004f37d0
add esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], edx
mov eax, 1
mov esp, ebp
pop ebp
ret