Function at 0x14000fde0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x140088008]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rax, qword [rcx + 0xc0]
mov r15, r9
mov rbx, rcx
cmp rax, qword [rcx + 0xc8]
jae 0x14000fe2e
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000fe51
cmp dword [rcx + 0x30], 0
je 0x14000fe4f
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000fe51
xor cl, cl
mov rax, qword [rbx + 0xc0]
movzx r13d, cl
cmp rax, qword [rbx + 0xc8]
jae 0x14000fe74
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000fe9a
cmp dword [rbx + 0x30], 0
je 0x14000fe98
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000fe9a
xor cl, cl
movzx eax, cl
mov dword [rsp + 0x30], eax
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000fec0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000fee6
cmp dword [rbx + 0x30], 0
je 0x14000fee4
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000fee6
xor cl, cl
movzx ebp, cl
xor esi, esi
mov rcx, rbx
mov dword [rsp + 0x24], esi
call fcn.1400053f0
mov rcx, rbx
mov dword [rsp + 0x58], eax
call fcn.1400053f0
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x34], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x14000ff26
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x14000ff4b
cmp dword [rbx + 0x30], esi
je 0x14000ff49
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ff4b
xor dl, dl
mov rcx, rbx
movzx r14d, dl
call fcn.1400053f0
mov rcx, rbx
call fcn.1400053f0
mov rcx, rbx
call fcn.1400053f0
mov rcx, rbx
mov dword [rsp + 0x28], eax
call fcn.1400053f0
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x38], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x14000ff96
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x14000ffbb
cmp dword [rbx + 0x30], esi
je 0x14000ffb9
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ffbb
xor dl, dl
mov rax, qword [rbx + 0xc0]
movzx edx, dl
mov dword [rsp + 0x48], edx
cmp rax, qword [rbx + 0xc8]
jae 0x14000ffe1
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14001000a
cmp dword [rbx + 0x30], esi
je 0x140010008
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
mov edx, dword [rsp + 0x48]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14001000a
xor cl, cl
mov r10d, dword [rsp + 0x38]
mov r12d, esi
movzx eax, cl
xor ecx, ecx
mov qword [rsp + 0x60], rsi
mov byte [rsp + 0x78], sil
mov word [rsp + 0x79], cx
mov byte [rsp + 0x7b], cl
lea edi, [rcx + 1]
cmp r10d, 0x1000000
jg 0x1400106a7
mov r11d, dword [rsp + 0x28]
cmp r11d, 0x1000000
jg 0x1400106a7
cmp ebp, 8
jb 0x140010058
sub ebp, 8
mov dword [rsp + 0x24], edi
shr eax, 5
mov ecx, edi
and eax, edi
mov dword [rsp + 0x20], esi
sub ecx, eax
mov dword [rsp + 0x4c], ecx
cmp dword [rsp + 0x30], esi
je 0x14001008c
mov ecx, r14d
sub ecx, 8
je 0x1400100e1
sub ecx, 7
je 0x1400100d5
sub ecx, edi
je 0x1400100d5
sub ecx, 8
je 0x1400100a9
cmp ecx, 8
jne 0x1400100b2
jmp 0x1400100a9
mov ecx, edx
sub ecx, 8
je 0x1400100e1
sub ecx, 7
je 0x1400100d5
sub ecx, edi
je 0x1400100ca
sub ecx, 8
je 0x1400100a6
cmp ecx, 8
jne 0x1400100b2
mov r14d, edx
shr r14d, 3
test r14d, r14d
jne 0x1400100e4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x1400106ba
cmp ebp, 3
jne 0x1400100d5
lea r14d, [rbp - 1]
jmp 0x1400100e4
mov r14d, 3
mov dword [rsp + 0x20], edi
jmp 0x1400100e4
mov r14d, edi
mov dword [0x14008c2e0], r11d
mov dword [0x14008c2cc], r10d
test r15, r15
je 0x1400100fa
mov dword [r15], r14d
test r11d, r11d
js 0x1400106a7
test r10d, r10d
js 0x1400106a7
je 0x140010127
mov eax, 0x7fffffff
mov ecx, esi
cdq
idiv r10d
cmp r11d, eax
setle cl
test ecx, ecx
je 0x1400106a7
mov r8d, r10d
imul r8d, r11d
mov dword [rsp + 0x50], r8d
test r8d, r8d
js 0x1400106a7
xor edx, edx
mov eax, 0x7fffffff
div r14d
mov ecx, esi
cmp r8d, eax
mov ebp, eax
setle cl
test ecx, ecx
je 0x1400106a7
xor r9d, r9d
mov r8d, r14d
mov edx, r10d
mov ecx, r11d
call fcn.1400049d0
mov qword [rsp + 0x40], rax
mov r15, rax
test rax, rax
je 0x140010692
mov edx, r13d
mov rcx, rbx
call fcn.1400051e0
cmp dword [rsp + 0x30], esi
jne 0x140010205
mov ecx, dword [rsp + 0x24]
test ecx, ecx
jne 0x140010321
mov eax, dword [rsp + 0x20]
test eax, eax
jne 0x140010321
mov r12d, dword [rsp + 0x38]
test r12d, r12d
jle 0x140010653
mov ecx, dword [rsp + 0x28]
lea edi, [r12 - 1]
movsxd r15, dword [rsp + 0x4c]
mov ebp, r14d
mov r13, qword [rsp + 0x40]
imul ebp, ecx
nop word [rax + rax]
mov eax, esi
test r15, r15
mov r8d, ebp
cmovne eax, edi
imul eax, r14d
imul eax, ecx
mov rcx, rbx
movsxd rdx, eax
add rdx, r13
call fcn.140005240
mov ecx, dword [rsp + 0x28]
inc esi
dec edi
cmp esi, r12d
jl 0x1400101d0
mov r15, r13
jmp 0x14001064f
mov r13d, dword [rsp + 0x34]
test r13d, r13d
jne 0x14001022f
mov rcx, r15
call fcn.140036340
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x1400106ba
mov edx, dword [rsp + 0x58]
mov rcx, rbx
call fcn.1400051e0
test r13d, r13d
js 0x14001068a
cmp r13d, ebp
mov eax, esi
setle al
test eax, eax
je 0x14001068a
mov ebp, r14d
imul ebp, r13d
movsxd rcx, ebp
call fcn.140036d58
mov qword [rsp + 0x60], rax
mov r13, rax
test rax, rax
je 0x14001068a
cmp dword [rsp + 0x20], esi
je 0x140010380
mov r15, rax
mov eax, dword [rsp + 0x34]
test eax, eax
jle 0x140010318
mov r13d, r14d
mov ebp, eax
mov rcx, rbx
call fcn.1400053f0
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 [r15], 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 [r15 + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [r15 + 2], dl
add r15, r13
sub rbp, 1
jne 0x140010292
mov r15, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x24]
mov eax, dword [rsp + 0x50]
mov ebp, r14d
test eax, eax
jle 0x1400105c4
movsxd r11, r14d
mov r8, r15
mov r10, r11
mov qword [rsp + 0x58], r15
neg r10
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], r10
neg r15
mov r9d, eax
mov r13d, esi
test ecx, ecx
je 0x1400103e9
test r12d, r12d
jne 0x1400103dc
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1400103a2
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400103c7
mov r8d, ebp
mov rdx, r13
mov rcx, rbx
call fcn.140005240
test eax, eax
jne 0x14001031d
mov rcx, r15
call fcn.140036340
mov rcx, r13
jmp 0x140010212
cmp dword [rbx + 0x30], esi
je 0x1400103c5
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400103c7
xor cl, cl
movzx eax, cl
mov r12d, eax
and r12d, 0x7f
inc r12d
shr eax, 7
mov r13d, eax
jmp 0x1400103e9
test r13d, r13d
je 0x1400103e9
test edi, edi
je 0x140010574
cmp dword [rsp + 0x30], esi
je 0x14001047f
cmp dword [rsp + 0x48], 8
jne 0x140010449
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14001041c
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x140010451
cmp dword [rbx + 0x30], esi
je 0x140010442
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x140010451
xor cl, cl
movzx eax, cl
jmp 0x140010451
mov rcx, rbx
call fcn.1400053f0
cmp eax, dword [rsp + 0x34]
cmovge eax, esi
test r14d, r14d
je 0x140010560
imul eax, r14d
lea rcx, [rsp + 0x78]
mov r8, rbp
movsxd rdx, eax
add rdx, qword [rsp + 0x60]
call fcn.14002cd50
jmp 0x140010560
cmp dword [rsp + 0x20], esi
je 0x140010501
mov rcx, rbx
call fcn.1400053f0
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 + 0x78], 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 + 0x79], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0x7a], dl
jmp 0x140010560
mov rdi, rsi
test r14d, r14d
je 0x140010560
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14001052f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140010554
cmp dword [rbx + 0x30], esi
je 0x140010552
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140010554
xor cl, cl
mov byte [rsp + rdi + 0x78], cl
inc rdi
cmp rdi, rbp
jl 0x140010510
mov r8, qword [rsp + 0x58]
mov edi, esi
mov r9, qword [rsp + 0x68]
mov r10, qword [rsp + 0x70]
movsxd r11, r14d
test r14d, r14d
je 0x1400105a3
lea rdx, [rsp + 0x78]
mov rcx, r8
add rdx, r15
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
lea rax, [r15 + rcx]
cmp rax, rbp
jl 0x140010590
mov ecx, dword [rsp + 0x24]
add r8, r11
dec r12d
mov qword [rsp + 0x58], r8
add r15, r10
sub r9, 1
mov qword [rsp + 0x68], r9
jne 0x140010354
cmp dword [rsp + 0x4c], esi
je 0x140010638
mov r12d, dword [rsp + 0x38]
test r12d, r12d
jle 0x140010638
mov r13, qword [rsp + 0x40]
lea r10d, [r12 - 1]
mov ebx, r14d
imul r10d, r14d
imul ebx, dword [rsp + 0x28]
mov r11d, esi
mov edi, ebx
neg edi
imul r10d, dword [rsp + 0x28]
mov r8d, ebx
test ebx, ebx
jle 0x14001062a
movsxd rax, r11d
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r13]
nop dword [rax + rax]
movzx eax, byte [rdx + r9]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [rdx + r9], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x140010610
add r11d, ebx
add r10d, edi
add esi, 2
cmp esi, r12d
jl 0x1400105f7
mov rax, qword [rsp + 0x60]
test rax, rax
je 0x14001064a
mov rcx, rax
call fcn.140036340
mov r15, qword [rsp + 0x40]
mov eax, dword [rsp + 0x20]
cmp r14d, 3
jb 0x140010685
test eax, eax
jne 0x140010685
mov eax, dword [rsp + 0x50]
mov rdx, r15
test eax, eax
jle 0x140010685
mov r9d, r14d
mov r8d, eax
nop
movzx ecx, byte [rdx]
movzx eax, byte [rdx + 2]
mov byte [rdx], al
mov byte [rdx + 2], cl
add rdx, r9
sub r8, 1
jne 0x140010670
mov rax, r15
jmp 0x1400106c5
mov rcx, r15
call fcn.140036340
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x1400106ba
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
mov edx, 0x20
mov qword [rdx + rcx], rax
xor eax, eax
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140029de0
mov rbx, qword [rsp + 0xd8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret