Function at 0x1401e36d0
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 [0x14041d0c0]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rbx, rcx
mov qword [rsp + 0x48], r8
lea rcx, [0x1404b98c8]
mov qword [rsp + 0x70], rdx
mov r13, r9
call fcn.1402b13b0
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1401e3731
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3757
cmp dword [rbx + 0x30], 0
je 0x1401e3755
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3757
xor dl, dl
mov ecx, Ordinal_50
mov r8, rbx
lea rdi, [rcx + rbx]
movzx ecx, dl
mov dword [rsp + 0x68], ecx
cmp rax, qword [rbx + 0xc8]
jae 0x1401e3786
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsp + 0x30], cl
jmp 0x1401e37b2
cmp dword [rdi], 0
je 0x1401e37ad
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsp + 0x30], cl
jmp 0x1401e37b2
mov byte [rsp + 0x30], 0
cmp rax, qword [rbx + 0xc8]
jae 0x1401e37ca
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e37ef
cmp dword [rdi], 0
je 0x1401e37ed
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e37ef
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x40], eax
mov esi, eax
call fcn.1401d8ab0
mov rcx, rbx
mov dword [rsp + 0x50], eax
call fcn.1401d8ab0
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x58], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x1401e382f
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x1401e3854
cmp dword [rdi], 0
je 0x1401e3852
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3854
xor dl, dl
mov rcx, rbx
movzx r14d, dl
call fcn.1401d8ab0
mov rcx, rbx
call fcn.1401d8ab0
mov rcx, rbx
call fcn.1401d8ab0
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call fcn.1401d8ab0
mov dword [rsp + 0x38], eax
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1401e389f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e38c4
cmp dword [rdi], 0
je 0x1401e38c2
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e38c4
xor cl, cl
movzx edx, cl
mov dword [rsp + 0x5c], edx
cmp rax, qword [rbx + 0xc8]
jae 0x1401e38e3
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e390c
cmp dword [rdi], 0
je 0x1401e390a
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
mov edx, dword [rsp + 0x5c]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e390c
xor cl, cl
mov edi, dword [rsp + 0x38]
xor ebp, ebp
movzx eax, cl
mov r15d, ebp
mov qword [rsp + 0x78], rbp
mov r12d, 1
mov dword [rsp + 0x84], ebp
cmp edi, 0x1000000
jg 0x1401e4075
mov r8d, dword [rsp + 0x3c]
cmp r8d, 0x1000000
jg 0x1401e4075
cmp esi, 8
jb 0x1401e3950
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], bpl
je 0x1401e398b
mov ecx, r14d
sub ecx, 8
je 0x1401e39ce
sub ecx, 7
je 0x1401e39c1
sub ecx, r12d
je 0x1401e39c1
sub ecx, 8
je 0x1401e39ae
cmp ecx, 8
je 0x1401e39ae
mov r14d, ebp
jmp 0x1401e39d1
mov ecx, edx
sub ecx, 8
je 0x1401e39ce
sub ecx, 7
je 0x1401e39c1
sub ecx, r12d
je 0x1401e39b4
sub ecx, 8
je 0x1401e39ab
cmp ecx, 8
je 0x1401e39ab
mov r14d, ebp
jmp 0x1401e39d1
mov r14d, edx
shr r14d, 3
jmp 0x1401e39d1
cmp esi, 3
jne 0x1401e39c1
mov r14d, 2
jmp 0x1401e39d1
mov r14d, 3
mov dword [rsp + 0x34], r12d
jmp 0x1401e39d1
mov r14d, r12d
test r14d, r14d
jne 0x1401e39ee
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x1401e4088
mov rax, qword [rsp + 0x70]
mov dword [rax], r8d
mov rax, qword [rsp + 0x48]
mov dword [rax], edi
test r13, r13
je 0x1401e3a06
mov dword [r13], r14d
test r8d, r8d
js 0x1401e4075
test edi, edi
js 0x1401e4075
je 0x1401e3a2a
mov eax, 0x7fffffff
cdq
idiv edi
cmp r8d, eax
jg 0x1401e4075
mov ecx, edi
imul ecx, r8d
test ecx, ecx
js 0x1401e4075
xor edx, edx
mov eax, 0x7fffffff
div r14d
cmp ecx, eax
jg 0x1401e4075
test edi, edi
je 0x1401e3a5f
mov eax, 0x7fffffff
cdq
idiv edi
cmp r8d, eax
jg 0x1401e4060
mov eax, edi
imul eax, r14d
imul eax, r8d
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x48], rax
mov rsi, rax
test rax, rax
je 0x1401e4060
mov edx, dword [rsp + 0x68]
mov rcx, rbx
call fcn.1401d8880
cmp byte [rsp + 0x30], bpl
jne 0x1401e3b4f
mov edx, dword [rsp + 0x40]
mov r13, rsi
mov qword [rsp + 0x50], rsi
cmp edx, 8
jae 0x1401e3c7d
mov eax, dword [rsp + 0x34]
mov qword [rsp + 0x50], rsi
test eax, eax
jne 0x1401e3c7d
mov r12, rsi
test edi, edi
jle 0x1401e3fe8
mov ecx, dword [rsp + 0x3c]
mov ebp, ecx
imul ebp, r14d
cmp dword [rsp + 0x60], r15d
je 0x1401e3b23
mov r13d, dword [rsp + 0x38]
mov eax, ebp
neg eax
movsxd r15, eax
lea eax, [r13 - 1]
imul eax, r14d
imul eax, ecx
movsxd rsi, eax
add rsi, r12
nop dword [rax]
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.1401d8910
add rsi, r15
sub rdi, 1
jne 0x1401e3b00
mov eax, dword [rsp + 0x34]
mov rsi, r12
jmp 0x1401e3fed
movsxd r15, ebp
mov r12, rsi
nop dword [rax]
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.1401d8910
add rsi, r15
sub rdi, 1
jne 0x1401e3b30
mov rsi, r12
jmp 0x1401e3fe4
cmp dword [rsp + 0x58], ebp
jne 0x1401e3b76
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 0x1401e4088
mov edx, dword [rsp + 0x50]
mov rcx, rbx
call fcn.1401d8880
mov ecx, dword [rsp + 0x58]
test ecx, ecx
js 0x1401e4054
xor edx, edx
mov eax, 0x7fffffff
div r14d
cmp ecx, eax
jg 0x1401e4054
mov edi, r14d
mov qword [rsp + 0x50], rsi
imul edi, ecx
mov r13, rsi
movsxd rcx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x78], rax
test rax, rax
je 0x1401e4057
cmp dword [rsp + 0x34], ebp
je 0x1401e3ced
mov rdi, rax
mov eax, dword [rsp + 0x58]
test eax, eax
jle 0x1401e3ce1
mov esi, eax
mov r13d, r14d
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov rcx, rbx
call fcn.1401d8ab0
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, r13
sub rsi, r12
jne 0x1401e3bf2
mov r13, qword [rsp + 0x50]
mov edi, dword [rsp + 0x38]
mov edx, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x3c]
mov eax, edi
imul eax, ecx
mov esi, r14d
test eax, eax
je 0x1401e3f63
mov rcx, r13
mov qword [rsp + 0x70], rax
lea r8, [rsp + 0x84]
mov r13d, ebp
sub rcx, r8
mov qword [rsp + 0x68], rcx
nop dword [rax]
cmp edx, 8
jb 0x1401e3d62
test r15d, r15d
jne 0x1401e3d54
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1401e3d1b
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3d40
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
jmp 0x1401e3c75
mov r8d, edi
mov qword [rsp + 0x48], rsi
mov rdx, rax
mov rcx, rbx
call fcn.1401d8910
test eax, eax
jne 0x1401e3c75
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x78]
jmp 0x1401e3b58
cmp dword [rbx + 0x30], ebp
je 0x1401e3d3e
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3d40
xor cl, cl
movzx r13d, cl
mov r15d, r13d
and r15d, 0x7f
inc r15d
shr r13d, 7
jmp 0x1401e3d62
test r13d, r13d
je 0x1401e3d62
test r12d, r12d
je 0x1401e3f00
cmp byte [rsp + 0x30], bpl
je 0x1401e3dfe
cmp dword [rsp + 0x5c], 8
jne 0x1401e3dc3
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1401e3d96
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x1401e3dcb
cmp dword [rbx + 0x30], ebp
je 0x1401e3dbc
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x1401e3dcb
xor cl, cl
movzx eax, cl
jmp 0x1401e3dcb
mov rcx, rbx
call fcn.1401d8ab0
test r14d, r14d
je 0x1401e3ef3
cmp eax, dword [rsp + 0x58]
mov ecx, ebp
mov r8, rsi
cmovl ecx, eax
imul ecx, r14d
movsxd rdx, ecx
lea rcx, [rsp + 0x84]
add rdx, qword [rsp + 0x78]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1401e3ef3
cmp dword [rsp + 0x34], ebp
je 0x1401e3e8d
mov rcx, rbx
call fcn.1401d8ab0
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 + 0x84], 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 + 0x85], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0x86], dl
jmp 0x1401e3ef3
mov rdi, rbp
test r14d, r14d
je 0x1401e3ef3
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1401e3ebf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3ee4
cmp dword [rbx + 0x30], ebp
je 0x1401e3ee2
mov rcx, rbx
call fcn.1401d87f0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1401e3ee4
xor cl, cl
mov byte [rsp + rdi + 0x84], cl
inc rdi
cmp rdi, rsi
jl 0x1401e3ea0
mov rcx, qword [rsp + 0x68]
mov r12d, ebp
mov rax, qword [rsp + 0x70]
mov rdi, rbp
test r14d, r14d
je 0x1401e3f35
lea rax, [rsp + 0x84]
mov r8, rsi
add rcx, rax
lea rdx, [rsp + 0x84]
call sub.VCRUNTIME140.dll_memcpy
inc rdi
cmp rdi, rsi
jl 0x1401e3f23
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x70]
mov edx, r14d
dec r15d
add rcx, rdx
mov edx, dword [rsp + 0x40]
sub rax, 1
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x70], rax
jne 0x1401e3cb0
mov r13, qword [rsp + 0x50]
mov edi, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x3c]
cmp dword [rsp + 0x60], ebp
je 0x1401e3fc7
test edi, edi
jle 0x1401e3fc7
lea r10d, [rdi - 1]
mov r11d, r14d
imul r10d, r14d
mov ebx, ebp
imul r11d, ecx
imul r10d, ecx
mov r8d, r11d
test r11d, r11d
jle 0x1401e3fba
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r13]
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 0x1401e3fa0
add ebx, r11d
sub r10d, r11d
add ebp, 2
cmp ebp, edi
jl 0x1401e3f82
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x1401e3fda
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
mov eax, dword [rsp + 0x34]
mov r13d, dword [rsp + 0x38]
cmp r14d, 3
jb 0x1401e4029
mov ecx, dword [rsp + 0x3c]
test eax, eax
jne 0x1401e402d
mov eax, r13d
mov r8, r12
imul eax, ecx
test eax, eax
je 0x1401e402d
mov edx, r14d
mov r10d, eax
nop
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, rdx
sub r10, 1
jne 0x1401e4010
mov ecx, dword [rsp + 0x3c]
cmp r14d, 4
je 0x1401e404f
mov r9d, ecx
mov dword [rsp + 0x20], r13d
mov rcx, r12
mov r8d, 4
mov edx, r14d
call fcn.1401d8b70
mov rsi, rax
mov rax, rsi
jmp 0x1401e4093
mov r13, rsi
mov rcx, r13
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 0x1401e4088
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
mov edx, Ordinal_50
mov qword [rdx + rcx], rax
xor eax, eax
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1402aff00
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret