Function at 0x140007960
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push r12
push r15
sub rsp, 0x28
mov r15d, dword [rsp + 0x70]
mov ebx, r9d
mov r12d, edx
mov rbp, rcx
cmp edx, 4
jne 0x14000798c
mov rax, rcx
add rsp, 0x28
pop r15
pop r12
pop rbp
pop rbx
ret
mov qword [rsp + 0x50], rsi
test ebx, ebx
js 0x140007dab
jne 0x1400079a8
lea ecx, [r9*4]
mov r8d, ecx
jmp 0x1400079cd
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp eax, 4
jl 0x140007dab
lea ecx, [r9*4]
mov r8d, ecx
test ecx, ecx
js 0x140007dab
test r15d, r15d
js 0x140007dab
je 0x1400079eb
xor edx, edx
mov eax, 0x7fffffff
div r15d
cmp r8d, eax
jg 0x140007dab
imul ecx, r15d
movsxd rcx, ecx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x140007dab
mov qword [rsp + 0x58], rdi
xor edi, edi
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x20], r14
test r15d, r15d
jle 0x140007d4e
lea r11d, [rbx - 1]
lea r14d, [r12*8 - 6]
lea r13, [0x140000000]
nop dword [rax]
nop word [rax + rax]
mov r9d, edi
mov eax, edi
imul r9d, r12d
imul eax, ebx
imul r9d, ebx
shl eax, 2
add rax, rsi
add r9, rbp
cmp r14d, 0x19
ja case.0x140007a71.9
movsxd rcx, r14d
mov edx, dword [r13 + rcx*4 + 0x7de4]
add rdx, r13
jmp rdx
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea r9, [r9 + 1]
mov byte [rax + 1], 0xff
lea rax, [rax + 2]
jns 0x140007a80
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop dword [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 1]
mov byte [rax + 1], cl
mov byte [rax], cl
lea rax, [rax + 3]
jns 0x140007ab0
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop word [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 1]
mov byte [rax + 1], cl
mov byte [rax], cl
mov byte [rax + 3], 0xff
lea rax, [rax + 4]
jns 0x140007ae0
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea rax, [rax + 1]
lea r9, [r9 + 2]
jns 0x140007b10
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop dword [rax]
nop dword [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 2]
mov byte [rax + 1], cl
mov byte [rax], cl
lea rax, [rax + 3]
jns 0x140007b40
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop word [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 2]
mov byte [rax + 1], cl
mov byte [rax], cl
lea rax, [rax + 4]
movzx ecx, byte [r9 - 1]
mov byte [rax - 1], cl
jns 0x140007b70
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea rax, [rax + 4]
movzx ecx, byte [r9 + 1]
lea r9, [r9 + 3]
mov byte [rax - 3], cl
movzx ecx, byte [r9 - 1]
mov byte [rax - 2], cl
mov byte [rax - 1], 0xff
jns 0x140007ba2
jmp 0x140007d43
mov r10d, r11d
test r11d, r11d
js 0x140007d43
nop word [rax + rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 1]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 3]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 3]
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 1], r8b
jns 0x140007be0
jmp 0x140007d43
mov r10d, r11d
test r11d, r11d
js 0x140007d43
nop dword [rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 2]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 3]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 3]
mov byte [rax - 1], 0xff
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 2], r8b
jns 0x140007c30
jmp 0x140007d43
mov r10d, r11d
test r11d, r11d
js 0x140007d43
nop dword [rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 1]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 4]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 4]
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 1], r8b
jns 0x140007c80
jmp 0x140007d43
mov r10d, r11d
test r11d, r11d
js 0x140007d43
nop dword [rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 2]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 4]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 4]
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 2], r8b
movzx ecx, byte [r9 - 1]
mov byte [rax - 1], cl
jns 0x140007cd0
jmp 0x140007d43
mov edx, r11d
test r11d, r11d
js 0x140007d43
nop word [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea rax, [rax + 3]
movzx ecx, byte [r9 + 1]
lea r9, [r9 + 4]
mov byte [rax - 2], cl
movzx ecx, byte [r9 - 2]
mov byte [rax - 1], cl
jns 0x140007d20
inc edi
cmp edi, r15d
jl 0x140007a40
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, rsi
mov r13, qword [rsp + 0x60]
mov r14, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
add rsp, 0x28
pop r15
pop r12
pop rbp
pop rbx
ret
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, [0x1413a1ab0]
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x140007d5a
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov rsi, qword [rsp + 0x50]
mov edx, 0x28
mov rcx, qword [rax]
lea rax, [0x1413a1aa0]
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x28
pop r15
pop r12
pop rbp
pop rbx
ret