Function at 0x4e9cc0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
sub esp, 0xc
push eax
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x4c]
push eax
call sym.vidcap60.exe__SfDibPrepareCopy_52
test eax, eax
jl 0x4e9f74
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea esi, [ebx*4]
push esi
push 2
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call ebp
test eax, eax
mov dword [esp + 0x14], eax
je 0x4e9d6a
push esi
push 2
call edi
push eax
call ebp
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4e9d79
mov edi, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
mov eax, 0x8007000e
pop ebx
add esp, 0xc
ret 0x24
cmp dword [esp + 0x40], 4
mov ebp, dword [esp + 0x3c]
jne 0x4e9dc4
xor edi, edi
test ebx, ebx
jle 0x4e9dc0
lea esi, [ebp + 1]
lea ecx, [ecx]
movzx edx, byte [esi + 1]
movzx ecx, byte [esi - 1]
movzx eax, byte [esi]
add ecx, edx
add ecx, eax
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x14]
mov dword [edx + edi*4], ecx
inc edi
add esi, 4
cmp edi, ebx
jl 0x4e9d90
mov eax, dword [esp + 0x18]
add ebp, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
dec eax
test eax, eax
mov dword [esp + 0x34], edx
jle 0x4e9f38
lea esi, [ebp + 1]
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], eax
jmp 0x4e9e00
mov edx, dword [esp + 0x34]
jmp 0x4e9e00
cmp dword [esp + 0x40], 4
jne 0x4e9ef2
xor edi, edi
test ebx, ebx
jle 0x4e9e41
movzx eax, byte [esi + 1]
movzx ecx, byte [esi - 1]
movzx edx, byte [esi]
add ecx, eax
add ecx, edx
mov eax, 0x55555556
imul ecx
mov ecx, dword [esp + 0x3c]
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ecx + edi*4], eax
inc edi
add esi, 4
cmp edi, ebx
jl 0x4e9e11
mov edx, dword [esp + 0x34]
lea esi, [ebx - 1]
cmp esi, 1
jle 0x4e9ef2
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x3c]
mov ebp, edx
sub ebp, eax
mov eax, dword [esp + 0x30]
sub eax, edx
add ecx, 8
dec esi
lea ebx, [edx + 4]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], esi
jmp 0x4e9e74
mov eax, dword [esp + 0x34]
mov edi, dword [ebx]
cmp edi, 0x7f
jge 0x4e9e84
mov dword [eax + ebx], 0
jmp 0x4e9e91
add edi, 0xffffff01
mov dword [eax + ebx], 0xffffffff
mov eax, edi
imul eax, eax, 7
cdq
and edx, 0xf
add eax, edx
mov edx, dword [ecx + ebp]
sar eax, 4
add edx, eax
mov dword [ecx + ebp], edx
mov esi, edi
sub esi, eax
lea eax, [edi + edi*2]
cdq
and edx, 0xf
add eax, edx
mov edx, dword [ecx - 8]
sar eax, 4
add edx, eax
sub esi, eax
lea eax, [edi + edi*4]
mov edi, dword [ecx - 4]
mov dword [ecx - 8], edx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
add edi, eax
mov dword [ecx - 4], edi
mov edi, dword [ecx]
sub esi, eax
mov eax, dword [esp + 0x3c]
add edi, esi
mov dword [ecx], edi
add ebx, 4
add ecx, 4
dec eax
mov dword [esp + 0x3c], eax
jne 0x4e9e70
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + eax*4 + 0x14]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
xor eax, 1
mov dword [esp + 0x24], eax
mov eax, dword [esp + eax*4 + 0x14]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x10]
add esi, edi
add edx, ecx
dec eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x10], eax
jne 0x4e9df2
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call edi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call ebx
mov ebp, dword [esp + 0x18]
push ebp
call esi
push eax
call edi
push ebp
call esi
push eax
call ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x24