Function at 0x14004824c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x68]
sub rsp, 0x168
mov rax, qword [0x140090120]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov rax, qword [rcx]
xor edi, edi
mov qword [rbp - 0x78], r9
mov rbx, rcx
mov qword [rbp - 0x80], r8
mov qword [rsp + 0x78], rdx
mov dword [rax + 8], edi
call fcn.140047994
test eax, eax
jne 0x1400482a3
mov rcx, rbx
call fcn.140048220
xor eax, eax
jmp 0x140048805
mov rax, qword [rbx]
mov r14d, 1
mov r13d, r14d
movsxd rcx, dword [rax + 8]
lea edx, [r14 + 2]
cmp ecx, edx
mov dword [rsp + 0x58], ecx
cmovge r13d, edx
mov dword [rsp + 0x30], r13d
jne 0x1400482e7
cmp dword [rbx + 0x4850], edx
je 0x1400482e0
cmp dword [rbx + 0x484c], edi
jne 0x1400482e7
cmp dword [rbx + 0x4848], edi
jne 0x1400482e7
mov qword [rsp + 0x60], r14
jmp 0x1400482ec
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], rcx
xorps xmm0, xmm0
xorps xmm1, xmm1
mov r12, rcx
movdqu xmmword [rsp + 0x38], xmm0
movdqu xmmword [rsp + 0x48], xmm1
test ecx, ecx
jle 0x1400483e8
mov r15, rdi
lea rsi, [rbx + 0x46a4]
lea rdi, [rbp - 0x58]
mov rax, qword [rbx]
mov ecx, dword [rax]
add ecx, edx
call fcn.14000fe54
mov qword [rsi + 0x44], rax
test rax, rax
je 0x140048406
mov eax, dword [rbx + 0x4688]
and dword [rdi + 0x10], 0
cdq
idiv dword [rsi]
mov r9d, eax
mov dword [rdi], eax
mov eax, dword [rbx + 0x468c]
cdq
idiv dword [rsi + 4]
xor edx, edx
mov ecx, eax
mov dword [rdi + 4], eax
sar ecx, 1
mov r8d, eax
mov dword [rdi + 0xc], ecx
mov rcx, qword [rbx]
mov eax, dword [rcx]
mov rcx, qword [rsi + 0x2c]
dec eax
add eax, r9d
mov qword [rdi - 8], rcx
div r9d
mov qword [rdi - 0x10], rcx
mov dword [rdi + 8], eax
cmp r9d, r14d
jne 0x14004839e
cmp r8d, r14d
jne 0x14004838f
lea rax, [fcn.140001450]
jmp 0x1400483c8
cmp r8d, 2
jne 0x1400483c1
lea rax, [0x140047ac0]
jmp 0x1400483c8
cmp r9d, 2
jne 0x1400483c1
cmp r8d, r14d
jne 0x1400483b2
lea rax, [0x140047b08]
jmp 0x1400483c8
cmp r8d, 2
jne 0x1400483c1
mov rax, qword [rbx + 0x4880]
jmp 0x1400483c8
lea rax, [0x140047e60]
mov qword [rdi - 0x18], rax
add r15, r14
add rdi, 0x30
add rsi, 0x60
mov edx, 3
cmp r15, r12
jl 0x14004831c
mov rax, qword [rbx]
mov r8d, dword [rax + 4]
mov r9d, r14d
mov edx, dword [rax]
mov ecx, r13d
call fcn.1400442f8
mov qword [rsp + 0x70], rax
mov rsi, rax
test rax, rax
jne 0x14004841f
mov rcx, rbx
call fcn.140048220
lea rcx, str.outofmem
call fcn.140044180
jmp 0x14004829c
mov rcx, qword [rbx]
xor eax, eax
mov dword [rsp + 0x34], eax
cmp dword [rcx + 4], eax
jbe 0x1400487c7
mov r15, qword [rsp + 0x38]
mov r11, qword [rsp + 0x48]
imul eax, dword [rcx]
xor r12d, r12d
imul eax, r13d
mov edi, eax
add rdi, rsi
cmp qword [rsp + 0x68], r12
jle 0x1400484e6
mov r13, qword [rsp + 0x68]
lea r15, [rbx + 0x46c0]
lea rsi, [rbp - 0x4c]
mov eax, dword [rsi - 8]
sar eax, 1
cmp dword [rsi], eax
jl 0x140048478
mov rdx, qword [rsi - 0x14]
mov r8, qword [rsi - 0x1c]
jmp 0x140048480
mov rdx, qword [rsi - 0x1c]
mov r8, qword [rsi - 0x14]
mov eax, dword [rsi - 0xc]
mov r9d, dword [rsi - 4]
mov rcx, qword [r15 + 0x28]
mov dword [rsp + 0x20], eax
call qword [rsi - 0x24]
mov qword [rsp + r12*8 + 0x38], rax
mov eax, dword [rsi]
inc eax
mov dword [rsi], eax
cmp eax, dword [rsi - 8]
jl 0x1400484c4
add dword [rsi + 4], r14d
and dword [rsi], 0
mov eax, dword [rsi + 4]
mov rcx, qword [rsi - 0x14]
mov qword [rsi - 0x1c], rcx
cmp eax, dword [r15]
jge 0x1400484c4
movsxd rax, dword [r15 + 4]
add rax, rcx
mov qword [rsi - 0x14], rax
add r12, r14
add rsi, 0x30
add r15, 0x60
cmp r12, r13
jl 0x140048465
mov rcx, qword [rbx]
mov r15, qword [rsp + 0x38]
mov r13d, dword [rsp + 0x30]
mov r11, qword [rsp + 0x48]
mov eax, 3
cmp dword [rsp + 0x58], eax
jl 0x140048694
cmp dword [rcx + 8], eax
jne 0x14004856d
cmp qword [rsp + 0x60], 0
je 0x14004853f
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x140048565
mov r10d, r13d
mov al, byte [r8 + r15]
xor edx, edx
mov byte [rdi], al
mov rax, qword [rsp + rdx*8 + 0x40]
mov cl, byte [r8 + rax]
mov byte [rdi + rdx + 1], cl
add rdx, r14
cmp rdx, 2
jl 0x140048515
mov byte [rdi + 3], 0xff
add r8d, r14d
mov rax, qword [rbx]
add rdi, r10
cmp r8d, dword [rax]
jb 0x14004850d
jmp 0x140048565
mov eax, dword [rcx]
mov rdx, r15
mov r9, qword [rsp + 0x48]
mov rcx, rdi
mov r8, qword [rsp + 0x40]
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], eax
call qword [rbx + 0x4878]
mov r11, qword [rsp + 0x48]
mov rcx, qword [rbx]
jmp 0x1400487ae
cmp dword [rcx + 8], 4
jne 0x140048665
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x1400485db
xor r10d, r10d
cmp dword [rcx], r10d
jbe 0x140048565
mov r11d, r13d
mov r13, qword [rsp + 0x48]
mov rax, qword [rsp + 0x50]
mov cl, byte [r10 + r15]
mov dl, byte [r10 + rax]
call fcn.140048230
mov byte [rdi], al
mov rax, qword [rsp + 0x40]
mov cl, byte [r10 + rax]
call fcn.140048230
mov byte [rdi + 1], al
mov cl, byte [r10 + r13]
call fcn.140048230
mov byte [rdi + 2], al
add r10d, r14d
mov byte [rdi + 3], 0xff
add rdi, r11
mov rax, qword [rbx]
cmp r10d, dword [rax]
jb 0x140048591
mov r13d, dword [rsp + 0x30]
jmp 0x140048560
mov edx, dword [rcx]
mov rcx, rdi
mov r10, qword [rbx + 0x4878]
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x40]
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], edx
mov rdx, r15
cmp eax, 2
jne 0x14004865d
call r10
mov rax, qword [rbx]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x140048560
mov r15, qword [rsp + 0x50]
mov r10d, r13d
mov cl, byte [rdi]
mov dl, byte [r9 + r15]
not cl
call fcn.140048230
mov cl, byte [rdi + 1]
not cl
mov byte [rdi], al
call fcn.140048230
mov cl, byte [rdi + 2]
not cl
mov byte [rdi + 1], al
call fcn.140048230
mov byte [rdi + 2], al
add r9d, r14d
mov rax, qword [rbx]
add rdi, r10
cmp r9d, dword [rax]
jb 0x14004861c
mov r15, qword [rsp + 0x38]
jmp 0x140048560
call r10
jmp 0x140048560
xor edx, edx
cmp dword [rcx], edx
jbe 0x140048565
mov r8d, r13d
mov cl, byte [rdx + r15]
add edx, r14d
mov byte [rdi + 2], cl
mov byte [rdi + 1], cl
mov byte [rdi], cl
mov byte [rdi + 3], 0xff
add rdi, r8
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x140048672
jmp 0x140048565
cmp qword [rsp + 0x60], 0
je 0x1400486db
xor r9d, r9d
cmp dword [rcx], r9d
jbe 0x1400487ae
mov r13, qword [rsp + 0x40]
movzx r8d, byte [r9 + r11]
movzx edx, byte [r9 + r13]
movzx ecx, byte [r9 + r15]
call fcn.140044b44
mov byte [rdi], al
add r9d, r14d
mov rcx, qword [rbx]
add rdi, r14
cmp r9d, dword [rcx]
jb 0x1400486ad
mov r13d, dword [rsp + 0x30]
jmp 0x1400487ae
cmp dword [rcx + 8], 4
jne 0x140048797
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x140048758
xor esi, esi
cmp dword [rcx], esi
jbe 0x1400487ae
mov r12d, r13d
mov r13, qword [rsp + 0x48]
mov rax, qword [rsp + 0x50]
mov cl, byte [rsi + r13]
mov dl, byte [rsi + rax]
call fcn.140048230
movzx r10d, al
mov rax, qword [rsp + 0x40]
mov cl, byte [rsi + rax]
call fcn.140048230
mov cl, byte [rsi + r15]
movzx r9d, al
call fcn.140048230
movzx ecx, al
mov r8d, r10d
mov edx, r9d
call fcn.140044b44
mov byte [rdi], al
add esi, r14d
mov byte [rdi + 1], 0xff
add rdi, r12
mov rcx, qword [rbx]
cmp esi, dword [rcx]
jb 0x140048701
mov r13d, dword [rsp + 0x30]
jmp 0x140048790
cmp eax, 2
jne 0x140048797
xor r9d, r9d
cmp dword [rcx], r9d
jbe 0x1400487ae
mov r11, qword [rsp + 0x50]
mov r10d, r13d
mov cl, byte [r9 + r15]
mov dl, byte [r9 + r11]
not cl
call fcn.140048230
mov byte [rdi], al
add r9d, r14d
mov byte [rdi + 1], 0xff
add rdi, r10
mov rcx, qword [rbx]
cmp r9d, dword [rcx]
jb 0x14004876d
mov r11, qword [rsp + 0x48]
jmp 0x1400487ae
xor edx, edx
cmp dword [rcx], edx
jbe 0x1400487ae
mov al, byte [rdx + r15]
mov byte [rdx + rdi], al
add edx, r14d
mov rcx, qword [rbx]
cmp edx, dword [rcx]
jb 0x14004879d
mov eax, dword [rsp + 0x34]
mov rsi, qword [rsp + 0x70]
add eax, r14d
mov dword [rsp + 0x34], eax
cmp eax, dword [rcx + 4]
jb 0x14004843b
mov rcx, rbx
call fcn.140048220
mov rax, qword [rbx]
mov ecx, dword [rax]
mov rax, qword [rsp + 0x78]
mov dword [rax], ecx
mov rax, qword [rbx]
mov ecx, dword [rax + 4]
mov rax, qword [rbp - 0x80]
mov dword [rax], ecx
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x140048802
mov rax, qword [rbx]
mov edx, 3
cmp dword [rax + 8], edx
cmovge r14d, edx
mov dword [rcx], r14d
mov rax, rsi
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.14005bd30
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret