Function at 0x1400c5300
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x50
mov rbx, rcx
mov r12d, r8d
mov ecx, dword [rcx + 0x14c]
mov esi, r8d
mov edi, ecx
sar r12d, 8
sar edi, 8
mov ebp, edx
mov eax, dword [rbx + 0x114]
cmp edi, eax
jl 0x1400c5340
cmp r12d, eax
jge 0x1400c5625
mov eax, dword [rbx + 0x110]
cmp edi, eax
jge 0x1400c5353
cmp r12d, eax
jl 0x1400c5625
mov eax, dword [rbx + 0x148]
mov r10d, ebp
mov qword [rsp + 0x48], r13
sub r10d, eax
mov qword [rsp + 0x40], r14
mov r9d, esi
mov qword [rsp + 0x38], r15
sub r9d, ecx
sar edx, 8
mov r15d, eax
sar r15d, 8
mov dword [rsp + 0x2c], edx
movzx r13d, al
movzx r14d, cl
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x24], r9d
cmp r15d, edx
jne 0x1400c53a2
cmp edi, r12d
je 0x1400c55f4
test r9d, r9d
jne 0x1400c53b7
mov r8d, r12d
mov rcx, rbx
call fcn.1400c5640
jmp 0x1400c5616
test r10d, r10d
jne 0x1400c5438
test r9d, r9d
jle 0x1400c5400
mov eax, 0x100
inc edi
sub eax, r14d
mov r8d, edi
add dword [rbx + 0x11c], eax
mov edx, r15d
mov eax, 0x100
mov rcx, rbx
sub eax, r14d
xor r14d, r14d
imul eax, r13d
add eax, eax
add dword [rbx + 0x118], eax
call fcn.1400c5640
cmp edi, r12d
jne 0x1400c53c1
jmp 0x1400c55f4
sub dword [rbx + 0x11c], r14d
mov eax, r13d
imul eax, r14d
dec edi
mov r8d, edi
mov edx, r15d
mov rcx, rbx
mov r14d, 0x100
neg eax
add eax, eax
add dword [rbx + 0x118], eax
call fcn.1400c5640
cmp edi, r12d
jne 0x1400c5400
jmp 0x1400c55f4
mov ebp, r10d
mov eax, r9d
imul ebp, r14d
imul eax, r13d
sub ebp, eax
cmp r15d, edx
je 0x1400c545a
mov eax, 0xffffff
cdq
idiv r10d
mov ecx, eax
jmp 0x1400c545c
xor ecx, ecx
mov dword [rsp + 0x80], ecx
cmp edi, r12d
je 0x1400c5476
mov eax, 0xffffff
cdq
idiv r9d
mov r11d, eax
jmp 0x1400c5479
xor r11d, r11d
mov r8d, r10d
mov dword [rsp + 0x98], r11d
shl r8d, 8
mov dword [rsp + 0x20], r8d
mov esi, r8d
test ebp, ebp
jg 0x1400c54db
mov eax, ebp
mov esi, r8d
sub eax, r8d
test eax, eax
jle 0x1400c54db
imul ecx, ebp
mov eax, r9d
neg eax
shl eax, 8
add ebp, eax
shr ecx, 0x18
mov eax, ecx
sub eax, r14d
add dword [rbx + 0x11c], eax
mov eax, ecx
sub eax, r14d
mov r14d, ecx
imul eax, r13d
mov r13d, 0x100
add dword [rbx + 0x118], eax
dec r15d
jmp 0x1400c55a6
mov eax, r9d
mov ecx, ebp
sub eax, r10d
sub ecx, esi
shl eax, 8
add eax, ebp
test ecx, ecx
jg 0x1400c5531
test eax, eax
jle 0x1400c552c
mov ebp, ecx
mov edx, r11d
imul edx, ecx
mov eax, 0x100
sub eax, r14d
add dword [rbx + 0x11c], eax
mov eax, 0x100
sub eax, r14d
xor r14d, r14d
neg edx
shr edx, 0x18
lea ecx, [rdx + r13]
mov r13d, edx
imul ecx, eax
add dword [rbx + 0x118], ecx
inc edi
jmp 0x1400c55a6
mov esi, r8d
jmp 0x1400c5535
test eax, eax
jg 0x1400c5579
mov ecx, r9d
shl ecx, 8
add ecx, ebp
js 0x1400c5579
mov edx, dword [rsp + 0x80]
mov ebp, ecx
imul edx, ecx
shr edx, 0x18
mov eax, edx
mov ecx, edx
sub eax, r14d
sub ecx, r14d
add dword [rbx + 0x11c], eax
mov r14d, edx
lea eax, [r13 + 0x100]
xor r13d, r13d
imul ecx, eax
add dword [rbx + 0x118], ecx
inc r15d
jmp 0x1400c55a6
sub dword [rbx + 0x11c], r14d
mov ecx, r11d
imul ecx, ebp
add ebp, esi
neg ecx
shr ecx, 0x18
lea eax, [rcx + r13]
mov r13d, ecx
imul eax, r14d
mov r14d, 0x100
sub dword [rbx + 0x118], eax
dec edi
mov r8d, edi
mov edx, r15d
mov rcx, rbx
call fcn.1400c5640
mov r8d, dword [rsp + 0x20]
mov r9d, dword [rsp + 0x24]
mov r10d, dword [rsp + 0x28]
mov r11d, dword [rsp + 0x98]
mov ecx, dword [rsp + 0x80]
cmp r15d, dword [rsp + 0x2c]
jne 0x1400c5490
cmp edi, r12d
jne 0x1400c5490
mov esi, dword [rsp + 0x90]
mov ebp, dword [rsp + 0x88]
movzx ecx, sil
mov eax, ecx
sub ecx, r14d
sub eax, r14d
add dword [rbx + 0x11c], eax
movzx eax, bpl
add eax, r13d
imul eax, ecx
add dword [rbx + 0x118], eax
mov r14, qword [rsp + 0x40]
mov r13, qword [rsp + 0x48]
mov r15, qword [rsp + 0x38]
mov dword [rbx + 0x148], ebp
mov dword [rbx + 0x14c], esi
add rsp, 0x50
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret