Function at 0x1007fd80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x101911c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
sub eax, ebx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], eax
movlpd qword [ebp - 0xc], xmm0
test edx, edx
jle 0x1007ffd1
push esi
push edi
lea esi, [ebx - 2]
push ebx
lea eax, [ebp - 0xc]
push 0
push eax
call fcn.100df3c0
add esp, 0xc
xor edi, edi
cmp esi, 3
ja case.default.0x1007fdda
jmp dword [esi*4 + 0x1007ffe0]
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x1007ff68
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
mov dl, byte [ecx]
mov eax, esi
and eax, 7
movzx ecx, dl
movzx eax, byte [ebp + eax - 0xc]
sub ecx, eax
lea eax, [ebx + esi]
and eax, 7
add edi, ecx
mov ecx, dword [ebp - 0x10]
inc esi
mov byte [ebp + eax - 0xc], dl
mov eax, edi
shr eax, 1
mov byte [ecx], al
mov eax, dword [ebp - 0x14]
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp esi, dword [ebp - 0x18]
jle 0x1007fdf2
jmp 0x1007ff6b
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x1007ff68
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
nop dword [eax]
mov dl, byte [ecx]
mov eax, esi
and eax, 7
movzx ecx, dl
movzx eax, byte [ebp + eax - 0xc]
sub ecx, eax
lea eax, [ebx + esi]
and eax, 7
add edi, ecx
mov ecx, dword [ebp - 0x10]
inc esi
mov byte [ebp + eax - 0xc], dl
mov eax, 0xaaaaaaab
mul edi
mov eax, dword [ebp - 0x14]
shr edx, 1
mov byte [ecx], dl
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp esi, dword [ebp - 0x18]
jle 0x1007fe40
jmp 0x1007ff6b
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x1007ff68
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
nop
mov dl, byte [ecx]
mov eax, esi
and eax, 7
movzx ecx, dl
movzx eax, byte [ebp + eax - 0xc]
sub ecx, eax
lea eax, [ebx + esi]
and eax, 7
add edi, ecx
mov ecx, dword [ebp - 0x10]
inc esi
mov byte [ebp + eax - 0xc], dl
mov eax, edi
shr eax, 2
mov byte [ecx], al
mov eax, dword [ebp - 0x14]
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp esi, dword [ebp - 0x18]
jle 0x1007fe90
jmp 0x1007ff6b
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x1007ff68
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
nop dword [eax + eax]
mov dl, byte [ecx]
mov eax, esi
and eax, 7
movzx ecx, dl
movzx eax, byte [ebp + eax - 0xc]
sub ecx, eax
lea eax, [ebx + esi]
and eax, 7
add edi, ecx
mov ecx, dword [ebp - 0x10]
inc esi
mov byte [ebp + eax - 0xc], dl
mov eax, 0xcccccccd
mul edi
mov eax, dword [ebp - 0x14]
shr edx, 2
mov byte [ecx], dl
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp esi, dword [ebp - 0x18]
jle 0x1007fee0
jmp 0x1007ff6b
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x1007ff68
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
nop dword [eax]
mov dl, byte [ecx]
mov eax, esi
and eax, 7
movzx ecx, dl
movzx eax, byte [ebp + eax - 0xc]
sub ecx, eax
lea eax, [ebx + esi]
and eax, 7
add edi, ecx
mov ecx, dword [ebp - 0x10]
inc esi
mov byte [ebp + eax - 0xc], dl
xor edx, edx
mov eax, edi
div ebx
mov byte [ecx], al
mov eax, dword [ebp - 0x14]
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp esi, dword [ebp - 0x18]
jle 0x1007ff30
jmp 0x1007ff6b
mov eax, dword [ebp - 0x14]
cmp esi, dword [ebp + 8]
jge 0x1007ffbf
mov ecx, dword [ebp - 0x20]
mov ebx, eax
imul ebx, esi
add ebx, dword [ebp - 0x1c]
nop dword [eax + eax]
cmp byte [ebx], 0
je 0x1007ff9f
push 0xf7f
push 0x101619a8
push str.pixels_istride_in_bytes___0
call fcn.100e7dd8
mov ecx, dword [ebp - 0x20]
add esp, 0xc
mov eax, esi
xor edx, edx
and eax, 7
inc esi
movzx eax, byte [ebp + eax - 0xc]
sub edi, eax
mov eax, edi
div ecx
mov byte [ebx], al
add ebx, dword [ebp - 0x14]
cmp esi, dword [ebp + 8]
jl 0x1007ff80
mov ebx, dword [ebp - 0x20]
inc dword [ebp - 0x1c]
lea esi, [ebx - 2]
sub dword [ebp - 0x24], 1
jne 0x1007fdc0
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.100dd01c
mov esp, ebp
pop ebp
ret