Function at 0x1400a6870
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x50]
add rax, 0x60
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x1400a69ac
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x58]
cmp qword [rax + 8], rcx
jb 0x1400a69ac
mov rax, qword [rsp + 0x28]
movzx eax, byte [rax]
cmp eax, 5
jge 0x1400a68fe
lea r9, [0x1402aeba8]
mov r8d, 0x63
lea rdx, [0x1402aebc0]
lea rcx, [0x1402aec08]
call fcn.14002c530
test eax, eax
je 0x1400a68fe
int3
mov rax, qword [rsp + 0x28]
movzx eax, byte [rax + 1]
and eax, 0xb
mov rcx, qword [rsp + 0x38]
movzx ecx, byte [rcx + 0x20]
xor ecx, 3
and ecx, 3
cmp eax, ecx
jne 0x1400a6944
lea r9, [0x1402aec28]
mov r8d, 0x63
lea rdx, [0x1402aec40]
lea rcx, str._isdead_g__obj2gco_p__
call fcn.14002c530
test eax, eax
je 0x1400a6944
int3
mov rax, qword [rsp + 0x28]
add rax, 0x10
mov rcx, qword [rsp + 0x28]
cmp qword [rcx + 8], rax
jne 0x1400a697f
lea r9, [0x1402aeca0]
mov r8d, 0x64
lea rdx, [0x1402aecb0]
lea rcx, str.upisopen_p_
call fcn.14002c530
test eax, eax
je 0x1400a697f
int3
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x58]
cmp qword [rax + 8], rcx
jne 0x1400a6999
mov rax, qword [rsp + 0x28]
jmp 0x1400a6b6f
mov rax, qword [rsp + 0x28]
add rax, 0x20
mov qword [rsp + 0x30], rax
jmp 0x1400a689a
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 5]
test eax, eax
jne 0x1400a69e0
lea r9, [0x1402aed08]
mov r8d, 0x6b
lea rdx, [0x1402aed20]
lea rcx, [0x1402aed68]
call fcn.14002c530
test eax, eax
je 0x1400a69e0
int3
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax]
cmp eax, 5
jge 0x1400a6a14
lea r9, [0x1402aed78]
mov r8d, 0x6c
lea rdx, [0x1402aed90]
lea rcx, [0x1402aedd8]
call fcn.14002c530
test eax, eax
je 0x1400a6a14
int3
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 1]
and eax, 4
test eax, eax
je 0x1400a6a4b
lea r9, [0x1402aedf8]
mov r8d, 0x6c
lea rdx, [0x1402aee10]
lea rcx, [0x1402aee58]
call fcn.14002c530
test eax, eax
je 0x1400a6a4b
int3
mov rax, qword [rsp + 0x50]
movzx r8d, byte [rax + 4]
mov edx, 0x28
mov rcx, qword [rsp + 0x50]
call fcn.1400ade30
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x18]
movzx eax, byte [rax + 0x20]
and eax, 3
mov rcx, qword [rsp + 0x20]
mov byte [rcx + 1], al
mov rax, qword [rsp + 0x20]
mov byte [rax], 0xc
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
movzx ecx, byte [rcx + 4]
mov byte [rax + 2], cl
mov rax, qword [rsp + 0x20]
mov byte [rax + 3], 0
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x58]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx]
mov qword [rax + 0x20], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
mov qword [rax], rcx
mov rax, qword [rsp + 0x38]
add rax, 0xb00
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x38]
mov rcx, qword [rcx + 0xb18]
mov qword [rax + 0x18], rcx
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x18]
mov rcx, qword [rsp + 0x20]
mov qword [rax + 0x10], rcx
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
mov qword [rax + 0xb18], rcx
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x18]
mov rcx, qword [rsp + 0x20]
cmp qword [rax + 0x10], rcx
jne 0x1400a6b43
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, qword [rsp + 0x20]
cmp qword [rax + 0x18], rcx
je 0x1400a6b6a
lea r9, str.luaF_findupval
mov r8d, 0x7c
lea rdx, [0x1402aee80]
lea rcx, [0x1402aeed0]
call fcn.14002c530
test eax, eax
je 0x1400a6b6a
int3
mov rax, qword [rsp + 0x20]
add rsp, 0x48
ret