Function at 0x140005631
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rsi
sub rsp, 0x20
test rcx, rcx
je 0x1400031ab
mov rsi, rcx
add rsi, 0xfffffffffffffff0
movzx eax, dl
lea rcx, [0x140018308]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
mov rax, qword [0x140024120]
cmp qword [0x140024128], rax
jg 0x14000315f
lea rcx, [0x140024120]
call fcn.140002cd6
mov rax, qword [0x140024120]
mov rcx, qword [0x140024130]
mov qword [rcx + rax*8], rsi
inc qword [0x140024120]
jmp 0x1400031ab
lea rcx, [0x1400240d8]
mov rdx, rsi
add rsp, 0x20
pop rsi
jmp fcn.140003304
mov rax, qword [rsi]
add rax, 0xfffffffffffffff8
mov qword [rsi], rax
cmp rax, 7
ja 0x1400031ab
lea rcx, [0x1400240f0]
mov rdx, rsi
add rsp, 0x20
pop rsi
jmp fcn.140002d4e
nop
add rsp, 0x20
pop rsi
ret
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rdi, rdx
mov rsi, rcx
movzx ecx, byte [rdx + 0x10]
lea eax, [rcx - 0x10]
cmp eax, 0xc
ja 0x1400054f7
lea rcx, [0x140018318]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
mov rcx, rsi
xor edx, edx
add rsp, 0x28
sub byte [rbx + 0x5f], bl
sub byte [rbx + 0x5f], bl
pop rsi
pop r14
jmp fcn.140004721
cmp ecx, 4
jne case.0x1400054e2.3
mov rax, qword [rdi]
mov rcx, qword [rdi + 0x18]
cqo
idiv qword [rcx]
test rax, rax
jle 0x140005559
mov rbx, rax
xor r14d, r14d
mov rdx, qword [rdi + 0x18]
mov rcx, qword [rdx]
imul rcx, r14
add rcx, rsi
int1
int1
call 0x1400054b9
inc r14
cmp rbx, r14
jne 0x140005513
jmp 0x140005559
mov r8, qword [rdi]
mov rcx, rsi
xor edx, edx
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.1400176b0
mov rdx, qword [rdi + 0x20]
mov rcx, rsi
call 0x140005578
mov qword [rsi], 0
mov dword [rsi], 0
mov dword [rsi], 0
add byte [rax], al
add byte [rax - 0x7d], cl
invalid
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
mov rdx, qword [rdi + 0x20]
mov rcx, rsi
and byte [rax - 0x77], cl
int1
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp 0x140005578
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
in al, dx
sub byte [rax - 0x77], cl
xlatb
in al, dx
sub byte [rax - 0x77], cl
xlatb
mov rsi, rcx
movzx eax, byte [rdx]
lea rcx, [0x14001834c]
movsxd rax, dword [rcx + rax*4]
add al, 0x81
add al, 0x81
add rax, rcx
jmp rax
add rsi, qword [rdi + 8]
mov rdx, qword [rdi + 0x10]
mov rcx, rsi
mov ecx, esi
or byte [rax - 0x75], cl
push rdi
adc byte [rax - 0x77], cl
mov ecx, esi
mov ecx, esi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
pop rsi
pop rsi
jmp 0x1400054b9
mov rbx, qword [rdi + 0x20]
test rbx, rbx
jle case.0x140005598.0
xor r14d, r14d
mov rax, qword [rdi + 0x28]
mov rdx, qword [rax + r14*8]
mov rcx, rsi
call 0x140005578
inc r14
cmp rbx, r14
jne 0x1400055bf
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
mov rcx, rsi
mov rdx, rdi
call fcn.140002f28
mov rcx, qword [rdi + 0x20]
mov r8, qword [rdi + 0x28]
cmp rax, rcx
jae 0x140005602
mov rdx, qword [r8 + rax*8]
test rdx, rdx
jne 0x14000560b
mov rdx, qword [r8 + rcx*8]
test rdx, rdx
je 0x140005613
mov rcx, rsi
call 0x140005578
add rsi, qword [rdi + 8]
mov rax, qword [rdi + 0x10]
mov r8, qword [rax]
mov rcx, rsi
xor edx, edx
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.1400176b0
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov ebx, r9d
mov r15, r8
mov rsi, rdx
mov rdi, rcx
mov r14, r15
movzx eax, byte [r15]
cmp eax, 3
jne 0x1400056d6
mov rcx, rdi
mov rdx, r14
call fcn.140002f28
mov r13, qword [r14 + 0x20]
mov rbp, qword [r14 + 0x28]
cmp rax, r13
jae 0x14000567b
mov r12, qword [rbp + rax*8]
test r12, r12
jne 0x140005680
mov r12, qword [rbp + r13*8]
mov rcx, rsi
mov rdx, r14
call fcn.140002f28
cmp rax, r13
jae 0x14000569a
mov r15, qword [rbp + rax*8]
test r15, r15
jne 0x14000569f
mov r15, qword [rbp + r13*8]
test r12, r12
je 0x1400056b4
cmp r15, r12
je 0x1400056b4
mov rcx, rdi
mov rdx, r12
call 0x140005578
mov rdx, qword [r14 + 8]
mov rax, qword [r14 + 0x10]
lea rcx, [rdx + rdi]
add rdx, rsi
mov r8, qword [rax]
call fcn.140017010
test r15, r15
jne 0x14000564d
jmp 0x140005709
test eax, eax
je 0x140005709
cmp eax, 2
jne 0x14000571a
mov r15, qword [r14 + 0x20]
test r15, r15
jle 0x140005709
xor r12d, r12d
mov rax, qword [r14 + 0x28]
mov r8, qword [rax + r12*8]
mov rcx, rdi
mov rdx, rsi
mov r9d, ebx
call 0x140005631
inc r12
cmp r15, r12
jne 0x1400056eb
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r14 + 8]
mov r8, qword [r14 + 0x10]
add rdi, rax
add rsi, rax
mov rcx, rdi
mov ecx, edi
mov ecx, edi
mov rdx, rsi
mov r9d, ebx
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140005746
and byte [rcx + rcx*4 - 0x33], al
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
movzx ecx, byte [r8 + 0x10]
adc byte [rbp - 0x77c0fbf], cl
or al, 0x77
invalid
adc byte [rbp - 0x77c0fbf], cl
or al, 0x77
xor eax, 0xe80d8d48
lea rcx, [0x14001835c]
movsxd rax, dword [rcx + rax*4]
lea rcx, [0x14001835c]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
mov r14, qword [rsi + 0x18]
test r14, r14
je 0x140005857
mov r8, qword [r14 + 0x20]
mov rcx, rdi
mov rdx, rbx
mov r9d, ebp
mov ecx, ebp
mov ecx, ebp
call 0x140005631
mov r14, qword [r14 + 0x18]
jmp 0x140005781
cmp ecx, 4
jne case.0x14000577b.3
mov rax, qword [rsi]
mov rcx, qword [rsi + 0x18]
cqo
idiv qword [rcx]
idiv dword [rcx]
idiv dword [rcx]
test rax, rax
jle 0x14000587d
mov r14, rax
xor r15d, r15d
invalid
dec dword [rbx + rcx*4 + 0x46]
sbb byte [rcx - 0x75], cl
adc byte [rcx + 0xf], cl
scasd eax, dword [rdi]
xlatb
mov r8, qword [rsi + 0x18]
mov rdx, qword [r8]
imul rdx, r15
lea rcx, [rdx + rdi]
add rdx, rbx
mov r9d, ebp
call fcn.140005746
invalid
invalid
dec dword [rcx - 1]
invalid
cmp r14, r15
invalid
jne 0x1400057c2
invalid
invalid
jmp 0x14000587d
mov r8, qword [rsi]
mov rcx, rdi
mov rdx, rbx
add rsp, 0x20
pop rbx
pop rbp
and byte [rbx + 0x5d], bl
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp fcn.140017010
mov r8, qword [rsi + 0x20]
mov rcx, rdi
mov rdx, rbx
mov r9d, ebp
add rsp, 0x20
and byte [rbx + 0x5d], bl
and byte [rbx + 0x5d], bl
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp 0x140005631
mov rdx, qword [rbx]
mov rcx, rdi
jmp 0x140005920
mov rdx, qword [rbx]
test rdx, rdx
je 0x140005828
test bpl, bpl
jne 0x140005828
cmp qword [rdx + 8], 0
js 0x140005828
mov rcx, rdx
call fcn.140005390
sti
invalid
dec dword [rax - 0x77]
stc
mov rdx, rax
jmp 0x140005920
sti
invalid
mov r8, qword [rsi + 0x20]
mov rcx, rdi
mov rdx, rbx
mov r9d, ebp
call 0x140005631
mov rax, qword [rbx]
test rax, rax
je 0x14000587a
cmp rax, rsi
jne 0x14000597f
mov qword [rdi], rsi
invalid
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rbx, qword [rbx]
test rbx, rbx
je 0x14000591a
test bpl, bpl
jne 0x14000591a
cmp qword [rbx + 8], 0
js 0x14000591a
mov rax, qword [rsi + 0x18]
test byte [rax + 0x11], 1
mov rdx, qword [rbx]
mov rcx, rsi
jne 0x140005933
call fcn.140004462
mov rcx, rdi
mov rdx, rax
call fcn.140004721
mov r14, qword [rbx]
test r14, r14
jle 0x14000587d
mov rdi, qword [rdi]
mov r15d, 0x10
xor r12d, r12d
mov r8, qword [rsi + 0x18]
mov rax, qword [r8 + 8]
lea rcx, [rax + 0xf]
mov r9, rax
neg r9
and r9, rcx
test rax, rax
cmove r9, r15
mov rdx, qword [r8]
imul rdx, r12
add rdx, r9
lea rcx, [rdx + rdi]
add rdx, rbx
xor r9d, r9d
call fcn.140005746
inc r12
cmp r14, r12
jne 0x1400058d8
jmp 0x14000587d
mov rcx, rdi
mov rdx, rbx
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp fcn.140004721
call fcn.140005409
mov rcx, qword [rbx]
mov qword [rax], rcx
mov rcx, rdi
mov rdx, rax
call fcn.140004721
mov rax, qword [rsi + 0x18]
mov rcx, qword [rax + 8]
lea rdx, [rcx + 0xf]
mov r8, rcx
neg r8
and r8, rdx
test rcx, rcx
mov edx, 0x10
cmovne rdx, r8
mov rcx, qword [rdi]
add rcx, rdx
mov r8, qword [rbx]
imul r8, qword [rax]
add rdx, rbx
jmp 0x1400057f2
call fcn.140006146
int3
invalid
stosd dword [rdi], eax
or eax, 0x1a7f0000
lea rdx, [0x14002da20]
mov qword [rdx + rax*8], rcx
lodsd eax, dword [rsi]
jle 0x140005b74
add byte [rax - 0x77], cl
or al, 0xc2
mov dword [rdx + rax*8], ecx
inc rax
inc eax
mov qword [0x14002da10], rax
add rsp, 0x28
ret
invalid
push 0x48000181
mov ecx, eax
call fcn.140001b66
mov ecx, 1
add al, ch
retf
xor al, byte [rax]
add ah, cl
add al, ch
retf
push rsi
sub rsp, 0x20
sub esp, 0x20
sub esp, 0x20
lea eax, [rcx - 2]
cmp eax, 9
clc
invalid
clc
or dword [rdi + 0x19], esi
ja case.default.0x140005bc5
ja case.default.0x140005bc5
lea rcx, [0x140018390]
add dword [rax], eax
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
lea rsi, str.SIGINT:_Interrupted_by_Ctrl_C._n
jmp 0x140005c00
cmp ecx, 0x16
jne 0x140005bde
lea rsi, str.SIGABRT:_Abnormal_termination._n
jmp 0x140005c00
lea rsi, str.unknown_signal_n
jmp 0x140005c00
lea rsi, str.SIGILL:_Illegal_operation._n
jmp 0x140005c00
lea rsi, str.SIGFPE:_Arithmetic_error._n
jmp 0x140005c00
lea rsi, str.SIGSEGV:_Illegal_storage_access.__Attempt_to_read_from_nil___n
mov rcx, rsi
call fcn.140004b85
mov rcx, rsi
mov rdx, rax
call fcn.140004ceb
mov ecx, 1
call fcn.140008e74
int3
invalid
invalid
invalid
invalid