Function at 0x1800066d0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xa8
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x48], 0
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax]
mov dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
and eax, 0xff
movzx eax, al
mov qword [rsp + 0x70], rax
call fcn.1800f7374
mov rcx, qword [rsp + 0x70]
movzx eax, word [rax + rcx*2]
and eax, 8
test eax, eax
jne 0x1800066fb
cmp dword [rsp + 0x20], 0x2d
jne 0x180006774
mov dword [rsp + 0x48], 1
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x20], eax
jmp 0x18000679c
cmp dword [rsp + 0x20], 0x2b
jne 0x18000679c
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax]
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0xc0], 0
je 0x1800067b0
cmp dword [rsp + 0xc0], 0x10
jne 0x180006800
cmp dword [rsp + 0x20], 0x30
jne 0x180006800
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax]
cmp eax, 0x78
je 0x1800067d1
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax]
cmp eax, 0x58
jne 0x180006800
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rsp + 0x28]
movsx eax, byte [rcx + rax]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x28], rax
mov dword [rsp + 0xc0], 0x10
cmp dword [rsp + 0xc0], 0
jne 0x18000682e
cmp dword [rsp + 0x20], 0x30
jne 0x18000681b
mov dword [rsp + 0x40], 8
jmp 0x180006823
mov dword [rsp + 0x40], 0xa
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0xc0], eax
movsxd rax, dword [rsp + 0xc0]
mov qword [rsp + 0x78], rax
xor edx, edx
mov rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x78]
div rcx
mov qword [rsp + 0x60], rax
movsxd rax, dword [rsp + 0xc0]
mov qword [rsp + 0x80], rax
xor edx, edx
mov rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x80]
div rcx
mov rax, rdx
mov dword [rsp + 0x5c], eax
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
jmp 0x1800068b0
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax]
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0x28]
inc rax
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
and eax, 0xff
movzx eax, al
mov qword [rsp + 0x88], rax
call fcn.1800f7374
mov rcx, qword [rsp + 0x88]
movzx eax, word [rax + rcx*2]
and eax, 4
test eax, eax
je 0x1800068ec
mov eax, dword [rsp + 0x20]
sub eax, 0x30
mov dword [rsp + 0x20], eax
jmp 0x18000696c
mov eax, dword [rsp + 0x20]
and eax, 0xff
movzx eax, al
mov qword [rsp + 0x90], rax
call fcn.1800f7374
mov rcx, qword [rsp + 0x90]
movzx eax, word [rax + rcx*2]
and eax, 0x103
test eax, eax
je 0x18000696a
mov eax, dword [rsp + 0x20]
and eax, 0xff
movzx eax, al
mov qword [rsp + 0x98], rax
call fcn.1800f7374
mov rcx, qword [rsp + 0x98]
movzx eax, word [rax + rcx*2]
and eax, 1
test eax, eax
je 0x180006950
mov dword [rsp + 0x44], 0x37
jmp 0x180006958
mov dword [rsp + 0x44], 0x57
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x20]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
jmp 0x18000696c
jmp 0x1800069e9
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x20], eax
jl 0x18000697b
jmp 0x1800069e9
cmp dword [rsp + 0x30], 0
jl 0x1800069a4
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
ja 0x1800069a4
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jne 0x1800069ae
mov eax, dword [rsp + 0x5c]
cmp dword [rsp + 0x20], eax
jle 0x1800069ae
mov dword [rsp + 0x30], 0xffffffff
jmp 0x1800069e4
mov dword [rsp + 0x30], 1
movsxd rax, dword [rsp + 0xc0]
mov rcx, qword [rsp + 0x38]
imul rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
jmp 0x18000688f
cmp dword [rsp + 0x30], 0
jge 0x1800069fb
mov qword [rsp + 0x38], 0xffffffffffffffff
jmp 0x180006a0e
cmp dword [rsp + 0x48], 0
je 0x180006a0e
xor eax, eax
sub rax, qword [rsp + 0x38]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0xb8], 0
je 0x180006a4c
cmp dword [rsp + 0x30], 0
je 0x180006a2f
mov rax, qword [rsp + 0x28]
dec rax
mov qword [rsp + 0x68], rax
jmp 0x180006a3c
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x68]
mov qword [rax], rcx
mov rax, qword [rsp + 0x38]
add rsp, 0xa8
ret