Function at 0x4389ba
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0x14
mov eax, 0x5843a2
call fcn.00565102
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0xc]
movzx eax, byte [edi + 2]
sub eax, 0x10
push 0x20
pop ebx
je 0x4389e2
dec eax
jne 0x4389f4
push str.LPDDR4X
jmp 0x4389e7
push 0x58fcf0
lea eax, [esi + 0x1c]
push ebx
push eax
call fcn.00564635
add esp, 0xc
mov dword [esi + 0x18], 0xa
movzx eax, byte [edi + 3]
and eax, 0xf
cmp eax, 7
je 0x438a13
cmp eax, 0xe
jne 0x438a28
push str.Soldered
jmp 0x438a18
push str.LP_DIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00460090
add esp, 0xc
movzx eax, byte [edi + 4]
or ebx, 0xffffffff
and eax, 0xf
mov dword [ebp + 8], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
cmp eax, 0xc
ja case.default.0x438a46
jmp dword [eax*4 + 0x4394aa]
mov dword [ebp + 8], 0x100
jmp case.default.0x438a46
mov dword [ebp + 8], 0x200
jmp case.default.0x438a46
mov dword [ebp + 8], 0x400
jmp case.default.0x438a46
mov dword [ebp + 8], 0x800
jmp case.default.0x438a46
mov dword [ebp + 8], 0x1000
jmp case.default.0x438a46
mov dword [ebp + 8], 0x2000
jmp case.default.0x438a46
mov dword [ebp + 8], 0x4000
jmp case.default.0x438a46
mov dword [ebp + 8], 0x8000
jmp case.default.0x438a46
mov dword [ebp + 8], 0x3000
jmp case.default.0x438a46
mov dword [ebp + 8], 0x6000
jmp case.default.0x438a46
mov dword [ebp + 8], 0xc00
jmp case.default.0x438a46
mov dword [ebp + 8], 0x1800
jmp case.default.0x438a46
mov dword [ebp + 8], 0x4800
movzx ecx, byte [edi + 6]
mov eax, ecx
push 7
shr eax, 4
pop edx
and eax, edx
cmp eax, edx
ja case.default.0x438ad2
jmp dword [eax*4 + 0x4394de]
mov dword [ebp - 0x10], 1
jmp case.default.0x438ad2
mov dword [ebp - 0x10], 2
jmp case.default.0x438ad2
mov dword [ebp - 0x10], 3
jmp case.default.0x438ad2
mov dword [ebp - 0x10], 4
jmp case.default.0x438ad2
mov dword [ebp - 0x10], 5
jmp case.default.0x438ad2
mov dword [ebp - 0x10], 6
jmp case.default.0x438ad2
mov dword [ebp - 0x10], edx
jmp case.default.0x438ad2
mov dword [ebp - 0x10], 8
shr ecx, 2
and ecx, 3
sub ecx, 0
je 0x438b35
dec ecx
je 0x438b30
dec ecx
jne 0x438b38
push 4
jmp 0x438b32
push 2
pop ebx
jmp 0x438b38
xor ebx, ebx
inc ebx
movzx ecx, byte [edi + 0xc]
mov eax, ecx
and eax, edx
sub eax, 0
je 0x438b69
dec eax
je 0x438b60
dec eax
je 0x438b57
dec eax
jne 0x438b70
mov dword [ebp - 0x20], 0x20
jmp 0x438b70
mov dword [ebp - 0x20], 0x10
jmp 0x438b70
mov dword [ebp - 0x20], 8
jmp 0x438b70
mov dword [ebp - 0x20], 4
shr ecx, 3
and ecx, edx
cmp ecx, edx
ja case.default.0x438b79
jmp dword [ecx*4 + 0x4394fe]
mov dword [esi + 0x320], 1
jmp case.default.0x438b79
mov dword [esi + 0x320], 2
jmp case.default.0x438b79
mov dword [esi + 0x320], 3
jmp case.default.0x438b79
mov dword [esi + 0x320], 4
jmp case.default.0x438b79
mov dword [esi + 0x320], 5
jmp case.default.0x438b79
mov dword [esi + 0x320], 6
jmp case.default.0x438b79
mov dword [esi + 0x320], edx
jmp case.default.0x438b79
mov dword [esi + 0x320], 8
movzx ecx, byte [edi + 0xd]
mov eax, ecx
and eax, edx
sub eax, 0
je 0x438c0b
dec eax
je 0x438c02
dec eax
je 0x438bf9
dec eax
jne 0x438c12
mov dword [ebp - 0x1c], 0x40
jmp 0x438c12
mov dword [ebp - 0x1c], 0x20
jmp 0x438c12
mov dword [ebp - 0x1c], 0x10
jmp 0x438c12
mov dword [ebp - 0x1c], 8
shr ecx, 5
sub ecx, 0
je 0x438c4a
dec ecx
je 0x438c41
dec ecx
je 0x438c38
dec ecx
je 0x438c2f
dec ecx
jne 0x438c51
mov dword [ebp - 0x14], 8
jmp 0x438c51
mov dword [ebp - 0x14], 4
jmp 0x438c51
mov dword [ebp - 0x14], 3
jmp 0x438c51
mov dword [ebp - 0x14], 2
jmp 0x438c51
mov dword [ebp - 0x14], 1
push dword [ebp + 8]
call fcn.0040448b
pop ecx
test eax, eax
je 0x438cc2
push dword [ebp - 0x1c]
call fcn.0040448b
pop ecx
test eax, eax
je 0x438cc2
push dword [ebp - 0x20]
call fcn.0040448b
pop ecx
test eax, eax
je 0x438cc2
push dword [ebp - 0x10]
call fcn.0040448b
pop ecx
test eax, eax
je 0x438cc2
push dword [ebp - 0x14]
call fcn.0040448b
pop ecx
test eax, eax
je 0x438cc2
push ebx
call fcn.0040448b
pop ecx
test eax, eax
je 0x438cc2
mov eax, dword [ebp + 8]
imul ebx, dword [ebp - 0x20]
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp - 0x14]
imul eax, dword [ebp - 0x10]
imul eax, dword [ebp - 0x1c]
cdq
idiv ebx
mov dword [esi + 0x2dc], eax
movzx eax, byte [edi + 0xe]
shr eax, 7
mov dword [esi + 0x374], eax
movsx eax, byte [edi + 0x7d]
mov dword [ebp + 8], eax
movzx eax, byte [edi + 0x12]
fild dword [ebp + 8]
push ecx
fmul qword [0x58f9e8]
fstp dword [ebp + 8]
fld dword [ebp + 8]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fmul qword [0x58fc68]
faddp st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fdivr qword [0x5cae70]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [esp]
call fcn.0041707d
call fcn.005652a0
fld dword [ebp + 8]
fadd st(0), st(0)
mov dword [esi + 0x330], eax
fmul qword [0x5caeb0]
fdiv qword [0x5cae88]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [esp]
call fcn.0041707d
call fcn.005652a0
fild dword [esi + 0x330]
imul eax, eax, 0x64
fadd st(0), st(0)
mov dword [esi + 0x32c], eax
call fcn.005652a0
push eax
push str.LPDDR4__d
lea eax, [esi + 0x3c]
push 0x20
push eax
call fcn.00460090
add esp, 0x14
test byte [edi + 0x14], 1
push 0xc
pop ebx
je 0x438daa
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
and dword [ebp - 4], 0
test eax, eax
je 0x438d8f
mov ecx, eax
call fcn.0042d0f0
jmp 0x438d91
xor eax, eax
fld dword [0x58fb6c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 2
je 0x438de9
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x438dce
mov ecx, eax
call fcn.0042d0f0
jmp 0x438dd0
xor eax, eax
fld dword [0x58fa5c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 4
je 0x438e28
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x438e0d
mov ecx, eax
call fcn.0042d0f0
jmp 0x438e0f
xor eax, eax
fld dword [0x58d884]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 8
je 0x438e67
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x438e4c
mov ecx, eax
call fcn.0042d0f0
jmp 0x438e4e
xor eax, eax
fld dword [0x58fa54]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 0x10
je 0x438ea6
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 4
test eax, eax
je 0x438e8b
mov ecx, eax
call fcn.0042d0f0
jmp 0x438e8d
xor eax, eax
fld dword [0x58fa50]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 0x20
je 0x438ee5
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 5
test eax, eax
je 0x438eca
mov ecx, eax
call fcn.0042d0f0
jmp 0x438ecc
xor eax, eax
fld dword [0x58fa4c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 0x40
je 0x438f24
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 6
test eax, eax
je 0x438f09
mov ecx, eax
call fcn.0042d0f0
jmp 0x438f0b
xor eax, eax
fld dword [0x58fa48]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x14], 0x80
je 0x438f63
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 7
test eax, eax
je 0x438f48
mov ecx, eax
call fcn.0042d0f0
jmp 0x438f4a
xor eax, eax
fld dword [0x58fa40]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
mov al, byte [edi + 0x15]
test al, al
je 0x439160
test al, 1
je 0x438fab
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 8
test eax, eax
je 0x438f90
mov ecx, eax
call fcn.0042d0f0
jmp 0x438f92
xor eax, eax
fld dword [0x58fa38]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 2
je 0x438fea
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 9
test eax, eax
je 0x438fcf
mov ecx, eax
call fcn.0042d0f0
jmp 0x438fd1
xor eax, eax
fld dword [0x58fa30]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 4
je 0x439029
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xa
test eax, eax
je 0x43900e
mov ecx, eax
call fcn.0042d0f0
jmp 0x439010
xor eax, eax
fld dword [0x58fa90]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 8
je 0x439068
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xb
test eax, eax
je 0x43904d
mov ecx, eax
call fcn.0042d0f0
jmp 0x43904f
xor eax, eax
fld dword [0x58fa88]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 0x10
je 0x4390a3
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], ebx
test eax, eax
je 0x439088
mov ecx, eax
call fcn.0042d0f0
jmp 0x43908a
xor eax, eax
fld dword [0x58fa80]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 0x20
je 0x4390e2
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xd
test eax, eax
je 0x4390c7
mov ecx, eax
call fcn.0042d0f0
jmp 0x4390c9
xor eax, eax
fld dword [0x58fb20]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 0x40
je 0x439121
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xe
test eax, eax
je 0x439106
mov ecx, eax
call fcn.0042d0f0
jmp 0x439108
xor eax, eax
fld dword [0x58fb1c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x15], 0x80
je 0x439160
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xf
test eax, eax
je 0x439145
mov ecx, eax
call fcn.0042d0f0
jmp 0x439147
xor eax, eax
fld dword [0x58fb18]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
mov al, byte [edi + 0x16]
test al, al
je 0x439265
test al, 1
je 0x4391a8
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x10
test eax, eax
je 0x43918d
mov ecx, eax
call fcn.0042d0f0
jmp 0x43918f
xor eax, eax
fld dword [0x58fb14]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x16], 4
je 0x4391e7
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x11
test eax, eax
je 0x4391cc
mov ecx, eax
call fcn.0042d0f0
jmp 0x4391ce
xor eax, eax
fld dword [0x58fb0c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x16], 0x10
je 0x439226
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x12
test eax, eax
je 0x43920b
mov ecx, eax
call fcn.0042d0f0
jmp 0x43920d
xor eax, eax
fld dword [0x58fb04]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
test byte [edi + 0x16], 0x40
je 0x439265
push ebx
call fcn.00551d80
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x13
test eax, eax
je 0x43924a
mov ecx, eax
call fcn.0042d0f0
jmp 0x43924c
xor eax, eax
fld dword [0x58fafc]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.004339c2
movsx eax, byte [edi + 0x7b]
and dword [ebp - 0x14], 0
mov dword [ebp + 8], eax
movzx eax, byte [edi + 0x18]
fild dword [ebp + 8]
lea ecx, [ebp - 0x18]
fmul qword [0x58f9e8]
fstp dword [ebp + 8]
fld dword [ebp + 8]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
mov eax, dword [esi + 0x338]
mov dword [ebp - 0x18], eax
fmul qword [0x58fc68]
faddp st(1)
fstp dword [ebp - 0x1c]
call fcn.0042d792
jmp 0x4392f4
fldz
fcomp dword [ecx + 4]
fnstsw ax
test ah, 5
jp 0x4392ec
fld dword [ebp - 0x1c]
fdiv dword [ecx + 4]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fdivr qword [0x5cae70]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [ecx + 8]
fild dword [esi + 0x330]
fstp dword [ebp - 0x20]
fld dword [ebp + 8]
fld dword [ebp - 0x20]
fcompp
fnstsw ax
test ah, 5
jp 0x4392ec
fld dword [ebp - 0x20]
fstp dword [ecx + 8]
lea ecx, [ebp - 0x18]
call fcn.0042d7a9
mov ecx, eax
test ecx, ecx
jne 0x4392a7
cmp dword [esi + 0x10], 0x200
movsx eax, byte [edi + 0x7a]
mov dword [ebp + 8], eax
lea eax, [esi + 0x33c]
fild dword [ebp + 8]
fld qword [0x58f9e8]
fmul st(1), st(0)
fxch st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [eax]
movzx ecx, byte [edi + 0x1a]
mov dword [ebp - 0x20], ecx
fild dword [ebp - 0x20]
fld qword [0x58fc68]
fmul st(1), st(0)
fld dword [ebp + 8]
faddp st(2)
fxch st(1)
fstp dword [eax]
movsx eax, byte [edi + 0x79]
mov dword [ebp + 8], eax
lea eax, [esi + 0x344]
fild dword [ebp + 8]
fmulp st(2)
fxch st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [eax]
movzx ecx, byte [edi + 0x1b]
mov dword [ebp - 0x20], ecx
fild dword [ebp - 0x20]
fmulp st(1)
fadd dword [ebp + 8]
fstp dword [eax]
jl 0x4394a2
movzx ebx, byte [edi + 0x140]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x439383
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x43939a
push ebx
lea eax, [esi + 0x5c]
push 0x7f
push eax
call fcn.005635a0
add esp, 0xc
mov eax, ebx
mov cl, byte [edi + 0x141]
mov byte [eax + esi + 0x5c], cl
lea eax, [esi + 0x9c]
push eax
lea eax, [esi + 0x5c]
push eax
call fcn.004312f4
mov cl, byte [edi + 0x143]
mov al, cl
shr al, 4
mov dl, 0xa
imul dl
and cl, 0xf
add al, cl
mov byte [esi + 0x364], al
mov cl, byte [edi + 0x144]
mov al, cl
shr al, 4
imul dl
and cl, 0xf
add al, cl
mov byte [esi + 0x365], al
movzx eax, byte [edi + 0x145]
movzx ecx, byte [edi + 0x146]
shl eax, 8
add eax, ecx
movzx ecx, byte [edi + 0x147]
shl eax, 8
add eax, ecx
movzx ecx, byte [edi + 0x148]
shl eax, 8
add eax, ecx
push eax
push 0x58dbd8
mov dword [esi + 0x2e0], eax
lea eax, [esi + 0x2bc]
push 0x20
push eax
call fcn.00460090
add esp, 0x18
lea ecx, [esi + 0x29c]
lea eax, [edi + 0x149]
mov dword [ebp + 8], 0x14
mov dl, byte [eax]
cmp dl, 0xff
sete bl
dec bl
and bl, dl
inc eax
mov byte [ecx], bl
inc ecx
dec dword [ebp + 8]
jne 0x439441
mov byte [esi + 0x2b0], 0
movzx ebx, byte [edi + 0x15e]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x43946f
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x439486
push ebx
lea eax, [esi + 0x7c]
push 0x7f
push eax
call fcn.005635a0
add esp, 0xc
mov eax, ebx
mov cl, byte [edi + 0x15f]
mov byte [eax + esi + 0x7c], cl
lea eax, [esi + 0x19c]
push eax
add esi, 0x7c
push esi
call fcn.004312f4
pop ecx
pop ecx
call fcn.005651da
ret 4