Function at 0x417930
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rsi
push rdi
sub rsp, 0xf8
mov qword [rsp + 0xe0], r8
mov qword [rsp + 0xe8], r9
mov r10b, 1
mov rax, rdx
cmp rdx, 0x101
jb 0x41799f
mov r11d, 0xff
sub r11, rdx
mov esi, 0x100
nop word cs:[rax + rax]
cmp rsi, rdx
jae 0x41797b
cmp byte [rcx + rsi], 0xbf
jg 0x417999
lea rax, [rsi - 1]
xor r10d, r10d
cmp rsi, 1
je 0x41799f
add rsi, r11
cmp rsi, 0x100
mov rsi, rax
jne 0x417970
jmp 0x41799f
xor r10d, r10d
mov rax, rsi
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xb8], rax
lea rax, sym.core::ptr::drop_in_place::h6a21f5a5fafafde8
lea rsi, str._..._
test r10b, r10b
cmovne rsi, rax
xor r10b, 1
movzx eax, r10b
lea rax, [rax + rax*4]
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xc8], rax
cmp r8, rdx
ja 0x417a68
cmp r9, rdx
ja 0x417a68
cmp r8, r9
ja 0x417cd5
test r8, r8
je 0x417a0a
cmp rdx, r8
je 0x417a0a
jbe 0x417a0d
cmp byte [rcx + r8], 0xc0
jl 0x417a0d
mov r8, r9
mov qword [rsp + 0xf0], r8
test r8, r8
je 0x417b0a
cmp r8, rdx
je 0x417b0a
lea rax, [rdx + 1]
nop dword [rax + rax]
cmp r8, rdx
jae 0x417a3c
cmp byte [rcx + r8], 0xbf
jg 0x417a51
lea rsi, [r8 - 1]
cmp r8, 1
je 0x417a4e
cmp rax, r8
mov r8, rsi
jne 0x417a30
mov r8, rsi
cmp r8, rdx
jne 0x417b16
lea rcx, [0x004291e8]
call dbg.panic
cmp r8, rdx
cmova r9, r8
mov qword [rsp + 0xd0], r9
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x60], rax
lea rax, [sym.core::fmt::num::__impl_core::fmt::Display_for_usize_::fmt::h1e664bc5f048e795]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
lea rax, [dbg.fmt<str>]
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x80], rcx
mov qword [rsp + 0x88], rax
lea rax, [0x00428ad0]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 3
lea rax, [0x00428b00]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 3
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 3
lea rdx, str.libcore_strmod.rsbyte_index__is_not_a_char_boundary__it_is_inside___bytes___of___begin___end_______when_slicing___is_out_of_bounds_of__Utf8Errorvalid_up_to
jmp 0x417cc9
mov rsi, r8
cmp r8, rdx
je 0x417a5a
movzx eax, byte [rcx + r8]
test al, al
js 0x417b2d
mov dword [rsp + 0x2c], eax
mov eax, 1
jmp 0x417bed
add rdx, rcx
lea rsi, [rcx + r8]
add rsi, 1
xor r9d, r9d
mov rdi, rdx
cmp rsi, rdx
je 0x417b56
add rcx, r8
movzx r9d, byte [rcx + 1]
add rcx, 2
and r9d, 0x3f
mov rdi, rcx
mov ecx, eax
and ecx, 0x1f
cmp al, 0xe0
jb 0x417bb1
xor r11d, r11d
mov r10, rdx
cmp rdi, rdx
je 0x417b79
movzx r11d, byte [rdi]
add rdi, 1
and r11d, 0x3f
mov r10, rdi
shl r9d, 6
or r9d, r11d
cmp al, 0xf0
jb 0x417bb6
xor eax, eax
cmp r10, rdx
je 0x417b92
movzx eax, byte [r10]
and eax, 0x3f
and ecx, 7
shl ecx, 0x12
shl r9d, 6
or r9d, ecx
or r9d, eax
cmp r9d, 0x110000
je 0x417a5a
jmp 0x417bbc
shl ecx, 6
jmp 0x417bb9
shl ecx, 0xc
or r9d, ecx
mov dword [rsp + 0x2c], r9d
mov eax, 1
cmp r9d, 0x80
jb 0x417bed
mov eax, 2
cmp r9d, 0x800
jb 0x417bed
cmp r9d, 0x10000
mov eax, 4
sbb rax, 0
add rax, r8
mov qword [rsp + 0xd0], r8
mov qword [rsp + 0xd8], rax
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x60], rax
lea rax, [sym.core::fmt::num::__impl_core::fmt::Display_for_usize_::fmt::h1e664bc5f048e795]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x2c]
mov qword [rsp + 0x70], rax
lea rax, [sym.__char_as_core::fmt::Debug_::fmt::h9a41cc97218ee7cc]
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x80], rax
lea rax, [dbg.fmt<usize>]
mov qword [rsp + 0x88], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x90], rax
lea rax, [dbg.fmt<str>]
mov qword [rsp + 0x98], rax
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0xa8], rax
lea rax, [0x00428d30]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 5
lea rax, [0x00428d80]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 5
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 5
lea rdx, str.libcore_strmod.rsbyte_index__is_not_a_char_boundary__it_is_inside___bytes___of___begin___end_______when_slicing___is_out_of_bounds_of__Utf8Errorvalid_up_to
lea rcx, [rsp + 0x30]
call dbg.panic_fmt
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x60], rax
lea rax, [sym.core::fmt::num::__impl_core::fmt::Display_for_usize_::fmt::h1e664bc5f048e795]
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0xe8]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x80], rax
lea rax, [dbg.fmt<str>]
mov qword [rsp + 0x88], rax
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x98], rax
lea rax, [0x00428bd8]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 4
lea rax, [0x00428c18]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 4
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 4
lea rdx, str.libcore_strmod.rsbyte_index__is_not_a_char_boundary__it_is_inside___bytes___of___begin___end_______when_slicing___is_out_of_bounds_of__Utf8Errorvalid_up_to
jmp 0x417cc9