Function at 0x10087810
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x101a30c0]
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 0x10087a61
push esi
push edi
lea esi, [ebx - 2]
push ebx
lea eax, [ebp - 0xc]
push 0
push eax
call fcn.100f1230
add esp, 0xc
xor edi, edi
cmp esi, 3
ja case.default.0x1008786a
jmp dword [esi*4 + 0x10087a70]
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x100879f8
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 0x10087882
jmp 0x100879fb
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x100879f8
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 0x100878d0
jmp 0x100879fb
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x100879f8
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 0x10087920
jmp 0x100879fb
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x100879f8
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 0x10087970
jmp 0x100879fb
xor esi, esi
cmp dword [ebp - 0x18], esi
jl 0x100879f8
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 0x100879c0
jmp 0x100879fb
mov eax, dword [ebp - 0x14]
cmp esi, dword [ebp + 8]
jge 0x10087a4f
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 0x10087a2f
push 0xf7f
push str.C:Users_naizeDesktop_newperseusimguiimstb_truetype.h
push str.pixels_istride_in_bytes___0
call fcn.100f950c
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 0x10087a10
mov ebx, dword [ebp - 0x20]
inc dword [ebp - 0x1c]
lea esi, [ebx - 2]
sub dword [ebp - 0x24], 1
jne 0x10087850
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.100eeec4
mov esp, ebp
pop ebp
ret