Function at 0x180001390
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
sub rsp, 0x150
mov rax, qword [0x180018018]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rbx, rcx
mov ecx, 0xfffffff5
mov esi, r8d
mov rbp, rdx
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rdx, [rsp + 0x28]
mov rcx, rax
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
xor edi, edi
test eax, eax
jne 0x180001406
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.GetConsoleScreenBufferInfo___d__n
mov edx, eax
call fcn.1800029fc
movzx ecx, di
mov word [rsp + 0x34], cx
jmp 0x18000140b
mov cx, word [rsp + 0x34]
cmp cx, 1
jl 0x180001452
or eax, 0xffffffff
lea r8, [rsp + 0x20]
xor edx, edx
mov rcx, r12
mov word [rsp + 0x20], di
mov word [rsp + 0x24], di
mov word [rsp + 0x22], ax
mov word [rsp + 0x26], ax
call qword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
test eax, eax
jne 0x18000145e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetConsoleWindowInfo___d__n
mov edx, eax
call fcn.1800029fc
jmp 0x18000145e
lea rcx, str._nCannot_scroll__the_window_is_too_close_to_the_top._n
call fcn.1800029fc
mov eax, edi
mov rcx, rbx
nop word [rax + rax]
mov byte [rcx], al
inc eax
inc rcx
cmp eax, 0x100
jl 0x180001470
mov r8d, edi
lea r9, [rsp + 0x40]
nop word [rax + rax]
mov eax, r8d
inc r8d
inc r9
cdq
idiv esi
cmp r8d, 0x100
movsxd rax, edx
movzx ecx, byte [rax + rbp]
mov byte [r9 - 1], cl
jl 0x180001490
mov edx, 8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x1800014da
mov ecx, 0x10
call fcn.180002944
test rax, rax
je 0x1800014f5
mov rcx, rax
call fcn.1800028b0
jmp 0x1800014f5
mov edx, 0x10
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_IsBadStringPtrA]
test eax, eax
je 0x1800014f5
mov dword [0x180019ba0], 1
lea r10, [rsp + 0x40]
lea r11, [rsp + 0x41]
lea rsi, [rsp + 0x42]
lea rbp, [rsp + 0x43]
sub r10, rbx
sub r11, rbx
sub rsi, rbx
mov r12, rbx
mov r13d, 0x40
sub rbp, rbx
nop
movzx r9d, byte [r12]
movzx eax, byte [r10 + r12]
add r12, 4
add eax, edi
add eax, r9d
cdq
movzx edx, dl
add eax, edx
movzx eax, al
sub eax, edx
movsxd r8, eax
movzx eax, byte [r11 + r12 - 4]
movzx ecx, byte [r8 + rbx]
add eax, r8d
mov byte [r12 - 4], cl
mov byte [r8 + rbx], r9b
movzx r9d, byte [r12 - 3]
add eax, r9d
cdq
movzx edx, dl
add eax, edx
movzx eax, al
sub eax, edx
movsxd r8, eax
movzx eax, byte [rsi + r12 - 4]
movzx ecx, byte [r8 + rbx]
add eax, r8d
mov byte [r12 - 3], cl
mov byte [r8 + rbx], r9b
movzx r9d, byte [r12 - 2]
add eax, r9d
cdq
movzx edx, dl
add eax, edx
movzx eax, al
sub eax, edx
movsxd r8, eax
movzx eax, byte [r12 + rbp - 4]
movzx ecx, byte [r8 + rbx]
add eax, r8d
mov byte [r12 - 2], cl
mov byte [r8 + rbx], r9b
movzx r9d, byte [r12 - 1]
add eax, r9d
cdq
movzx edx, dl
add eax, edx
movzx eax, al
sub eax, edx
sub r13, 1
movsxd rdi, eax
movzx ecx, byte [rdi + rbx]
mov byte [r12 - 1], cl
mov byte [rdi + rbx], r9b
jne 0x180001520
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.180002890
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret