Function at 0x14006bb10
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x90
mov rax, qword [rcx + 0xc0]
mov rbx, rcx
cmp rax, qword [rcx + 0xc8]
jae 0x14006bb53
movzx r10d, byte [rax]
inc rax
mov qword [rcx + 0xc0], rax
jmp 0x14006bb78
cmp dword [rcx + 0x30], 0
je 0x14006bb75
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx r10d, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bb78
xor r10b, r10b
mov ecx, 0x30
mov rdx, rbx
mov qword [rsp + 0x88], r14
lea rsi, [rcx + rbx]
movzx ecx, r10b
mov dword [rsp + 0xd0], ecx
mov qword [rsp + 0x70], rsi
cmp rax, qword [rbx + 0xc8]
jae 0x14006bbb5
movzx r14d, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bbdc
cmp dword [rsi], 0
je 0x14006bbd9
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx r14d, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bbdc
xor r14b, r14b
mov byte [rsp + 0xf0], r14b
cmp rax, qword [rbx + 0xc8]
jae 0x14006bbfc
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bc21
cmp dword [rsi], 0
je 0x14006bc1f
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bc21
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x38], eax
call fcn.140060940
mov rcx, rbx
movsxd r15, eax
call fcn.140060940
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x48], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x14006bc5e
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x14006bc83
cmp dword [rsi], 0
je 0x14006bc81
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bc83
xor dl, dl
mov rcx, rbx
movzx edi, dl
call fcn.140060940
mov rcx, rbx
call fcn.140060940
mov rcx, rbx
call fcn.140060940
mov rcx, rbx
mov dword [rsp + 0x30], eax
call fcn.140060940
mov dword [rsp + 0x3c], eax
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14006bccd
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bcf2
cmp dword [rsi], 0
je 0x14006bcf0
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bcf2
xor cl, cl
movzx r10d, cl
mov dword [rsp + 0x50], r10d
cmp rax, qword [rbx + 0xc8]
jae 0x14006bd13
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bd3d
cmp dword [rsi], 0
je 0x14006bd3b
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
mov r10d, dword [rsp + 0x50]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006bd3d
xor cl, cl
mov r8d, dword [rsp + 0x3c]
xor ebp, ebp
movzx eax, cl
mov r12d, ebp
mov qword [rsp + 0x60], rbp
mov dword [rsp + 0xf8], ebp
mov dword [rsp + 0x4c], ebp
lea r13d, [rbp + 1]
cmp r8d, 0x1000000
jg 0x14006c53e
mov r9d, dword [rsp + 0x30]
cmp r9d, 0x1000000
jg 0x14006c53e
mov ecx, dword [rsp + 0x38]
cmp ecx, 8
lea edx, [rcx - 8]
cmovb edx, ecx
shr eax, 5
and eax, r13d
mov ecx, r13d
sub ecx, eax
test r14b, r14b
mov dword [rsp + 0x54], ecx
mov r14d, ebp
je 0x14006bdc3
mov ecx, edi
sub ecx, 8
je 0x14006bdbe
sub ecx, 7
je 0x14006be11
sub ecx, r13d
je 0x14006be11
sub ecx, 8
je 0x14006bde2
cmp ecx, 8
jne 0x14006bdeb
jmp 0x14006bde2
mov edi, r13d
jmp 0x14006bde5
mov ecx, r10d
sub ecx, 8
je 0x14006be1d
sub ecx, 7
je 0x14006be11
sub ecx, r13d
je 0x14006be03
sub ecx, 8
je 0x14006bddf
cmp ecx, 8
jne 0x14006bdeb
mov edi, r10d
shr edi, 3
mov esi, edi
test edi, edi
jne 0x14006be23
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x14006c551
cmp edx, 3
jne 0x14006be11
mov edi, 2
mov esi, edi
jmp 0x14006be23
mov edi, 3
mov r14d, r13d
mov esi, edi
jmp 0x14006be23
mov edi, r13d
mov esi, r13d
mov rax, qword [rsp + 0xd8]
mov dword [rax], r9d
mov rax, qword [rsp + 0xe0]
mov dword [rax], r8d
mov rax, qword [rsp + 0xe8]
test rax, rax
je 0x14006be48
mov dword [rax], edi
test r9d, r9d
js 0x14006c53e
test r8d, r8d
js 0x14006c53e
je 0x14006be6e
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14006c53e
mov ecx, r8d
imul ecx, r9d
test ecx, ecx
js 0x14006c53e
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x14006c53e
test r8d, r8d
je 0x14006bea5
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14006c529
mov eax, r8d
imul eax, edi
imul eax, r9d
movsxd rcx, eax
call fcn.1400adb00
mov qword [rsp + 0x40], rax
mov r8, rax
test rax, rax
je 0x14006c529
movsxd rdx, dword [rsp + 0xd0]
test edx, edx
je 0x14006bf0f
cmp qword [rbx + 0x10], rbp
je 0x14006bf08
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x14006bf08
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
mov r8, qword [rsp + 0x40]
jmp 0x14006bf0f
add qword [rbx + 0xc0], rdx
cmp byte [rsp + 0xf0], bpl
jne 0x14006bfdd
mov edx, dword [rsp + 0x38]
mov r15d, edi
mov dword [rsp + 0xd0], r14d
cmp edx, 8
jae 0x14006c13e
mov dword [rsp + 0xd0], r14d
test r14d, r14d
jne 0x14006c13e
mov r13d, dword [rsp + 0x3c]
mov dword [rsp + 0xd0], r14d
test r13d, r13d
jle 0x14006bfca
imul r15d, dword [rsp + 0x30]
cmp dword [rsp + 0x54], ebp
mov ebp, r13d
mov dword [rsp + 0xd0], r14d
je 0x14006bfa9
mov eax, r15d
neg eax
movsxd r12, eax
lea eax, [r13 - 1]
imul eax, edi
imul eax, dword [rsp + 0x30]
movsxd rsi, eax
add rsi, r8
nop dword [rax]
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400607b0
add rsi, r12
sub rbp, 1
jne 0x14006bf90
jmp 0x14006bfc7
movsxd r12, r15d
mov rsi, r8
nop
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400607b0
add rsi, r12
sub rbp, 1
jne 0x14006bfb0
mov r15d, edi
mov edx, dword [rsp + 0x30]
mov r14d, r13d
imul r14d, edx
mov esi, r15d
jmp 0x14006c4be
cmp dword [rsp + 0x48], ebp
jne 0x14006c003
mov rcx, r8
call fcn.1400a352c
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x14006c551
test r15d, r15d
je 0x14006c055
jns 0x14006c01a
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x14006c055
cmp qword [rbx + 0x10], rbp
je 0x14006c04e
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x14006c04e
mov rax, qword [rbx + 0xc8]
sub r15d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r15d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x14006c055
add qword [rbx + 0xc0], r15
mov r15d, dword [rsp + 0x48]
test r15d, r15d
js 0x14006c51f
xor edx, edx
imul esi, r15d
mov eax, 0x7fffffff
div edi
cmp r15d, eax
jg 0x14006c51f
movsxd rcx, esi
call fcn.1400adb00
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14006c51f
mov dword [rsp + 0xd0], r14d
test r14d, r14d
je 0x14006c1b6
mov rsi, rax
test r15d, r15d
jle 0x14006c1b1
mov eax, edi
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x34], edi
mov rcx, rbx
call fcn.140060940
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsi], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsi + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsi + 2], dl
add rsi, rdi
sub r15, r13
jne 0x14006c0b7
mov r15d, dword [rsp + 0x34]
mov edx, dword [rsp + 0x38]
mov r14d, dword [rsp + 0x3c]
mov eax, dword [rsp + 0x30]
imul r14d, eax
mov esi, r15d
mov dword [rsp + 0x34], r14d
test r14d, r14d
je 0x14006c42f
mov rax, qword [rsp + 0x40]
lea rcx, [rsp + 0xf8]
sub rax, rcx
mov ecx, r14d
mov r14, qword [rsp + 0x70]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x68], rax
nop
cmp edx, 8
jb 0x14006c22d
test r12d, r12d
jne 0x14006c21e
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14006c1e3
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006c208
mov r15d, edi
jmp 0x14006c13a
mov r8d, esi
mov rdx, rax
mov rcx, rbx
mov r15d, edi
call fcn.1400607b0
test eax, eax
jne 0x14006c13a
mov rcx, qword [rsp + 0x40]
call fcn.1400a352c
mov rcx, qword [rsp + 0x60]
jmp 0x14006bfe6
cmp dword [r14], ebp
je 0x14006c206
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006c208
xor cl, cl
movzx eax, cl
mov r12d, eax
and r12d, 0x7f
inc r12d
shr eax, 7
mov dword [rsp + 0x4c], eax
jmp 0x14006c22d
cmp dword [rsp + 0x4c], ebp
je 0x14006c22d
test r13d, r13d
je 0x14006c3d0
cmp byte [rsp + 0xf0], bpl
je 0x14006c2cc
cmp dword [rsp + 0x50], 8
jne 0x14006c291
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14006c264
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x14006c299
cmp dword [r14], ebp
je 0x14006c28a
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x14006c299
xor cl, cl
movzx eax, cl
jmp 0x14006c299
mov rcx, rbx
call fcn.140060940
test r15d, r15d
je 0x14006c3c3
cmp eax, dword [rsp + 0x48]
mov ecx, ebp
mov r8, rsi
cmovl ecx, eax
imul ecx, r15d
movsxd rdx, ecx
lea rcx, [rsp + 0xf8]
add rdx, qword [rsp + 0x60]
call fcn.14009dd50
jmp 0x14006c3c3
cmp dword [rsp + 0xd0], ebp
je 0x14006c35e
mov rcx, rbx
call fcn.140060940
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsp + 0xf8], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsp + 0xf9], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0xfa], dl
jmp 0x14006c3c3
mov rdi, rbp
test r15d, r15d
je 0x14006c3c3
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14006c38f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006c3b4
cmp dword [r14], ebp
je 0x14006c3b2
mov rcx, rbx
call fcn.140060730
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14006c3b4
xor cl, cl
mov byte [rsp + rdi + 0xf8], cl
inc rdi
cmp rdi, rsi
jl 0x14006c370
mov rax, qword [rsp + 0x68]
mov r13d, ebp
mov rcx, qword [rsp + 0x58]
mov rdi, rbp
test r15d, r15d
je 0x14006c405
lea rcx, [rsp + 0xf8]
mov r8, rsi
add rcx, rax
lea rdx, [rsp + 0xf8]
call fcn.14009dd50
inc rdi
cmp rdi, rsi
jl 0x14006c3f3
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
movsxd rdx, r15d
dec r12d
add rax, rdx
mov edx, dword [rsp + 0x38]
sub rcx, 1
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x58], rcx
jne 0x14006c180
mov r14d, dword [rsp + 0x34]
mov eax, dword [rsp + 0x30]
mov r13d, dword [rsp + 0x3c]
cmp dword [rsp + 0x54], ebp
je 0x14006c4a8
test r13d, r13d
jle 0x14006c4a8
mov rdi, qword [rsp + 0x40]
lea r10d, [r13 - 1]
imul r10d, r15d
mov r11d, r15d
imul r11d, eax
mov ebx, ebp
imul r10d, eax
nop dword [rax]
mov r8d, r11d
test r11d, r11d
jle 0x14006c49a
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + rdi]
nop word [rax + rax]
movzx eax, byte [r9 + rdx]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [r9 + rdx], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x14006c480
add ebx, r11d
sub r10d, r11d
add ebp, 2
cmp ebp, r13d
jl 0x14006c460
mov rax, qword [rsp + 0x60]
test rax, rax
je 0x14006c4ba
mov rcx, rax
call fcn.1400a352c
mov edx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x40]
cmp r15d, 3
jb 0x14006c4fe
cmp dword [rsp + 0xd0], 0
jne 0x14006c4fe
mov r8, rax
test r14d, r14d
je 0x14006c4fe
mov r10d, r14d
nop
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, rsi
sub r10, 1
jne 0x14006c4e0
mov rax, qword [rsp + 0x40]
cmp r15d, 4
je 0x14006c55c
mov r9d, edx
mov dword [rsp + 0x20], r13d
mov edx, r15d
mov r8d, 4
mov rcx, rax
call fcn.140060a00
jmp 0x14006c55c
mov rcx, qword [rsp + 0x40]
call fcn.1400a352c
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x14006c551
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
mov edx, 0x28
mov qword [rdx + rcx], rax
xor eax, eax
mov r14, qword [rsp + 0x88]
add rsp, 0x90
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret