Function at 0x140046640
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x48]
sub rsp, 0x148
movaps xmmword [rax - 0x58], xmm6
mov r13, rcx
movsd xmm6, qword [0x140214a50]
xorps xmm5, xmm5
xorps xmm4, xmm4
xorps xmm3, xmm3
movaps xmm2, xmm3
movaps xmm1, xmm3
mulsd xmm2, qword [0x140214a08]
movaps xmm0, xmm3
mulsd xmm1, qword [0x14020d5a8]
mulsd xmm0, xmm3
mulsd xmm2, xmm3
mulsd xmm1, xmm3
subsd xmm2, xmm0
addsd xmm1, qword [0x1402149a0]
divsd xmm2, xmm1
addsd xmm4, xmm2
comisd xmm4, xmmword [0x1402149e0]
jbe 0x1400466c9
movaps xmm0, xmm3
mulsd xmm0, qword [0x140214968]
subsd xmm4, xmm0
addsd xmm3, qword [0x14020d170]
comisd xmm6, xmm3
ja 0x140046677
comisd xmm5, xmm4
jbe 0x1400466ec
call fcn.14004c997
call fcn.14004c97f
jmp 0x140046dc0
xor eax, eax
lea rcx, [rsp + 0x20]
mov byte [rcx], al
inc eax
inc rcx
cmp eax, 0x100
jb 0x1400466f3
xor r13d, r13d
mov r9d, 0xff
mov r10d, r13d
mov cl, r13b
mov r11d, 1
mov edi, r13d
cmp r9d, r11d
jbe 0x14004672b
lea r11d, [r11*2 + 1]
cmp r11d, r9d
jb 0x14004671e
movzx eax, cl
mov dl, byte [rsp + rax + 0x20]
mov eax, r10d
test r10d, r10d
je 0x140046777
sub eax, 1
je 0x14004676d
sub eax, 1
je 0x140046763
cmp eax, 1
je 0x140046759
lea ecx, [r10 - 4]
lea rax, [fcn.14004c997]
mov al, byte [rcx + rax]
jmp 0x14004677c
cvttsd2si rax, xmm4
shr eax, 0x18
jmp 0x14004677c
cvttsd2si rax, xmm4
shr eax, 0x10
jmp 0x14004677c
cvttsd2si rax, xmm4
shr eax, 8
jmp 0x14004677c
cvttsd2si rax, xmm4
add al, dl
lea r8d, [r10 + 1]
movzx edx, al
cmp r8d, 0x1d
lea eax, [rdx + 0x1d]
movzx ecx, al
cmovb ecx, edx
sbb r10d, r10d
movzx ebx, cl
and r10d, r8d
mov eax, ebx
inc edi
and eax, r11d
cmp edi, 0xb
jbe 0x1400467ae
xor edx, edx
div r9d
mov eax, edx
mov cl, bl
cmp eax, r9d
ja 0x14004672b
je 0x1400467d8
mov edx, eax
mov ecx, r9d
mov al, byte [rsp + rdx + 0x20]
xor byte [rsp + rcx + 0x20], al
mov al, byte [rsp + rcx + 0x20]
xor byte [rsp + rdx + 0x20], al
mov al, byte [rsp + rdx + 0x20]
xor byte [rsp + rcx + 0x20], al
mov cl, bl
add r9d, 0xffffffff
jne 0x140046710
movzx r10d, byte [rsp + rbx + 0x20]
lea r12, [fcn.14004c97f]
movzx edx, byte [rsp + 0x27]
movzx esi, byte [rsp + 0x21]
mov r15b, byte [rsp + 0x25]
movzx ebx, byte [rsp + r10 + 0x20]
mov r11b, byte [r12]
mov r14b, byte [rsp + rsi + 0x20]
sub r11b, 6
add r14b, byte [rsp + 0x23]
inc sil
mov cl, byte [r12 + 1]
mov dil, byte [r12 + 2]
add cl, 0x69
mov r13, qword [rbp + 0x90]
sub dil, 6
movzx r9d, r14b
add r14b, bl
shl r11b, 4
or r11b, cl
shl dil, 4
movzx ecx, sil
inc sil
mov al, byte [rsp + r9 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + rdx + 0x20], al
mov byte [rsp + rcx + 0x20], bl
add r15b, byte [rsp + rbx + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx r10d, r14b
movzx eax, byte [rsp + rdx + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, rbx
movzx r9d, r11b
movzx eax, al
mov dl, byte [rsp + rcx + 0x20]
mov cl, byte [r12 + 3]
add cl, 0x69
xor dl, byte [rsp + rax + 0x20]
or dil, cl
mov al, byte [rsp + r10 + 0x20]
xor dl, r11b
movzx r11d, byte [rsp + r9 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx r8d, dl
movzx ecx, sil
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r15b, byte [rsp + r11 + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, r11
movzx eax, al
mov dl, byte [rsp + rcx + 0x20]
mov ecx, 4
mov qword [rbp + 0x28], rcx
xor dl, byte [rsp + rax + 0x20]
xor dl, dil
movsx eax, dl
mov word [r13 + 0xc], ax
mov r12b, byte [r12 + rcx]
sub r12b, 6
movzx r8d, dl
lea rax, [fcn.14004c97f]
mov cl, byte [rax + 5]
add r14b, r11b
add cl, 0x69
movzx r10d, r14b
movzx r9d, dil
inc sil
shl r12b, 4
or r12b, cl
movzx ecx, sil
mov al, byte [rsp + r10 + 0x20]
movzx ebx, byte [rsp + r9 + 0x20]
mov byte [rsp + r9 + 0x20], al
mov edx, ebx
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], bl
add r15b, byte [rsp + rbx + 0x20]
movzx eax, r15b
mov byte [rbp + 0x98], bl
mov byte [rbp + 0xa0], r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r8 + 0x20]
mov r8b, byte [rbp + 0xa0]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, rbx
lea rbx, [r13 + 0xe]
movzx eax, al
mov dl, byte [rsp + rcx + 0x20]
mov cl, byte [rbp + 0x98]
xor dl, byte [rsp + rax + 0x20]
xor dl, r12b
mov r12d, 2
movsx eax, dl
mov word [rbx], ax
lea rax, [fcn.14004c97f]
sub rax, r13
mov qword [rbp + 0xa8], r12
mov qword [rbp + 0x20], rax
mov r13, rax
mov al, byte [rbx + r13 - 7]
add r14b, cl
mov r11b, byte [rbx + r13 - 8]
add al, 0x69
movzx r9d, r8b
add rbx, 2
movzx r8d, dl
sub r11b, 6
movzx r10d, r14b
inc sil
movzx ecx, sil
inc r12
movzx edi, byte [rsp + r9 + 0x20]
shl r11b, 4
mov edx, edi
or r11b, al
mov al, byte [rsp + r10 + 0x20]
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], dil
add r15b, byte [rsp + rdi + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
mov r8b, r11b
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, rdi
movzx eax, al
mov dl, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
xor dl, r11b
test r12, r12
jle 0x140046ac3
movsx eax, dl
mov word [rbx], ax
sub qword [rbp + 0xa8], 1
mov cl, dil
jne 0x140046a18
mov r13, qword [rbp + 0x90]
lea r12, [fcn.14004c97f]
mov r11b, byte [r12 + 0xa]
add r14b, dil
mov al, byte [r12 + 0xb]
sub r11b, 6
add al, 0x69
movzx r9d, r8b
movzx r8d, dl
inc sil
movzx r10d, r14b
movzx ecx, sil
inc sil
movzx ebx, byte [rsp + r9 + 0x20]
shl r11b, 4
add r14b, bl
or r11b, al
mov al, byte [rsp + r10 + 0x20]
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], bl
add r15b, byte [rsp + rbx + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx r9d, r11b
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, rbx
movzx r10d, r14b
movzx eax, al
mov dl, byte [rsp + rcx + 0x20]
movzx ecx, sil
xor dl, byte [rsp + rax + 0x20]
xor dl, r11b
movzx r11d, byte [rsp + r9 + 0x20]
movsx eax, dl
mov word [r13 + 0x14], ax
mov al, byte [r12 + 0xd]
mov dil, byte [r12 + 0xc]
add al, 0x69
movzx r8d, dl
sub dil, 6
shl dil, 4
add r12, 0xe
or dil, al
mov qword [rbp + 0x98], r12
mov al, byte [rsp + r10 + 0x20]
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r15b, byte [rsp + r11 + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, r11
movzx eax, al
mov dl, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
xor dl, dil
movsx eax, dl
mov word [r13 + 0x16], ax
mov r12b, byte [r12 + 1]
mov rax, qword [rbp + 0x98]
add r12b, 0x69
mov al, byte [rax]
add r14b, r11b
sub al, 6
movzx r8d, dl
shl al, 4
inc sil
or r12b, al
movzx r10d, r14b
movzx r9d, dil
movzx ecx, sil
mov byte [rbp + 0xa0], r12b
mov al, byte [rsp + r10 + 0x20]
movzx ebx, byte [rsp + r9 + 0x20]
mov byte [rsp + r9 + 0x20], al
mov edx, ebx
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], bl
add r15b, byte [rsp + rbx + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, rbx
movzx eax, al
mov bl, byte [rsp + rcx + 0x20]
mov cl, dl
mov dl, byte [rbp + 0xa0]
xor bl, byte [rsp + rax + 0x20]
xor bl, r12b
lea r12, [r13 + 0x18]
mov r13, qword [rbp + 0x20]
movsx eax, bl
mov word [r12], ax
mov eax, 7
inc rax
movzx r9d, dl
mov qword [rbp + 0x98], rax
lea r12, [r12 + 2]
mov al, byte [r12 + r13 - 9]
add r14b, cl
mov r11b, byte [r12 + r13 - 0xa]
add al, 0x69
movzx edi, byte [rsp + r9 + 0x20]
sub r11b, 6
movzx r8d, bl
inc sil
movzx r10d, r14b
mov edx, edi
movzx ecx, sil
shl r11b, 4
or r11b, al
mov al, byte [rsp + r10 + 0x20]
mov dl, r11b
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], dil
add r15b, byte [rsp + rdi + 0x20]
movzx eax, r15b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
xor r9d, r9d
add rcx, rax
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, rdi
movzx eax, al
mov bl, byte [rsp + rcx + 0x20]
xor bl, byte [rsp + rax + 0x20]
mov rax, qword [rbp + 0x98]
xor bl, r11b
test rax, rax
jle 0x140046da6
movsx eax, bl
mov word [r12], ax
mov rax, qword [rbp + 0x98]
sub qword [rbp + 0x28], 1
mov cl, dil
jne 0x140046ce0
mov r13, qword [rbp + 0x90]
mov word [r13 + 0x22], r9w
movaps xmm6, xmmword [rsp + 0x130]
lea rax, [r13 + 0xc]
add rsp, 0x148
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret