Function at 0x140001410
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x900]
sub rsp, 0xa00
mov rax, qword [0x140008010]
xor rax, rsp
mov qword [rbp + 0x8f0], rax
mov rbx, rdx
cmp ecx, 3
je 0x140001491
lea rdx, str.Usage:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002d10
mov rcx, rax
mov rdx, qword [rbx]
call fcn.140002d10
mov rcx, rax
lea rdx, str.__key___input_file_
call fcn.140002d10
mov rcx, rax
lea rdx, [0x140002ee0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 1
jmp 0x1400019c7
mov rdx, qword [rdx + 8]
lea rcx, [rbp + 0xd0]
call fcn.140002790
nop
mov rdx, qword [rbx + 0x10]
lea rcx, [rbp + 0xb0]
call fcn.140002790
nop
xor edx, edx
mov r8d, 0x110
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp + 0xb0]
cmp qword [rbp + 0xc8], 0x10
cmovae rdx, qword [rbp + 0xb0]
lea rcx, [rsp + 0x60]
call fcn.140002b20
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
mov rcx, qword [rsp + 0x60]
movsxd rax, dword [rcx + 4]
test byte [rsp + rax + 0x70], 6
je 0x14000161e
lea rdx, str.Error_opening_input_file:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002d10
lea rdx, [rbp + 0xb0]
cmp qword [rbp + 0xc8], 0x10
cmovae rdx, qword [rbp + 0xb0]
mov r8, qword [rbp + 0xc0]
mov rcx, rax
call fcn.1400032a0
mov rcx, rax
lea rdx, [0x140002ee0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
lea rcx, [rsp + 0x60]
call fcn.140001a00
nop
mov rdx, qword [rbp + 0xc8]
cmp rdx, 0x10
jb 0x1400015b8
inc rdx
mov rcx, qword [rbp + 0xb0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400015b3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001966
call fcn.14000369c
xor esi, esi
mov qword [rbp + 0xc0], rsi
mov qword [rbp + 0xc8], 0xf
mov byte [rbp + 0xb0], sil
mov rdx, qword [rbp + 0xe8]
cmp rdx, 0x10
jb 0x140001614
inc rdx
mov rcx, qword [rbp + 0xd0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000160f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400019b6
call fcn.14000369c
mov eax, 1
jmp 0x1400019c7
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x70], xmm0
mov qword [rbp + 0x80], rax
xor esi, esi
mov qword [rbp + 0x90], rsi
mov word [rbp + 0x98], 1
movsxd rax, dword [rcx + 4]
mov rcx, qword [rbp + rax - 0x58]
mov qword [rsp + 0x40], rcx
test rcx, rcx
sete byte [rsp + 0x48]
mov byte [rsp + 0x49], sil
movdqu xmmword [rbp + 0x70], xmm0
mov qword [rbp + 0x80], rsi
lea rax, [rbp + 0x70]
mov qword [rsp + 0x50], rax
movaps xmm0, xmmword [rbp + 0x90]
movdqa xmmword [rbp + 0x90], xmm0
movaps xmm1, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm1
movzx r14d, byte [rsp + 0x49]
mov rbx, qword [rsp + 0x40]
movzx r12d, byte [rbp + 0x98]
mov rdi, qword [rbp + 0x90]
test rcx, rcx
jne 0x1400016b1
movzx r15d, byte [rsp + 0x48]
jmp 0x1400016d0
test rbx, rbx
je 0x1400016ca
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void____ptr64]
cmp eax, 0xffffffff
je 0x1400016ca
movzx r14d, al
jmp 0x1400016cd
mov rbx, rsi
mov r15b, 1
test r12b, r12b
jne 0x1400016ee
test rdi, rdi
je 0x1400016e8
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void____ptr64]
cmp eax, 0xffffffff
jne 0x1400016eb
mov rdi, rsi
mov r12b, 1
test rbx, rbx
jne 0x140001852
test rdi, rdi
jne 0x14000185b
lea rcx, [rsp + 0x70]
call fcn.140002a70
test rax, rax
jne 0x14000172d
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov r8d, esi
mov r10, rsi
lea r9, [rbp + 0x4f0]
mov rdi, qword [rbp + 0xe8]
mov r11, qword [rbp + 0xe0]
mov rbx, qword [rbp + 0xd0]
nop
mov dword [r9 - 0x400], r8d
lea rcx, [rbp + 0xd0]
cmp rdi, 0x10
cmovae rcx, rbx
xor edx, edx
mov rax, r10
div r11
movsx eax, byte [rdx + rcx]
mov dword [r9], eax
inc r8d
inc r10
lea r9, [r9 + 4]
cmp r8d, 0x100
jl 0x140001750
mov edx, esi
mov r8, rsi
nop dword [rax]
mov r9d, dword [rbp + r8*4 + 0xf0]
mov eax, dword [rbp + r8*4 + 0x4f0]
add eax, r9d
add edx, eax
and edx, 0x800000ff
jge 0x1400017b7
dec edx
or edx, 0xffffff00
inc edx
movsxd rax, edx
lea rcx, [rbp + 0xf0]
lea rcx, [rcx + rax*4]
mov eax, dword [rcx]
mov dword [rbp + r8*4 + 0xf0], eax
mov dword [rcx], r9d
inc r8
cmp r8, 0x100
jl 0x140001790
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x90], xmm0
mov qword [rbp + 0xa0], rax
lea r8, [rbp + 0x70]
lea rdx, [rbp + 0x90]
lea rcx, [rbp + 0xf0]
call fcn.140001290
mov rcx, qword [rbp + 0x90]
test rcx, rcx
je 0x1400018d4
mov rdx, qword [rbp + 0xa0]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400018ce
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400018ce
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
test rdi, rdi
jne 0x140001700
test r15b, r15b
jne 0x14000187c
test rbx, rbx
je 0x140001879
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void____ptr64]
cmp eax, 0xffffffff
je 0x140001879
movzx r14d, al
jmp 0x14000187c
mov rbx, rsi
mov byte [rsp + 0x30], r14b
mov rax, qword [rbp + 0x78]
cmp rax, qword [rbp + 0x80]
je 0x140001897
mov byte [rax], r14b
inc qword [rbp + 0x78]
jmp 0x1400018a9
lea r8, [rsp + 0x30]
mov rdx, qword [rbp + 0x78]
lea rcx, [rbp + 0x70]
call fcn.140003460
test rbx, rbx
je 0x1400016ca
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sbumpc_void____ptr64]
cmp eax, 0xffffffff
je 0x1400016ca
mov byte [rsp + 0x48], 0
jmp 0x1400016b1
call fcn.14000369c
nop
mov rcx, qword [rbp + 0x70]
test rcx, rcx
je 0x140001923
mov rdx, qword [rbp + 0x80]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000190f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000190f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000369c
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x70], xmm0
mov qword [rbp + 0x80], rsi
lea rcx, [rsp + 0x60]
call fcn.140001a00
nop
mov rdx, qword [rbp + 0xc8]
cmp rdx, 0x10
jb 0x140001972
inc rdx
mov rcx, qword [rbp + 0xb0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000196d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000196d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000369c
mov qword [rbp + 0xc0], rsi
mov qword [rbp + 0xc8], 0xf
mov byte [rbp + 0xb0], 0
cmp rdi, 0x10
jb 0x1400019c5
lea rdx, [rdi + 1]
mov rax, rbx
cmp rdx, 0x1000
jb 0x1400019bd
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400019bd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.14000369c
xor eax, eax
mov rcx, qword [rbp + 0x8f0]
xor rcx, rsp
call fcn.140003640
lea r11, [rsp + 0xa00]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret