Function at 0x4a1934
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
mov ecx, eax
shl ecx, 2
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 0
jle 0x4a198e
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
jle 0x4a198e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, ecx
mov edx, dword [ebp - 4]
push ecx
mov ecx, dword [edx + 0xc]
cdq
idiv ecx
pop ecx
mov edx, dword [ebp - 4]
imul dword [edx + 0x14]
add ecx, eax
cmp ecx, dword [edi]
jle 0x4a199b
mov dword [edi], ecx
xor eax, eax
jmp 0x4a1dc9
mov dword [edi], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, dword [ebp - 8]
cmp eax, 3
jge 0x4a19ef
mov eax, dword [ebp - 8]
dec eax
test eax, eax
jl 0x4a19db
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
mov al, byte [esi + eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x4a19be
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add dword [eax + 4], edx
mov al, 1
xor edx, edx
mov dword [edi], edx
jmp 0x4a1dc9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
test eax, eax
jle 0x4a1b65
mov edx, dword [ebp - 4]
mov edx, 2
sub edx, eax
test edx, edx
jl 0x4a1a33
inc edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
mov al, byte [esi + eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x4a1a16
mov eax, dword [ebp - 4]
push dword [eax + 4]
mov eax, 3
pop edx
sub eax, edx
add esi, eax
mov edx, dword [ebp - 4]
sub dword [ebp - 8], eax
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 4]
movzx eax, byte [eax]
shr eax, 2
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x18], al
mov eax, dword [ebp - 4]
mov al, byte [eax]
and al, 3
and eax, 0xff
shl eax, 4
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 1]
shr edx, 4
or eax, edx
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x19], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 2]
shr edx, 6
or eax, edx
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 2]
and al, 0x3f
and eax, 0xff
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1b], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4a1ae8
mov edx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
add edx, 4
cmp eax, edx
jle 0x4a1b06
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x18
mov ecx, 4
call fcn.00402c84
add ebx, 4
mov eax, dword [ebp - 4]
add dword [eax + 8], 4
jmp 0x4a1b65
mov edx, dword [ebp - 4]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x18
mov ecx, dword [ebp - 0xc]
call fcn.00402c84
mov eax, dword [ebp - 0xc]
add ebx, eax
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x14]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x10
call fcn.00402c84
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
add ebx, eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
lea eax, [eax + edx + 0x18]
mov edi, 4
sub edi, dword [ebp - 0xc]
mov ecx, edi
mov edx, ebx
call fcn.00402c84
add ebx, edi
mov eax, dword [ebp - 4]
mov dword [eax + 8], edi
cmp dword [ebp - 8], 3
jl 0x4a1dab
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 0
jle 0x4a1bb1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
test eax, eax
jns 0x4a1b8b
add eax, 3
sar eax, 2
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
cmp eax, dword [ebp - 0x10]
jge 0x4a1bbf
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x10], eax
jmp 0x4a1bbf
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x4a1c37
inc eax
mov dword [ebp - 0x14], eax
mov edi, esi
xor eax, eax
mov al, byte [edi]
shr eax, 2
mov al, byte [eax + 0x4f9940]
mov byte [ebx], al
inc ebx
mov al, byte [edi]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [edi + 1]
shr edx, 4
or eax, edx
mov al, byte [eax + 0x4f9940]
mov byte [ebx], al
inc ebx
mov al, byte [edi + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
xor edx, edx
mov dl, byte [edi + 2]
shr edx, 6
or eax, edx
mov al, byte [eax + 0x4f9940]
mov byte [ebx], al
inc ebx
mov al, byte [edi + 2]
and al, 0x3f
and eax, 0xff
mov al, byte [eax + 0x4f9940]
mov byte [ebx], al
inc ebx
add esi, 3
dec dword [ebp - 0x14]
jne 0x4a1bcb
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
sub dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 0
jle 0x4a1da1
mov eax, dword [ebp - 0x10]
shl eax, 2
mov edx, dword [ebp - 4]
add dword [edx + 8], eax
cmp dword [ebp - 8], 3
jl 0x4a1d67
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
test eax, eax
jle 0x4a1d67
xor eax, eax
mov al, byte [esi]
shr eax, 2
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x18], al
mov al, byte [esi]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [esi + 1]
shr edx, 4
or eax, edx
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x19], al
mov al, byte [esi + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
xor edx, edx
mov dl, byte [esi + 2]
shr edx, 6
or eax, edx
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1a], al
mov al, byte [esi + 2]
and al, 0x3f
and eax, 0xff
mov al, byte [eax + 0x4f9940]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1b], al
add esi, 3
sub dword [ebp - 8], 3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x18
mov ecx, dword [ebp - 0xc]
call fcn.00402c84
mov eax, dword [ebp - 0xc]
add ebx, eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
jle 0x4a1d2c
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x14]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x10
call fcn.00402c84
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
add ebx, eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
lea eax, [eax + edx + 0x18]
mov ecx, 4
sub ecx, dword [ebp - 0xc]
mov edx, ebx
call fcn.00402c84
mov eax, 4
sub eax, dword [ebp - 0xc]
add ebx, eax
mov eax, 4
sub eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
jmp 0x4a1da1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0xc]
jne 0x4a1da1
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
jle 0x4a1da1
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x14]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x10
call fcn.00402c84
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
add ebx, eax
cmp dword [ebp - 8], 3
jge 0x4a1b6f
cmp dword [ebp - 8], 0
jle 0x4a1dc7
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [ebp - 8]
call fcn.00402c84
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [eax + 4], edx
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8