Function at 0x140346e20
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbx
push rsi
push rdi
push r15
sub rsp, 0x58
mov esi, r8d
mov rbx, rcx
mov ecx, dword [rcx + 0x14c]
mov r15d, esi
mov edi, ecx
sar r15d, 8
sar edi, 8
mov r8d, edx
mov eax, dword [rbx + 0x114]
cmp edi, eax
jl 0x140346e73
cmp r15d, eax
jl 0x140346e73
mov dword [rbx + 0x148], r8d
mov dword [rbx + 0x14c], esi
add rsp, 0x58
pop r15
pop rdi
pop rsi
pop rbx
ret
mov eax, dword [rbx + 0x110]
cmp edi, eax
jge 0x140346e82
cmp r15d, eax
jl 0x140346e5c
mov eax, dword [rbx + 0x148]
sub r8d, eax
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x48], r12
mov r12d, esi
mov qword [rsp + 0x40], r13
sub r12d, ecx
mov qword [rsp + 0x38], r14
mov r14d, eax
sar edx, 8
sar r14d, 8
mov dword [rsp + 0x28], edx
movzx r13d, al
movzx ebp, cl
mov dword [rsp + 0x24], r8d
cmp r14d, edx
jne 0x140346ecd
cmp edi, r15d
je 0x14034710d
test r12d, r12d
jne 0x140346ee9
mov r8d, r15d
mov rcx, rbx
call fcn.140347160
mov edx, dword [rsp + 0x88]
jmp 0x140347133
test r8d, r8d
jne 0x140346f65
test r12d, r12d
jle 0x140346f30
mov eax, 0x100
inc edi
sub eax, ebp
mov r8d, edi
add dword [rbx + 0x11c], eax
mov edx, r14d
mov eax, 0x100
mov rcx, rbx
sub eax, ebp
xor ebp, ebp
imul eax, r13d
add eax, eax
add dword [rbx + 0x118], eax
call fcn.140347160
cmp edi, r15d
jne 0x140346ef3
jmp 0x14034710d
sub dword [rbx + 0x11c], ebp
mov eax, r13d
imul eax, ebp
dec edi
mov r8d, edi
mov edx, r14d
mov rcx, rbx
mov ebp, 0x100
neg eax
add eax, eax
add dword [rbx + 0x118], eax
call fcn.140347160
cmp edi, r15d
jne 0x140346f30
jmp 0x14034710d
mov esi, r8d
mov eax, r12d
imul esi, ebp
imul eax, r13d
sub esi, eax
cmp r14d, edx
je 0x140346f87
mov eax, 0xffffff
cdq
idiv r8d
mov r10d, eax
jmp 0x140346f8a
xor r10d, r10d
mov dword [rsp + 0x98], r10d
cmp edi, r15d
je 0x140346fa5
mov eax, 0xffffff
cdq
idiv r12d
mov r9d, eax
jmp 0x140346fa8
xor r9d, r9d
mov edx, r8d
mov dword [rsp + 0x80], r9d
shl edx, 8
mov dword [rsp + 0x20], edx
nop word [rax + rax]
test esi, esi
jg 0x140347007
mov eax, esi
sub eax, edx
test eax, eax
jle 0x140347007
mov ecx, r10d
mov eax, r12d
neg eax
imul ecx, esi
shl eax, 8
add esi, eax
shr ecx, 0x18
mov eax, ecx
sub eax, ebp
add dword [rbx + 0x11c], eax
mov eax, ecx
sub eax, ebp
mov ebp, ecx
imul eax, r13d
mov r13d, 0x100
add dword [rbx + 0x118], eax
dec r14d
jmp 0x1403470cb
mov ecx, esi
sub ecx, edx
test ecx, ecx
jg 0x140347055
mov eax, r12d
sub eax, r8d
shl eax, 8
add eax, esi
test eax, eax
jle 0x140347055
mov esi, ecx
mov edx, r9d
imul edx, ecx
mov eax, 0x100
sub eax, ebp
add dword [rbx + 0x11c], eax
mov eax, 0x100
sub eax, ebp
xor ebp, ebp
neg edx
shr edx, 0x18
lea ecx, [rdx + r13]
mov r13d, edx
imul ecx, eax
add dword [rbx + 0x118], ecx
inc edi
jmp 0x1403470cb
mov eax, r12d
sub eax, r8d
shl eax, 8
add eax, esi
test eax, eax
jg 0x1403470a1
mov ecx, r12d
shl ecx, 8
add ecx, esi
js 0x1403470a1
mov esi, ecx
mov edx, r10d
imul edx, ecx
shr edx, 0x18
mov eax, edx
mov ecx, edx
sub eax, ebp
sub ecx, ebp
add dword [rbx + 0x11c], eax
mov ebp, edx
lea eax, [r13 + 0x100]
xor r13d, r13d
imul ecx, eax
add dword [rbx + 0x118], ecx
inc r14d
jmp 0x1403470cb
sub dword [rbx + 0x11c], ebp
mov ecx, r9d
imul ecx, esi
add esi, edx
neg ecx
shr ecx, 0x18
lea eax, [rcx + r13]
mov r13d, ecx
imul eax, ebp
mov ebp, 0x100
sub dword [rbx + 0x118], eax
dec edi
mov r8d, edi
mov edx, r14d
mov rcx, rbx
call fcn.140347160
mov edx, dword [rsp + 0x20]
mov r8d, dword [rsp + 0x24]
mov r9d, dword [rsp + 0x80]
mov r10d, dword [rsp + 0x98]
cmp r14d, dword [rsp + 0x28]
jne 0x140346fc0
cmp edi, r15d
jne 0x140346fc0
mov esi, dword [rsp + 0x90]
mov edx, dword [rsp + 0x88]
movzx ecx, sil
mov eax, ecx
sub ecx, ebp
sub eax, ebp
add dword [rbx + 0x11c], eax
movzx eax, dl
add eax, r13d
imul eax, ecx
add dword [rbx + 0x118], eax
mov r13, qword [rsp + 0x40]
mov r12, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov r14, qword [rsp + 0x38]
mov dword [rbx + 0x148], edx
mov dword [rbx + 0x14c], esi
add rsp, 0x58
pop r15
pop rdi
pop rsi
pop rbx
ret