Function at 0x4a70b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x6ab100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov ecx, dword [eax + 4]
mov eax, ecx
cdq
mov esi, eax
mov dword [ebp - 0x24], ebx
mov eax, ecx
xor esi, edx
sar eax, 0x1f
sub esi, edx
and eax, 2
mov dword [ebp - 0x34], esi
dec eax
mov dword [ebp - 0x30], eax
xor eax, eax
xor edi, edi
lea edx, [esi - 1]
test ecx, ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x3c], edx
cmovns eax, edx
mov dword [ebp - 0x10], eax
xor esi, esi
mov dword [ebp - 0x18], esi
nop dword [eax]
test edi, edi
jne 0x4a72a1
push ebx
call fcn.0049e540
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x4a72cc
push ebx
call fcn.0049e540
add esp, 4
movzx ecx, ax
mov dword [ebp - 0x14], ecx
test edi, edi
jle 0x4a7187
mov eax, dword [ebp - 0x20]
sub eax, esi
cmp edi, eax
cmovg edi, eax
mov al, cl
shr cl, 4
and al, 0xf
and cl, 0xf
mov byte [ebp - 0xb], al
mov byte [ebp - 0xc], cl
xor ecx, ecx
test edi, edi
jle 0x4a7231
mov eax, dword [ebp - 0x10]
imul eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x28]
add edx, eax
nop
mov eax, ecx
inc ecx
and eax, 1
mov al, byte [ebp + eax - 0xc]
mov byte [edx + esi], al
inc esi
cmp ecx, edi
jl 0x4a7170
jmp 0x4a7231
movzx ecx, word [ebp - 0x14]
mov eax, ecx
sub eax, 0
je 0x4a7291
sub eax, 1
je 0x4a7284
sub eax, 1
je 0x4a724c
mov edi, dword [ebp - 0x20]
mov eax, edi
sub eax, esi
cmp ecx, eax
cmovle eax, ecx
xor ebx, ebx
mov dword [ebp - 0x38], eax
test eax, eax
jle 0x4a722e
mov eax, dword [ebp - 0x10]
imul eax, edi
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
mov ecx, eax
nop dword [eax + eax]
mov edi, ebx
and edi, 3
jne 0x4a7220
push dword [ebp - 0x24]
call fcn.0049e760
movzx eax, ax
add esp, 4
mov dword [ebp - 0x14], eax
mov cx, word [ebp - 0x14]
movzx eax, al
and al, 0xf
shr cx, 4
mov byte [ebp - 0xb], al
movzx eax, cl
and al, 0xf
mov word [ebp - 0x14], cx
shr cx, 4
mov byte [ebp - 0xc], al
movzx eax, cl
and al, 0xf
mov word [ebp - 0x14], cx
mov ecx, dword [ebp - 0x2c]
mov byte [ebp - 9], al
mov eax, dword [ebp - 0x14]
shr eax, 4
mov byte [ebp - 0xa], al
mov al, byte [ebp + edi - 0xc]
inc ebx
mov byte [ecx + esi], al
inc esi
cmp ebx, dword [ebp - 0x38]
jl 0x4a71d0
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
inc eax
cmp esi, eax
jg 0x4a72a4
test ecx, ecx
je 0x4a7110
jmp 0x4a72a4
push ebx
call fcn.0049e540
add esp, 4
cmp eax, 0xffffffff
je 0x4a72cc
push ebx
add esi, eax
call fcn.0049e540
add esp, 4
cmp eax, 0xffffffff
je 0x4a72cc
imul eax, dword [ebp - 0x30]
xor ecx, ecx
mov edx, dword [ebp - 0x3c]
add eax, dword [ebp - 0x10]
cmovns ecx, eax
cmp ecx, dword [ebp - 0x34]
cmovl edx, ecx
mov dword [ebp - 0x10], edx
jmp 0x4a7234
mov edx, dword [ebp - 0x10]
mov edi, 1
mov dword [ebp - 0x1c], edi
jmp 0x4a7237
mov edx, dword [ebp - 0x10]
mov ecx, 1
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
jmp 0x4a723a
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x30]
mov dword [ebp - 0x10], edx
js 0x4a72b9
cmp edx, dword [ebp - 0x34]
jge 0x4a72b9
test edi, edi
je 0x4a7107
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005e8cbe
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005e8cbe
mov esp, ebp
pop ebp
ret