Function at 0x14000d5c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x98
mov rax, qword [0x1400bc280]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rax, qword [rcx + 0xc0]
mov rbx, rcx
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x60], rdx
cmp rax, qword [rcx + 0xc8]
jae 0x14000d617
movzx edx, byte [rax]
inc rax
mov qword [rcx + 0xc0], rax
jmp 0x14000d63a
cmp dword [rcx + 0x30], 0
je 0x14000d638
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d63a
xor dl, dl
mov ecx, 0x30
mov r8, rbx
lea rdi, [rcx + rbx]
movzx ecx, dl
mov dword [rsp + 0x38], ecx
cmp rax, qword [rbx + 0xc8]
jae 0x14000d669
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsp + 0x20], cl
jmp 0x14000d695
cmp dword [rdi], 0
je 0x14000d690
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsp + 0x20], cl
jmp 0x14000d695
mov byte [rsp + 0x20], 0
cmp rax, qword [rbx + 0xc8]
jae 0x14000d6ad
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d6d2
cmp dword [rdi], 0
je 0x14000d6d0
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d6d2
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x2c], eax
mov esi, eax
call fcn.1400025f0
mov rcx, rbx
movsxd r15, eax
call fcn.1400025f0
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x40], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x14000d711
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x14000d736
cmp dword [rdi], 0
je 0x14000d734
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d736
xor dl, dl
mov rcx, rbx
movzx r12d, dl
call fcn.1400025f0
mov rcx, rbx
call fcn.1400025f0
mov rcx, rbx
call fcn.1400025f0
mov rcx, rbx
mov dword [rsp + 0x30], eax
call fcn.1400025f0
mov dword [rsp + 0x28], eax
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000d781
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d7a6
cmp dword [rdi], 0
je 0x14000d7a4
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d7a6
xor cl, cl
movzx edx, cl
mov dword [rsp + 0x54], edx
cmp rax, qword [rbx + 0xc8]
jae 0x14000d7c5
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d7ee
cmp dword [rdi], 0
je 0x14000d7ec
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
mov edx, dword [rsp + 0x54]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000d7ee
xor cl, cl
xor ebp, ebp
movzx eax, cl
cmp dword [rsp + 0x28], 0x1000000
mov r14d, ebp
mov qword [rsp + 0x48], rbp
mov r13d, 1
mov dword [rsp + 0x78], ebp
mov dword [rsp + 0x50], ebp
jg 0x14000df5b
mov r8d, dword [rsp + 0x30]
cmp r8d, 0x1000000
jg 0x14000df5b
cmp esi, 8
jb 0x14000d831
sub esi, 8
shr eax, 5
mov ecx, r13d
and eax, r13d
mov dword [rsp + 0x24], ebp
sub ecx, eax
mov dword [rsp + 0x58], ecx
cmp byte [rsp + 0x20], bpl
je 0x14000d86c
mov ecx, r12d
sub ecx, 8
je 0x14000d8af
sub ecx, 7
je 0x14000d8a2
sub ecx, r13d
je 0x14000d8a2
sub ecx, 8
je 0x14000d88f
cmp ecx, 8
je 0x14000d88f
mov r12d, ebp
jmp 0x14000d8b2
mov ecx, edx
sub ecx, 8
je 0x14000d8af
sub ecx, 7
je 0x14000d8a2
sub ecx, r13d
je 0x14000d895
sub ecx, 8
je 0x14000d88c
cmp ecx, 8
je 0x14000d88c
mov r12d, ebp
jmp 0x14000d8b2
mov r12d, edx
shr r12d, 3
jmp 0x14000d8b2
cmp esi, 3
jne 0x14000d8a2
mov r12d, 2
jmp 0x14000d8b2
mov r12d, 3
mov dword [rsp + 0x24], r13d
jmp 0x14000d8b2
mov r12d, r13d
test r12d, r12d
jne 0x14000d8cf
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x14000df6e
mov rax, qword [rsp + 0x60]
mov esi, dword [rsp + 0x28]
mov dword [rax], r8d
mov rax, qword [rsp + 0x70]
mov dword [rax], esi
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x14000d8ef
mov dword [rax], r12d
test r8d, r8d
js 0x14000df5b
test esi, esi
js 0x14000df5b
je 0x14000d913
mov eax, 0x7fffffff
cdq
idiv esi
cmp r8d, eax
jg 0x14000df5b
mov ecx, esi
imul ecx, r8d
test ecx, ecx
js 0x14000df5b
xor edx, edx
mov eax, 0x7fffffff
div r12d
cmp ecx, eax
jg 0x14000df5b
test esi, esi
je 0x14000d948
mov eax, 0x7fffffff
cdq
idiv esi
cmp r8d, eax
jg 0x14000df46
mov eax, esi
imul eax, r12d
imul eax, r8d
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x14000df46
movsxd rdx, dword [rsp + 0x38]
test edx, edx
je 0x14000d9a6
cmp qword [rbx + 0x10], rbp
je 0x14000d99f
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x14000d99f
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x14000d9a6
add qword [rbx + 0xc0], rdx
cmp byte [rsp + 0x20], bpl
jne 0x14000da60
mov edx, dword [rsp + 0x2c]
mov r15, rdi
mov qword [rsp + 0x38], rdi
cmp edx, 8
jae 0x14000dc5b
mov eax, dword [rsp + 0x24]
mov qword [rsp + 0x38], rdi
test eax, eax
jne 0x14000dc5b
mov r13, rdi
test esi, esi
jle 0x14000df00
mov edx, dword [rsp + 0x30]
mov r14d, edx
imul r14d, r12d
cmp dword [rsp + 0x58], ebp
je 0x14000da30
mov eax, r14d
neg eax
movsxd r15, eax
mov eax, dword [rsp + 0x28]
dec eax
imul eax, r12d
imul eax, edx
movsxd rbp, eax
add rbp, rdi
nop
mov r8d, r14d
mov rdx, rbp
mov rcx, rbx
call fcn.140002460
add rbp, r15
sub rsi, 1
jne 0x14000da10
mov esi, dword [rsp + 0x28]
jmp 0x14000defc
movsxd rbp, r14d
nop dword [rax]
nop word [rax + rax]
mov r8d, r14d
mov rdx, rdi
mov rcx, rbx
call fcn.140002460
add rdi, rbp
sub rsi, 1
jne 0x14000da40
mov esi, dword [rsp + 0x28]
jmp 0x14000defc
mov r8d, dword [rsp + 0x40]
test r8d, r8d
je 0x14000dc3a
test r15d, r15d
je 0x14000dac5
jns 0x14000da85
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x14000dac5
cmp qword [rbx + 0x10], rbp
je 0x14000dabe
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x14000dabe
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]
mov r8d, dword [rsp + 0x40]
jmp 0x14000dac5
add qword [rbx + 0xc0], r15
test r8d, r8d
js 0x14000df3a
xor edx, edx
mov eax, 0x7fffffff
div r12d
cmp r8d, eax
jg 0x14000df3a
mov r15, rdi
mov qword [rsp + 0x38], rdi
mov edi, r12d
imul edi, r8d
movsxd rcx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x14000df3d
cmp dword [rsp + 0x24], ebp
je 0x14000dc1c
mov rdi, rax
mov eax, dword [rsp + 0x40]
test eax, eax
jle 0x14000dc15
mov esi, eax
mov r15d, r12d
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x38], rax
nop
mov rcx, rbx
call fcn.1400025f0
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 [rdi], 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 [rdi + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rdi + 2], dl
add rdi, r15
sub rsi, r13
jne 0x14000db30
mov r15, qword [rsp + 0x38]
mov esi, dword [rsp + 0x28]
mov rdi, qword [rsp + 0x48]
mov edx, dword [rsp + 0x2c]
mov ecx, dword [rsp + 0x30]
mov eax, esi
imul eax, ecx
mov esi, r12d
test eax, eax
je 0x14000de7f
lea r8, [rsp + 0x78]
mov ecx, r12d
sub r15, r8
mov qword [rsp + 0x60], rax
cmp edx, 8
jb 0x14000dcad
test r14d, r14d
jne 0x14000dc9e
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000dc63
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dc88
mov qword [rsp + 0x38], r15
jmp 0x14000dbbc
mov r8d, edi
mov rdx, rax
mov rcx, rbx
mov rdi, rax
call fcn.140002460
test eax, eax
jne 0x14000dbbc
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x14000df6e
mov rdi, rbp
jmp 0x14000dbc0
cmp dword [rbx + 0x30], ebp
je 0x14000dc86
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dc88
xor cl, cl
movzx eax, cl
mov r14d, eax
and r14d, 0x7f
inc r14d
shr eax, 7
mov dword [rsp + 0x50], eax
jmp 0x14000dcad
cmp dword [rsp + 0x50], ebp
je 0x14000dcad
test r13d, r13d
je 0x14000de2b
cmp byte [rsp + 0x20], bpl
je 0x14000dd44
cmp dword [rsp + 0x54], 8
jne 0x14000dd0e
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000dce1
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x14000dd16
cmp dword [rbx + 0x30], ebp
je 0x14000dd07
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x14000dd16
xor cl, cl
movzx eax, cl
jmp 0x14000dd16
mov rcx, rbx
call fcn.1400025f0
test r12d, r12d
je 0x14000de20
cmp eax, dword [rsp + 0x40]
mov ecx, ebp
mov r8, rsi
cmovl ecx, eax
imul ecx, r12d
movsxd rdx, ecx
lea rcx, [rsp + 0x78]
add rdx, rdi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x14000de20
cmp dword [rsp + 0x24], ebp
je 0x14000ddc6
mov rcx, rbx
call fcn.1400025f0
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 0x14000de20
mov rdi, rbp
test r12d, r12d
je 0x14000de20
nop
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000ddef
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000de14
cmp dword [rbx + 0x30], ebp
je 0x14000de12
mov rcx, rbx
call fcn.1400023e0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000de14
xor cl, cl
mov byte [rsp + rdi + 0x78], cl
inc rdi
cmp rdi, rsi
jl 0x14000ddd0
mov rax, qword [rsp + 0x60]
mov r13d, ebp
mov ecx, r12d
mov rdi, rbp
test r12d, r12d
je 0x14000de58
lea rcx, [rsp + 0x78]
mov r8, rsi
add rcx, r15
lea rdx, [rsp + 0x78]
call sub.VCRUNTIME140.dll_memcpy
inc rdi
cmp rdi, rsi
jl 0x14000de48
mov rax, qword [rsp + 0x60]
mov ecx, r12d
mov rdi, qword [rsp + 0x48]
dec r14d
mov edx, dword [rsp + 0x2c]
add r15, rcx
sub rax, 1
mov qword [rsp + 0x60], rax
jne 0x14000dbe4
mov r15, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x30]
mov esi, dword [rsp + 0x28]
cmp dword [rsp + 0x58], ebp
je 0x14000dee7
test esi, esi
jle 0x14000dee7
lea r10d, [rsi - 1]
mov r11d, r12d
imul r10d, r12d
mov ebx, ebp
imul r11d, ecx
imul r10d, ecx
mov r8d, r11d
test r11d, r11d
jle 0x14000deda
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r15]
nop word [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 0x14000dec0
add ebx, r11d
sub r10d, r11d
add ebp, 2
cmp ebp, esi
jl 0x14000dea2
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14000def7
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r13, qword [rsp + 0x38]
mov eax, dword [rsp + 0x24]
cmp r12d, 3
jb 0x14000df35
test eax, eax
jne 0x14000df35
imul esi, dword [rsp + 0x30]
mov rdx, r13
test esi, esi
je 0x14000df35
mov r9d, r12d
mov r8d, esi
nop dword [rax]
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 0x14000df20
mov rax, r13
jmp 0x14000df79
mov r15, rdi
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x14000df6e
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 rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140076310
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret