Function at 0x14000fe30
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov rax, qword [0x140131e70]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov eax, dword [rsp + 0x110]
mov rbx, rcx
mov dword [rsp + 0x80], eax
mov rax, qword [rcx + 0xc0]
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x58], rdx
cmp rax, qword [rcx + 0xc8]
jae 0x14000fe94
movzx edx, byte [rax]
inc rax
mov qword [rcx + 0xc0], rax
jmp 0x14000feb7
cmp dword [rcx + 0x30], 0
je 0x14000feb5
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000feb7
xor dl, dl
mov ecx, 0x30
mov r8, rbx
mov qword [rsp + 0xa8], rbp
lea rsi, [rcx + rbx]
movzx ecx, dl
mov dword [rsp + 0x38], ecx
mov qword [rsp + 0x88], rsi
cmp rax, qword [rbx + 0xc8]
jae 0x14000fef2
movzx ebp, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ff18
cmp dword [rsi], 0
je 0x14000ff15
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx ebp, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ff18
xor bpl, bpl
mov byte [rsp + 0x30], bpl
cmp rax, qword [rbx + 0xc8]
jae 0x14000ff35
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ff5a
cmp dword [rsi], 0
je 0x14000ff58
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ff5a
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x40], eax
call fcn.140004d40
mov rcx, rbx
movsxd r12, eax
call fcn.140004d40
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x50], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x14000ff97
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x14000ffbc
cmp dword [rsi], 0
je 0x14000ffba
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000ffbc
xor dl, dl
mov rcx, rbx
movzx edi, dl
call fcn.140004d40
mov rcx, rbx
call fcn.140004d40
mov rcx, rbx
call fcn.140004d40
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call fcn.140004d40
mov dword [rsp + 0x44], eax
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140010006
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14001002b
cmp dword [rsi], 0
je 0x140010029
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14001002b
xor cl, cl
movzx r10d, cl
mov dword [rsp + 0x64], r10d
cmp rax, qword [rbx + 0xc8]
jae 0x14001004c
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140010076
cmp dword [rsi], 0
je 0x140010074
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
mov r10d, dword [rsp + 0x64]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140010076
xor cl, cl
mov r8d, dword [rsp + 0x44]
xor r14d, r14d
movzx eax, cl
mov r13d, r14d
mov qword [rsp + 0x78], r14
mov dword [rsp + 0x90], r14d
mov dword [rsp + 0x60], r14d
lea r15d, [r14 + 1]
cmp r8d, 0x1000000
jg 0x140010886
mov r9d, dword [rsp + 0x3c]
cmp r9d, 0x1000000
jg 0x140010886
mov ecx, dword [rsp + 0x40]
cmp ecx, 8
lea edx, [rcx - 8]
cmovb edx, ecx
shr eax, 5
and eax, r15d
mov ecx, r15d
sub ecx, eax
test bpl, bpl
mov dword [rsp + 0x68], ecx
mov ebp, r14d
je 0x1400100ff
mov ecx, edi
sub ecx, 8
je 0x1400100fa
sub ecx, 7
je 0x14001014d
sub ecx, r15d
je 0x14001014d
sub ecx, 8
je 0x14001011e
cmp ecx, 8
jne 0x140010127
jmp 0x14001011e
mov edi, r15d
jmp 0x140010121
mov ecx, r10d
sub ecx, 8
je 0x140010159
sub ecx, 7
je 0x14001014d
sub ecx, r15d
je 0x14001013f
sub ecx, 8
je 0x14001011b
cmp ecx, 8
jne 0x140010127
mov edi, r10d
shr edi, 3
mov esi, edi
test edi, edi
jne 0x14001015f
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x140010899
cmp edx, 3
jne 0x14001014d
mov edi, 2
mov esi, edi
jmp 0x14001015f
mov edi, 3
mov ebp, r15d
mov esi, edi
jmp 0x14001015f
mov edi, r15d
mov esi, r15d
mov rax, qword [rsp + 0x58]
mov dword [rax], r9d
mov rax, qword [rsp + 0x70]
mov dword [rax], r8d
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x14001017b
mov dword [rax], edi
test r9d, r9d
js 0x140010886
test r8d, r8d
js 0x140010886
je 0x1400101a9
mov eax, 0x7fffffff
mov ecx, r14d
cdq
idiv r8d
cmp r9d, eax
setle cl
test ecx, ecx
je 0x140010886
mov ecx, r8d
imul ecx, r9d
test ecx, ecx
js 0x140010886
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x140010886
test r8d, r8d
je 0x1400101e8
mov eax, 0x7fffffff
mov ecx, r14d
cdq
idiv r8d
cmp r9d, eax
setle cl
test ecx, ecx
je 0x140010871
mov eax, r8d
imul eax, edi
imul eax, r9d
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x48], rax
mov r8, rax
test rax, rax
je 0x140010871
movsxd rdx, dword [rsp + 0x38]
test edx, edx
je 0x140010250
cmp qword [rbx + 0x10], r13
je 0x140010249
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x140010249
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 + 0x48]
jmp 0x140010250
add qword [rbx + 0xc0], rdx
cmp byte [rsp + 0x30], r13b
jne 0x14001031d
mov edx, dword [rsp + 0x40]
mov r12d, edi
mov dword [rsp + 0x34], ebp
cmp edx, 8
jae 0x140010487
mov dword [rsp + 0x34], ebp
test ebp, ebp
jne 0x140010487
mov r13d, dword [rsp + 0x44]
mov dword [rsp + 0x34], ebp
test r13d, r13d
jle 0x14001030b
mov r15d, edi
mov dword [rsp + 0x34], ebp
imul r15d, dword [rsp + 0x3c]
cmp dword [rsp + 0x68], r14d
mov r14d, r13d
je 0x1400102eb
mov eax, r15d
neg eax
movsxd r12, eax
lea eax, [r13 - 1]
imul eax, edi
imul eax, dword [rsp + 0x3c]
movsxd rsi, eax
add rsi, r8
nop
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.140004bb0
add rsi, r12
sub r14, 1
jne 0x1400102c0
mov edx, dword [rsp + 0x3c]
mov ebp, r13d
imul ebp, edx
mov r12d, edi
mov esi, edi
jmp 0x140010800
movsxd r12, r15d
mov rsi, r8
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.140004bb0
add rsi, r12
sub r14, 1
jne 0x1400102f1
mov r12d, edi
mov edx, dword [rsp + 0x3c]
mov ebp, r13d
imul ebp, edx
mov esi, r12d
jmp 0x140010800
cmp dword [rsp + 0x50], r13d
jne 0x140010345
mov rcx, r8
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 0x140010899
test r12d, r12d
je 0x140010397
jns 0x14001035c
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x140010397
cmp qword [rbx + 0x10], r13
je 0x140010390
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x140010390
mov rax, qword [rbx + 0xc8]
sub r12d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r12d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x140010397
add qword [rbx + 0xc0], r12
mov r12d, dword [rsp + 0x50]
test r12d, r12d
js 0x140010866
xor edx, edx
mov eax, 0x7fffffff
div edi
mov ecx, r14d
cmp r12d, eax
setle cl
imul esi, r12d
test ecx, ecx
je 0x140010866
movsxd rcx, esi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x78], rax
test rax, rax
je 0x140010866
mov dword [rsp + 0x34], ebp
test ebp, ebp
je 0x1400104fb
mov rsi, rax
test r12d, r12d
jle 0x1400104f6
mov eax, edi
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x38], edi
nop dword [rax]
mov rcx, rbx
call fcn.140004d40
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 r12, r15
jne 0x140010400
mov r12d, dword [rsp + 0x38]
mov edx, dword [rsp + 0x40]
mov ebp, dword [rsp + 0x44]
mov eax, dword [rsp + 0x3c]
imul ebp, eax
mov esi, r12d
mov dword [rsp + 0x38], ebp
test ebp, ebp
je 0x14001076f
mov rax, qword [rsp + 0x48]
lea rcx, [rsp + 0x90]
sub rax, rcx
mov ecx, ebp
mov rbp, qword [rsp + 0x88]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x70], rax
cmp edx, 8
jb 0x140010575
test r13d, r13d
jne 0x140010565
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x140010529
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14001054f
mov r12d, edi
jmp 0x140010483
mov r8d, esi
mov rdx, rax
mov rcx, rbx
mov r12d, edi
call fcn.140004bb0
test eax, eax
jne 0x140010483
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x78]
jmp 0x140010327
cmp dword [rbp], r14d
je 0x14001054d
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14001054f
xor cl, cl
movzx eax, cl
mov r13d, eax
and r13d, 0x7f
inc r13d
shr eax, 7
mov dword [rsp + 0x60], eax
jmp 0x140010575
cmp dword [rsp + 0x60], r14d
je 0x140010575
test r15d, r15d
je 0x140010711
cmp byte [rsp + 0x30], r14b
je 0x140010611
cmp dword [rsp + 0x64], 8
jne 0x1400105d7
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1400105a9
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x1400105df
cmp dword [rbp], r14d
je 0x1400105d0
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x1400105df
xor cl, cl
movzx eax, cl
jmp 0x1400105df
mov rcx, rbx
call fcn.140004d40
cmp eax, dword [rsp + 0x50]
cmovge eax, r14d
test r12d, r12d
je 0x140010704
imul eax, r12d
lea rcx, [rsp + 0x90]
mov r8, rsi
movsxd rdx, eax
add rdx, qword [rsp + 0x78]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140010704
cmp dword [rsp + 0x34], r14d
je 0x1400106a1
mov rcx, rbx
call fcn.140004d40
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 + 0x90], 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 + 0x91], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0x92], dl
jmp 0x140010704
mov rdi, r14
test r12d, r12d
je 0x140010704
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1400106cf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400106f5
cmp dword [rbp], r14d
je 0x1400106f3
mov rcx, rbx
call fcn.140004b30
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400106f5
xor cl, cl
mov byte [rsp + rdi + 0x90], cl
inc rdi
cmp rdi, rsi
jl 0x1400106b0
mov rax, qword [rsp + 0x70]
mov r15d, r14d
mov rcx, qword [rsp + 0x58]
mov rdi, r14
test r12d, r12d
je 0x140010746
lea rcx, [rsp + 0x90]
mov r8, rsi
add rcx, rax
lea rdx, [rsp + 0x90]
call sub.VCRUNTIME140.dll_memcpy
inc rdi
cmp rdi, rsi
jl 0x140010734
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
movsxd rdx, r12d
dec r13d
add rax, rdx
mov edx, dword [rsp + 0x40]
sub rcx, 1
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x58], rcx
jne 0x1400104c5
mov ebp, dword [rsp + 0x38]
mov eax, dword [rsp + 0x3c]
mov r13d, dword [rsp + 0x44]
cmp dword [rsp + 0x68], r14d
je 0x1400107e9
test r13d, r13d
jle 0x1400107e9
mov rdi, qword [rsp + 0x48]
lea r10d, [r13 - 1]
imul r10d, r12d
mov r11d, r12d
imul r11d, eax
mov ebx, r14d
imul r10d, eax
nop dword [rax + rax]
mov r8d, r11d
test r11d, r11d
jle 0x1400107da
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 0x1400107c0
add ebx, r11d
sub r10d, r11d
add r14d, 2
cmp r14d, r13d
jl 0x1400107a0
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x1400107fc
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [rsp + 0x3c]
mov rax, qword [rsp + 0x48]
cmp r12d, 3
jb 0x14001083e
cmp dword [rsp + 0x34], 0
jne 0x14001083e
mov r9, rax
test ebp, ebp
je 0x14001083e
mov r10d, ebp
nop dword [rax]
movzx ecx, byte [r9]
movzx eax, byte [r9 + 2]
mov byte [r9], al
mov byte [r9 + 2], cl
add r9, rsi
sub r10, 1
jne 0x140010820
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x80]
test ecx, ecx
je 0x1400108a4
cmp ecx, r12d
je 0x1400108a4
mov r9d, edx
mov dword [rsp + 0x20], r13d
mov r8d, ecx
mov edx, r12d
mov rcx, rax
call fcn.140004e00
jmp 0x1400108a4
mov rcx, qword [rsp + 0x48]
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 0x140010899
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 rbp, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1400d0b50
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret