Function at 0x14003f4c0
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, 0xa8
mov rax, qword [0x1400df000]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0x110]
mov rbx, rcx
mov dword [rsp + 0x78], eax
mov rax, qword [rcx + 0xc0]
mov qword [rsp + 0x80], r9
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x68], rdx
cmp rax, qword [rcx + 0xc8]
jae 0x14003f525
movzx edx, byte [rax]
inc rax
mov qword [rcx + 0xc0], rax
jmp 0x14003f548
cmp dword [rcx + 0x30], 0
je 0x14003f546
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f548
xor dl, dl
mov ecx, 0x30
mov r8, rbx
lea rdi, [rcx + rbx]
movzx ecx, dl
mov dword [rsp + 0x50], ecx
cmp rax, qword [rbx + 0xc8]
jae 0x14003f577
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsp + 0x30], cl
jmp 0x14003f5a3
cmp dword [rdi], 0
je 0x14003f59e
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsp + 0x30], cl
jmp 0x14003f5a3
mov byte [rsp + 0x30], 0
cmp rax, qword [rbx + 0xc8]
jae 0x14003f5bb
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f5e0
cmp dword [rdi], 0
je 0x14003f5de
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f5e0
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x3c], eax
mov esi, eax
call fcn.140033f90
mov rcx, rbx
movsxd r14, eax
call fcn.140033f90
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x58], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x14003f61f
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x14003f644
cmp dword [rdi], 0
je 0x14003f642
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f644
xor dl, dl
mov rcx, rbx
movzx r15d, dl
call fcn.140033f90
mov rcx, rbx
call fcn.140033f90
mov rcx, rbx
call fcn.140033f90
mov rcx, rbx
mov dword [rsp + 0x38], eax
call fcn.140033f90
mov dword [rsp + 0x4c], eax
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14003f68f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f6b4
cmp dword [rdi], 0
je 0x14003f6b2
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f6b4
xor cl, cl
movzx edx, cl
mov dword [rsp + 0x5c], edx
cmp rax, qword [rbx + 0xc8]
jae 0x14003f6d3
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f6fc
cmp dword [rdi], 0
je 0x14003f6fa
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
mov edx, dword [rsp + 0x5c]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003f6fc
xor cl, cl
mov r8d, dword [rsp + 0x4c]
xor ebp, ebp
movzx eax, cl
mov r13d, ebp
mov qword [rsp + 0x70], rbp
mov edi, ebp
mov dword [rsp + 0x88], ebp
mov r12d, 1
mov dword [rsp + 0x48], ebp
cmp r8d, 0x1000000
jg 0x14003fef9
mov r9d, dword [rsp + 0x38]
cmp r9d, 0x1000000
jg 0x14003fef9
cmp esi, 8
jb 0x14003f748
sub esi, 8
shr eax, 5
mov ecx, r12d
and eax, r12d
mov dword [rsp + 0x34], ebp
sub ecx, eax
mov dword [rsp + 0x60], ecx
cmp byte [rsp + 0x30], dil
je 0x14003f783
mov ecx, r15d
sub ecx, 8
je 0x14003f7c6
sub ecx, 7
je 0x14003f7b9
sub ecx, r12d
je 0x14003f7b9
sub ecx, 8
je 0x14003f7a6
cmp ecx, 8
je 0x14003f7a6
mov r15d, ebp
jmp 0x14003f7c9
mov ecx, edx
sub ecx, 8
je 0x14003f7c6
sub ecx, 7
je 0x14003f7b9
sub ecx, r12d
je 0x14003f7ac
sub ecx, 8
je 0x14003f7a3
cmp ecx, 8
je 0x14003f7a3
mov r15d, ebp
jmp 0x14003f7c9
mov r15d, edx
shr r15d, 3
jmp 0x14003f7c9
cmp esi, 3
jne 0x14003f7b9
mov r15d, 2
jmp 0x14003f7c9
mov r15d, 3
mov dword [rsp + 0x34], r12d
jmp 0x14003f7c9
mov r15d, r12d
test r15d, r15d
jne 0x14003f7e6
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x14003ff0c
mov rax, qword [rsp + 0x68]
mov dword [rax], r9d
mov rax, qword [rsp + 0x40]
mov dword [rax], r8d
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x14003f806
mov dword [rax], r15d
test r9d, r9d
js 0x14003fef9
test r8d, r8d
js 0x14003fef9
je 0x14003f82c
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14003fef9
mov ecx, r8d
imul ecx, r9d
test ecx, ecx
js 0x14003fef9
xor edx, edx
mov eax, 0x7fffffff
div r15d
cmp ecx, eax
jg 0x14003fef9
test r8d, r8d
je 0x14003f864
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x14003fee4
mov eax, r8d
imul eax, r15d
imul eax, r9d
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x40], rax
mov rsi, rax
test rax, rax
je 0x14003fee4
movsxd rdx, dword [rsp + 0x50]
test edx, edx
je 0x14003f8c8
cmp qword [rbx + 0x10], rdi
je 0x14003f8c1
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x14003f8c1
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x14003f8c8
add qword [rbx + 0xc0], rdx
cmp byte [rsp + 0x30], dil
jne 0x14003f98f
mov edx, dword [rsp + 0x3c]
mov r14, rsi
mov qword [rsp + 0x50], rsi
cmp edx, 8
jae 0x14003fb09
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0x50], rsi
test eax, eax
jne 0x14003fb09
mov r13d, dword [rsp + 0x4c]
mov r12, rsi
test r13d, r13d
jle 0x14003fe69
mov ecx, dword [rsp + 0x38]
mov edi, r13d
mov ebp, ecx
imul ebp, r15d
cmp dword [rsp + 0x60], eax
je 0x14003f95f
mov eax, ebp
neg eax
movsxd r14, eax
lea eax, [r13 - 1]
imul eax, r15d
imul eax, ecx
movsxd rsi, eax
add rsi, r12
nop word [rax + rax]
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.140033e00
add rsi, r14
sub rdi, 1
jne 0x14003f940
mov rsi, r12
jmp 0x14003fe65
movsxd r14, ebp
mov r12, rsi
nop word [rax + rax]
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.140033e00
add rsi, r14
sub rdi, 1
jne 0x14003f970
mov rsi, r12
jmp 0x14003fe65
mov r8d, dword [rsp + 0x58]
test r8d, r8d
jne 0x14003f9ba
mov rcx, rsi
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 0x14003ff0c
test r14d, r14d
je 0x14003fa11
jns 0x14003f9d1
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x14003fa11
cmp qword [rbx + 0x10], rdi
je 0x14003fa0a
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r14d
jge 0x14003fa0a
mov rax, qword [rbx + 0xc8]
sub r14d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r14d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
mov r8d, dword [rsp + 0x58]
jmp 0x14003fa11
add qword [rbx + 0xc0], r14
test r8d, r8d
js 0x14003fed8
xor edx, edx
mov eax, 0x7fffffff
div r15d
cmp r8d, eax
jg 0x14003fed8
mov edi, r15d
mov qword [rsp + 0x50], rsi
imul edi, r8d
mov r14, rsi
movsxd rcx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x70], rax
test rax, rax
je 0x14003fedb
cmp dword [rsp + 0x34], ebp
je 0x14003fb6f
mov rdi, rax
mov eax, dword [rsp + 0x58]
test eax, eax
jle 0x14003fb63
mov esi, eax
mov r14d, r15d
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], rax
mov rcx, rbx
call fcn.140033f90
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, r14
sub rsi, r12
jne 0x14003fa80
mov r14, qword [rsp + 0x50]
mov edx, dword [rsp + 0x3c]
mov edi, ebp
mov eax, dword [rsp + 0x4c]
mov ecx, dword [rsp + 0x38]
imul eax, ecx
mov esi, r15d
test eax, eax
je 0x14003fdd7
lea r8, [rsp + 0x88]
mov ecx, r15d
sub r14, r8
mov qword [rsp + 0x68], rax
cmp edx, 8
jb 0x14003fbe5
test r13d, r13d
jne 0x14003fbd8
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14003fb9d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003fbc2
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x40], rsi
jmp 0x14003fb03
mov r8d, edi
mov qword [rsp + 0x40], rsi
mov rdx, rax
mov rcx, rbx
call fcn.140033e00
test eax, eax
jne 0x14003fb03
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x70]
jmp 0x14003f99c
cmp dword [rbx + 0x30], ebp
je 0x14003fbc0
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003fbc2
xor cl, cl
movzx edi, cl
mov r13d, edi
and r13d, 0x7f
inc r13d
shr edi, 7
mov dword [rsp + 0x48], edi
jmp 0x14003fbe5
test edi, edi
je 0x14003fbe5
test r12d, r12d
je 0x14003fd7e
cmp byte [rsp + 0x30], bpl
je 0x14003fc81
cmp dword [rsp + 0x5c], 8
jne 0x14003fc46
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14003fc19
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x14003fc4e
cmp dword [rbx + 0x30], ebp
je 0x14003fc3f
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x14003fc4e
xor cl, cl
movzx eax, cl
jmp 0x14003fc4e
mov rcx, rbx
call fcn.140033f90
test r15d, r15d
je 0x14003fd73
cmp eax, dword [rsp + 0x58]
mov ecx, ebp
mov r8, rsi
cmovl ecx, eax
imul ecx, r15d
movsxd rdx, ecx
lea rcx, [rsp + 0x88]
add rdx, qword [rsp + 0x70]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x14003fd73
cmp dword [rsp + 0x34], ebp
je 0x14003fd10
mov rcx, rbx
call fcn.140033f90
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 + 0x88], 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 + 0x89], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0x8a], dl
jmp 0x14003fd73
mov rdi, rbp
test r15d, r15d
je 0x14003fd73
nop dword [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14003fd3f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003fd64
cmp dword [rbx + 0x30], ebp
je 0x14003fd62
mov rcx, rbx
call fcn.140033d80
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14003fd64
xor cl, cl
mov byte [rsp + rdi + 0x88], cl
inc rdi
cmp rdi, rsi
jl 0x14003fd20
mov rax, qword [rsp + 0x68]
mov r12d, ebp
mov ecx, r15d
mov rdi, rbp
test r15d, r15d
je 0x14003fdb1
lea rcx, [rsp + 0x88]
mov r8, rsi
add rcx, r14
lea rdx, [rsp + 0x88]
call sub.VCRUNTIME140.dll_memcpy
inc rdi
cmp rdi, rsi
jl 0x14003fda1
mov rax, qword [rsp + 0x68]
mov ecx, r15d
mov edi, dword [rsp + 0x48]
dec r13d
mov edx, dword [rsp + 0x3c]
add r14, rcx
sub rax, 1
mov qword [rsp + 0x68], rax
jne 0x14003fb32
mov r14, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x38]
mov r13d, dword [rsp + 0x4c]
cmp dword [rsp + 0x60], ebp
je 0x14003fe48
test r13d, r13d
jle 0x14003fe48
lea r10d, [r13 - 1]
mov r11d, r15d
imul r10d, r15d
mov ebx, ebp
imul r11d, ecx
imul r10d, ecx
nop dword [rax]
mov r8d, r11d
test r11d, r11d
jle 0x14003fe3a
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r14]
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 0x14003fe20
add ebx, r11d
sub r10d, r11d
add ebp, 2
cmp ebp, r13d
jl 0x14003fe00
mov rax, qword [rsp + 0x70]
test rax, rax
je 0x14003fe5b
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rsp + 0x40]
mov r12, qword [rsp + 0x50]
mov eax, dword [rsp + 0x34]
cmp r15d, 3
jb 0x14003fea9
mov ecx, dword [rsp + 0x38]
test eax, eax
jne 0x14003fead
mov eax, r13d
mov r10, r12
imul eax, ecx
test eax, eax
je 0x14003fead
mov ebx, r15d
mov r11d, eax
nop word [rax + rax]
movzx ecx, byte [r10]
movzx eax, byte [r10 + 2]
mov byte [r10], al
mov byte [r10 + 2], cl
add r10, rbx
sub r11, 1
jne 0x14003fe90
mov ecx, dword [rsp + 0x38]
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x14003fed3
cmp eax, r15d
je 0x14003fed3
mov r9d, ecx
mov dword [rsp + 0x20], r13d
mov rcx, r12
mov r8d, eax
mov edx, r15d
call fcn.140034050
mov rsi, rax
mov rax, rsi
jmp 0x14003ff17
mov r14, rsi
mov rcx, r14
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 0x14003ff0c
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 + 0x90]
xor rcx, rsp
call fcn.14009eae0
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret