Function at 0x140013018
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
movaps xmmword [rax - 0x38], xmm7
mov rdi, rdx
mov rsi, qword [rdx + 0x18]
movzx ecx, byte [rsi + 2]
mov edx, 0x20
sub ecx, 0x10
je 0x140013072
cmp ecx, 1
jne 0x140013087
lea rcx, [rdi + 0x30]
lea r8, str.LPDDR4X
call fcn.140158644
mov edx, 0x20
jmp 0x140013087
lea rcx, [rdi + 0x30]
lea r8, [0x1401cdbac]
call fcn.140158644
mov edx, 0x20
mov dword [rdi + 0x28], 0xa
movzx eax, byte [rsi + 3]
and eax, 0xf
cmp eax, 7
je 0x1400130b4
cmp eax, 0xe
jne 0x1400130c7
lea rcx, [rdi + 0x2f8]
lea r8, str.Soldered
call fcn.140044464
jmp 0x1400130c7
lea rcx, [rdi + 0x2f8]
lea r8, str.LP_DIMM
call fcn.140044464
or ebp, 0xffffffff
mov r15d, ebp
mov dword [rsp + 0x78], ebp
mov r12d, ebp
mov r14d, ebp
mov r13d, ebp
movzx ecx, byte [rsi + 4]
and ecx, 0xf
xor ebx, ebx
lea r9d, [rbp + 7]
cmp ecx, r9d
jg 0x140013159
cmp ecx, r9d
je 0x14001314c
cmp ecx, ebx
je 0x14001313f
lea r8d, [rbp + 2]
sub ecx, r8d
je 0x140013138
sub ecx, r8d
je 0x140013131
sub ecx, r8d
je 0x14001312a
sub ecx, r8d
je 0x140013120
cmp ecx, r8d
jne 0x1400131ab
mov ebp, 0x2000
jmp 0x1400131ab
mov ebp, 0x1000
jmp 0x1400131ab
mov ebp, 0x800
jmp 0x1400131ab
mov ebp, 0x400
jmp 0x1400131ab
mov ebp, 0x200
jmp 0x1400131ab
mov ebp, 0x100
mov r8d, 1
jmp 0x1400131ab
mov ebp, 0x4000
mov r8d, 1
jmp 0x1400131ab
sub ecx, 7
je 0x1400131a0
mov r8d, 1
sub ecx, r8d
je 0x140013199
sub ecx, r8d
je 0x140013192
sub ecx, r8d
je 0x14001318b
sub ecx, r8d
je 0x140013184
cmp ecx, r8d
jne 0x1400131ab
mov ebp, 0x4800
jmp 0x1400131ab
mov ebp, 0x1800
jmp 0x1400131ab
mov ebp, 0xc00
jmp 0x1400131ab
mov ebp, 0x6000
jmp 0x1400131ab
mov ebp, 0x3000
jmp 0x1400131ab
mov ebp, 0x8000
mov r8d, 1
movzx edx, byte [rsi + 6]
mov ecx, edx
shr ecx, 4
and ecx, 7
mov r10d, 5
lea r11d, [r10 - 2]
cmp ecx, ebx
je 0x140013215
sub ecx, r8d
je 0x14001320d
sub ecx, r8d
je 0x140013208
sub ecx, r8d
je 0x140013200
sub ecx, r8d
je 0x1400131fb
sub ecx, r8d
je 0x1400131f6
sub ecx, r8d
je 0x1400131ee
cmp ecx, r8d
jne 0x140013218
lea r12d, [r10 + 3]
jmp 0x140013218
mov r12d, 7
jmp 0x140013218
mov r12d, r9d
jmp 0x140013218
mov r12d, r10d
jmp 0x140013218
mov r12d, 4
jmp 0x140013218
mov r12d, r11d
jmp 0x140013218
mov r12d, 2
jmp 0x140013218
mov r12d, r8d
shr edx, 2
and edx, r11d
cmp edx, ebx
je 0x14001323c
sub edx, r8d
je 0x140013234
cmp edx, r8d
jne 0x14001323f
mov r14d, 4
jmp 0x14001323f
mov r14d, 2
jmp 0x14001323f
mov r14d, r8d
movzx ecx, byte [rsi + 0xc]
mov edx, ecx
and edx, 7
cmp edx, ebx
je 0x140013279
sub edx, r8d
je 0x14001326f
sub edx, r8d
je 0x140013265
cmp edx, r8d
jne 0x140013281
mov dword [rsp + 0x78], 0x20
jmp 0x140013281
mov dword [rsp + 0x78], 0x10
jmp 0x140013281
mov dword [rsp + 0x78], 8
jmp 0x140013281
mov dword [rsp + 0x78], 4
shr ecx, 3
and ecx, 7
cmp ecx, ebx
je 0x1400132f9
sub ecx, r8d
je 0x1400132ed
sub ecx, r8d
je 0x1400132e4
sub ecx, r8d
je 0x1400132d8
sub ecx, r8d
je 0x1400132cf
sub ecx, r8d
je 0x1400132c6
sub ecx, r8d
je 0x1400132ba
cmp ecx, r8d
jne 0x140013300
mov dword [rdi + 0x334], 8
jmp 0x140013300
mov dword [rdi + 0x334], 7
jmp 0x140013300
mov dword [rdi + 0x334], r9d
jmp 0x140013300
mov dword [rdi + 0x334], r10d
jmp 0x140013300
mov dword [rdi + 0x334], 4
jmp 0x140013300
mov dword [rdi + 0x334], r11d
jmp 0x140013300
mov dword [rdi + 0x334], 2
jmp 0x140013300
mov dword [rdi + 0x334], r8d
movzx ecx, byte [rsi + 0xd]
mov edx, ecx
and edx, 7
cmp edx, ebx
je 0x140013334
sub edx, r8d
je 0x14001332c
sub edx, r8d
je 0x140013324
cmp edx, r8d
jne 0x14001333a
mov r15d, 0x40
jmp 0x14001333a
mov r15d, 0x20
jmp 0x14001333a
mov r15d, 0x10
jmp 0x14001333a
mov r15d, 8
shr ecx, 5
cmp ecx, ebx
je 0x140013372
sub ecx, r8d
je 0x14001336a
sub ecx, r8d
je 0x140013365
sub ecx, r8d
je 0x14001335d
cmp ecx, r8d
jne 0x140013375
mov r13d, 8
jmp 0x140013375
mov r13d, 4
jmp 0x140013375
mov r13d, r11d
jmp 0x140013375
mov r13d, 2
jmp 0x140013375
mov r13d, r8d
mov ecx, ebp
call fcn.140001bb0
cmp eax, ebx
je 0x1400133e4
mov ecx, r15d
call fcn.140001bb0
cmp eax, ebx
je 0x1400133e4
mov ecx, dword [rsp + 0x78]
call fcn.140001bb0
cmp eax, ebx
je 0x1400133e4
mov ecx, r12d
call fcn.140001bb0
cmp eax, ebx
je 0x1400133e4
mov ecx, r13d
call fcn.140001bb0
cmp eax, ebx
je 0x1400133e4
mov ecx, r14d
call fcn.140001bb0
cmp eax, ebx
je 0x1400133e4
mov eax, ebp
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, r13d
imul eax, r12d
imul eax, r15d
imul r14d, dword [rsp + 0x78]
cdq
idiv r14d
mov dword [rdi + 0x2f0], eax
movzx eax, byte [rsi + 0xe]
shr eax, 7
mov dword [rdi + 0x390], eax
movsx eax, byte [rsi + 0x7d]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x1401cd778]
movzx eax, byte [rsi + 0x12]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1401cbd74]
addss xmm1, xmm0
movss xmm7, dword [0x140230ac8]
divss xmm7, xmm1
movaps xmm0, xmm7
call fcn.140158c00
cvttss2si eax, xmm0
mov dword [rdi + 0x344], eax
mulss xmm7, dword [0x1402309d0]
mulss xmm7, dword [0x140230b0c]
divss xmm7, dword [0x140230af8]
movaps xmm0, xmm7
call fcn.140158c00
cvttss2si eax, xmm0
imul eax, eax, 0x64
mov dword [rdi + 0x340], eax
movd xmm0, dword [rdi + 0x344]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1402309d0]
cvttss2si r9d, xmm0
lea rcx, [rdi + 0x50]
lea r8, str.LPDDR4__d
mov r12d, 0x20
mov rdx, r12
call fcn.140044464
test byte [rsi + 0x14], 1
je 0x1400134d9
lea ebp, [r12 - 0x10]
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400134be
mov rcx, rax
call fcn.140004218
jmp 0x1400134c1
mov rax, rbx
mov dword [rax + 8], 0x40400000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
jmp 0x1400134de
mov ebp, 0x10
test byte [rsi + 0x14], 2
je 0x140013519
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013500
mov rcx, rax
call fcn.140004218
jmp 0x140013503
mov rax, rbx
mov dword [rax + 8], 0x40c00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x14], 4
je 0x140013554
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x14001353b
mov rcx, rax
call fcn.140004218
jmp 0x14001353e
mov rax, rbx
mov dword [rax + 8], 0x41000000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x14], 8
je 0x14001358f
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013576
mov rcx, rax
call fcn.140004218
jmp 0x140013579
mov rax, rbx
mov dword [rax + 8], 0x41100000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x14], bpl
je 0x1400135ca
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400135b1
mov rcx, rax
call fcn.140004218
jmp 0x1400135b4
mov rax, rbx
mov dword [rax + 8], 0x41200000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x14], r12b
je 0x140013605
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400135ec
mov rcx, rax
call fcn.140004218
jmp 0x1400135ef
mov rax, rbx
mov dword [rax + 8], 0x41300000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x14], 0x40
je 0x140013640
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013627
mov rcx, rax
call fcn.140004218
jmp 0x14001362a
mov rax, rbx
mov dword [rax + 8], 0x41400000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x14], 0x80
je 0x14001367b
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013662
mov rcx, rax
call fcn.140004218
jmp 0x140013665
mov rax, rbx
mov dword [rax + 8], 0x41600000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
cmp byte [rsi + 0x15], bl
je 0x14001385c
test byte [rsi + 0x15], 1
je 0x1400136bf
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400136a6
mov rcx, rax
call fcn.140004218
jmp 0x1400136a9
mov rax, rbx
mov dword [rax + 8], 0x41800000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], 2
je 0x1400136fa
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400136e1
mov rcx, rax
call fcn.140004218
jmp 0x1400136e4
mov rax, rbx
mov dword [rax + 8], 0x41900000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], 4
je 0x140013735
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x14001371c
mov rcx, rax
call fcn.140004218
jmp 0x14001371f
mov rax, rbx
mov dword [rax + 8], 0x41a00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], 8
je 0x140013770
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013757
mov rcx, rax
call fcn.140004218
jmp 0x14001375a
mov rax, rbx
mov dword [rax + 8], 0x41b00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], bpl
je 0x1400137ab
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013792
mov rcx, rax
call fcn.140004218
jmp 0x140013795
mov rax, rbx
mov dword [rax + 8], 0x41c00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], r12b
je 0x1400137e6
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400137cd
mov rcx, rax
call fcn.140004218
jmp 0x1400137d0
mov rax, rbx
mov dword [rax + 8], 0x41d00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], 0x40
je 0x140013821
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013808
mov rcx, rax
call fcn.140004218
jmp 0x14001380b
mov rax, rbx
mov dword [rax + 8], 0x41e00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x15], 0x80
je 0x14001385c
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013843
mov rcx, rax
call fcn.140004218
jmp 0x140013846
mov rax, rbx
mov dword [rax + 8], 0x41f00000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
cmp byte [rsi + 0x16], bl
je 0x140013951
test byte [rsi + 0x16], 1
je 0x1400138a0
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013887
mov rcx, rax
call fcn.140004218
jmp 0x14001388a
mov rax, rbx
mov dword [rax + 8], 0x42000000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x16], 4
je 0x1400138db
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400138c2
mov rcx, rax
call fcn.140004218
jmp 0x1400138c5
mov rax, rbx
mov dword [rax + 8], 0x42100000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x16], bpl
je 0x140013916
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x1400138fd
mov rcx, rax
call fcn.140004218
jmp 0x140013900
mov rax, rbx
mov dword [rax + 8], 0x42200000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
test byte [rsi + 0x16], 0x40
je 0x140013951
mov rcx, rbp
call fcn.14013f12c
mov qword [rsp + 0x78], rax
cmp rax, rbx
je 0x140013938
mov rcx, rax
call fcn.140004218
jmp 0x14001393b
mov rax, rbx
mov dword [rax + 8], 0x42300000
mov rdx, rax
mov rcx, qword [rdi + 0x350]
call fcn.14000c940
movsx eax, byte [rsi + 0x7b]
movd xmm2, eax
cvtdq2ps xmm2, xmm2
mulss xmm2, dword [0x1401cd778]
movzx eax, byte [rsi + 0x18]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1401cbd74]
addss xmm2, xmm0
mov rcx, qword [rdi + 0x350]
cmp rcx, rbx
je 0x1400139f5
mov rcx, qword [rcx + 8]
cmp rcx, rbx
je 0x140013996
mov rax, qword [rcx + 8]
jmp 0x140013999
mov rax, rbx
cmp rax, rbx
je 0x1400139f5
movss xmm1, dword [rax + 8]
comiss xmm1, dword [0x140204d54]
jbe 0x1400139d9
movaps xmm0, xmm2
divss xmm0, xmm1
movss xmm1, dword [0x140230ac8]
divss xmm1, xmm0
movss dword [rax + 0xc], xmm1
movd xmm0, dword [rdi + 0x344]
cvtdq2ps xmm0, xmm0
comiss xmm1, xmm0
jbe 0x1400139d9
movss dword [rax + 0xc], xmm0
cmp rcx, rbx
je 0x1400139ed
mov rcx, qword [rcx + 0x10]
cmp rcx, rbx
je 0x1400139f5
mov rax, qword [rcx + 8]
jmp 0x1400139f0
mov rax, rbx
cmp rax, rbx
jne 0x14001399e
movsx eax, byte [rsi + 0x7a]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x1401cd778]
movss dword [rdi + 0x358], xmm1
movzx eax, byte [rsi + 0x1a]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1401cbd74]
addss xmm0, xmm1
movss dword [rdi + 0x358], xmm0
movsx eax, byte [rsi + 0x79]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x1401cd778]
movss dword [rdi + 0x360], xmm1
movzx eax, byte [rsi + 0x1b]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1401cbd74]
addss xmm0, xmm1
movss dword [rdi + 0x360], xmm0
cmp dword [rdi + 0x20], 0x200
jl 0x140013bd7
movzx eax, byte [rsi + 0x140]
and eax, 0x7f
mov r13d, 0xf
cmp eax, r13d
cmovg eax, r13d
mov ecx, ebx
movsxd rbp, eax
cmp rbp, rbx
jle 0x140013aa7
lea rcx, [rdi + 0x70]
mov r8, rbp
mov dl, 0x7f
call fcn.140158a90
mov ecx, ebp
movsxd rcx, ecx
mov al, byte [rsi + 0x141]
mov byte [rcx + rdi + 0x70], al
lea rdx, [rdi + 0xb0]
lea rcx, [rdi + 0x70]
call fcn.140009b9c
mov r11b, byte [rsi + 0x143]
mov cl, r11b
shr cl, 4
mov al, cl
shl al, 2
add cl, al
add cl, cl
and r11b, r13b
add cl, r11b
mov byte [rdi + 0x380], cl
mov cl, byte [rsi + 0x144]
mov dl, cl
shr dl, 4
mov al, dl
shl al, 2
add dl, al
add dl, dl
and cl, r13b
add dl, cl
mov byte [rdi + 0x381], dl
movzx r9d, byte [rsi + 0x145]
shl r9d, 8
movzx eax, byte [rsi + 0x146]
add r9d, eax
shl r9d, 8
movzx eax, byte [rsi + 0x147]
add r9d, eax
shl r9d, 8
movzx eax, byte [rsi + 0x148]
add r9d, eax
mov dword [rdi + 0x2f4], r9d
lea rcx, [rdi + 0x2d0]
lea r8, [0x1401cb428]
mov rdx, r12
call fcn.140044464
lea r11, [rdi + 0x2b0]
lea rdx, [rsi + 0x149]
mov r8d, 0x14
movzx ecx, byte [rdx]
mov eax, ebx
cmp cl, 0xff
cmovne eax, ecx
mov byte [r11], al
inc rdx
inc r11
sub r8, 1
jne 0x140013b68
mov byte [rdi + 0x2c4], bl
movzx eax, byte [rsi + 0x15e]
and eax, 0x7f
cmp eax, r13d
cmovg eax, r13d
movsxd rbp, eax
cmp rbp, rbx
jle 0x140013bb4
lea rcx, [rdi + 0x90]
mov r8, rbp
mov dl, 0x7f
call fcn.140158a90
mov ebx, ebp
movsxd rcx, ebx
mov al, byte [rsi + 0x15f]
mov byte [rcx + rdi + 0x90], al
lea rdx, [rdi + 0x1b0]
lea rcx, [rdi + 0x90]
call fcn.140009b9c
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
movaps xmm7, xmmword [rsp + 0x30]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret