Function at 0x14007c780
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov r11, r9
mov r13, r8
mov r8, rcx
mov r9, qword [rsp + 0xb0]
movzx ebx, word [rcx + 8]
test r13, r13
je 0x14007c902
mov r12, rdx
xor edx, edx
mov rax, r12
mov rsi, r12
xor ebp, ebp
mov r12, rax
cmp r12, r13
je 0x14007c96d
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x34], ebp
mov rdi, r12
movzx ebp, word [rdi]
cmp bp, bx
jae 0x14007c842
add rdi, 2
mov rsi, rdi
mov rdi, rsi
cmp rsi, r13
jne 0x14007c7d3
mov rsi, r13
cmp rsi, r12
mov word [rsp + 0x32], bx
je 0x14007c975
mov rbx, r8
mov r15d, edx
test r11, r11
je 0x14007c964
mov r14, r11
mov rcx, r11
mov rdx, r12
mov r8, rsi
mov rdi, r9
call fcn.14007c714
test al, al
je 0x14007c82b
cmp rsi, r13
jne 0x14007ca09
mov r12, rsi
mov rax, r12
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [r8 + 0x20]
mov rax, qword [rcx]
mov rsi, qword [rcx + 8]
mov rdx, rbp
shr rdx, 6
movzx eax, word [rax + rdx*2]
mov edx, ebp
and edx, 0x3f
add rdx, rax
movzx edx, word [rsi + rdx*2]
movzx r10d, word [r8 + 0xe]
cmp r10w, dx
ja 0x14007c7db
mov eax, edx
and eax, 0xfdff
movzx eax, ax
cmp eax, 0xfc00
je 0x14007c7db
mov qword [rsp + 0x40], rsi
mov r14, r11
mov r15, r8
mov eax, ebp
and eax, 0xfc00
cmp eax, 0xd800
jne 0x14007c8e7
lea rsi, [rdi + 2]
cmp rsi, r13
je 0x14007c8ec
movzx r8d, word [rsi]
mov eax, r8d
and eax, 0xfc00
cmp eax, 0xdc00
jne 0x14007ca5d
shl ebp, 0xa
add ebp, r8d
add ebp, 0xfca02400
cmp ebp, dword [rcx + 0x18]
jge 0x14007ca70
mov edx, ebp
call fcn.1400e09d3
movzx r10d, word [r15 + 0xe]
jmp 0x14007ca76
mov rsi, rdi
jmp 0x14007c8ef
mov rsi, r13
mov r9, qword [rsp + 0xb0]
mov r8, r15
mov r11, r14
jmp 0x14007c7ed
mov rbp, r11
mov rdi, r8
mov rsi, r9
xor eax, eax
movzx ecx, word [rdx + rax]
add rax, 2
cmp cx, bx
jae 0x14007c91f
test cx, cx
jne 0x14007c90d
lea r12, [rdx + rax]
add r12, 0xfffffffffffffffe
test rbp, rbp
je 0x14007c940
cmp rax, 2
je 0x14007c940
mov rcx, rbp
mov r8, r12
mov r9, rsi
call fcn.14007c714
cmp dword [rsi], 0
jg 0x14007c82e
mov rcx, r12
xor edx, edx
call fcn.140071ec7
mov r13, rax
mov r9, rsi
mov r8, rdi
mov r11, rbp
jmp 0x14007c7b1
cmp rsi, r13
jne 0x14007cac1
mov r12, r13
jmp 0x14007c82e
cmp r12, r13
je 0x14007c96d
mov r14, r11
mov rbx, r8
mov r15d, edx
mov rdi, r9
xor eax, eax
cmp ebp, 0x10000
setae al
lea r12, [rsi + rax*2]
add r12, 2
test r11, r11
jne 0x14007ca1c
mov rax, r12
mov r12, qword [rsp + 0x38]
cmp word [rbx + 0xe], r15w
ja 0x14007c9b8
cmp word [rbx + 0x1e], r15w
ja 0x14007c82e
mov edx, r15d
movzx esi, dx
mov ecx, esi
shr ecx, 1
xor ebp, ebp
cmp esi, 0xfc00
cmovae ebp, ecx
cmp byte [rsp + 0x34], bpl
setbe r8b
test bpl, bpl
sete cl
or cl, r8b
mov rsi, r12
cmovne rsi, rax
cmp bpl, 2
cmovae rsi, r12
test cl, cl
mov r9, rdi
mov r8, rbx
mov r11, r14
movzx ebx, word [rsp + 0x32]
jne 0x14007c7bb
jmp 0x14007c82e
xor eax, eax
cmp ebp, 0x10000
setae al
lea r12, [rsi + rax*2]
add r12, 2
mov qword [rsp + 0x20], rdi
mov rcx, rbx
mov edx, ebp
mov r8d, r15d
mov r9, r14
int3
mov r9, qword [rsp + 0xb0]
mov r8, r15
mov r11, r14
jmp 0x14007c7e2
mov eax, dword [rcx + 0x14]
add eax, 0xfffffffe
cdqe
mov rcx, qword [rsp + 0x40]
movzx edx, word [rcx + rax*2]
cmp r10w, dx
setbe al
mov ecx, edx
and ecx, 0xfdff
cmp ecx, 0xfc00
setne cl
and cl, al
mov eax, ecx
xor al, 1
movzx eax, al
lea rsi, [rdi + rax*4]
test cl, cl
mov r9, qword [rsp + 0xb0]
mov r8, r15
mov r11, r14
je 0x14007c7e2
jmp 0x14007c7ed
mov r14, r11
mov rdi, r9
xor eax, eax
cmp ebp, 0x10000
setae al
lea rax, [rsi + rax*2]
add rax, 2
mov dword [rsp + 0x34], 0
mov r12, rsi
jmp 0x14007c9a6