Function at 0x40e82f
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0x14
mov eax, 0x55ba2c
call fcn.00531d28
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0xc]
movzx eax, byte [edi + 2]
sub eax, 0x10
push 0x20
pop ebx
je 0x40e857
dec eax
jne 0x40e869
push str.LPDDR4X
jmp 0x40e85c
push str.LPDDR4
lea eax, [esi + 0x1c]
push ebx
push eax
call fcn.00531f88
add esp, 0xc
mov dword [esi + 0x18], 0xa
movzx eax, byte [edi + 3]
and eax, 0xf
cmp eax, 7
je 0x40e888
cmp eax, 0xe
jne 0x40e89d
push str.Soldered
jmp 0x40e88d
push str.LP_DIMM
lea eax, [esi + 0x2e4]
push ebx
push eax
call fcn.00415470
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.0x40e8bb
jmp dword [eax*4 + 0x40f31f]
mov dword [ebp + 8], 0x100
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x200
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x400
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x800
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x1000
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x2000
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x4000
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x8000
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x3000
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x6000
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0xc00
jmp case.default.0x40e8bb
mov dword [ebp + 8], 0x1800
jmp case.default.0x40e8bb
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.0x40e947
jmp dword [eax*4 + 0x40f353]
mov dword [ebp - 0x10], 1
jmp case.default.0x40e947
mov dword [ebp - 0x10], 2
jmp case.default.0x40e947
mov dword [ebp - 0x10], 3
jmp case.default.0x40e947
mov dword [ebp - 0x10], 4
jmp case.default.0x40e947
mov dword [ebp - 0x10], 5
jmp case.default.0x40e947
mov dword [ebp - 0x10], 6
jmp case.default.0x40e947
mov dword [ebp - 0x10], edx
jmp case.default.0x40e947
mov dword [ebp - 0x10], 8
shr ecx, 2
and ecx, 3
sub ecx, 0
je 0x40e9aa
dec ecx
je 0x40e9a5
dec ecx
jne 0x40e9ad
push 4
jmp 0x40e9a7
push 2
pop ebx
jmp 0x40e9ad
xor ebx, ebx
inc ebx
movzx ecx, byte [edi + 0xc]
mov eax, ecx
and eax, edx
sub eax, 0
je 0x40e9de
dec eax
je 0x40e9d5
dec eax
je 0x40e9cc
dec eax
jne 0x40e9e5
mov dword [ebp - 0x20], 0x20
jmp 0x40e9e5
mov dword [ebp - 0x20], 0x10
jmp 0x40e9e5
mov dword [ebp - 0x20], 8
jmp 0x40e9e5
mov dword [ebp - 0x20], 4
shr ecx, 3
and ecx, edx
cmp ecx, edx
ja case.default.0x40e9ee
jmp dword [ecx*4 + 0x40f373]
mov dword [esi + 0x320], 1
jmp case.default.0x40e9ee
mov dword [esi + 0x320], 2
jmp case.default.0x40e9ee
mov dword [esi + 0x320], 3
jmp case.default.0x40e9ee
mov dword [esi + 0x320], 4
jmp case.default.0x40e9ee
mov dword [esi + 0x320], 5
jmp case.default.0x40e9ee
mov dword [esi + 0x320], 6
jmp case.default.0x40e9ee
mov dword [esi + 0x320], edx
jmp case.default.0x40e9ee
mov dword [esi + 0x320], 8
movzx ecx, byte [edi + 0xd]
mov eax, ecx
and eax, edx
sub eax, 0
je 0x40ea80
dec eax
je 0x40ea77
dec eax
je 0x40ea6e
dec eax
jne 0x40ea87
mov dword [ebp - 0x1c], 0x40
jmp 0x40ea87
mov dword [ebp - 0x1c], 0x20
jmp 0x40ea87
mov dword [ebp - 0x1c], 0x10
jmp 0x40ea87
mov dword [ebp - 0x1c], 8
shr ecx, 5
sub ecx, 0
je 0x40eabf
dec ecx
je 0x40eab6
dec ecx
je 0x40eaad
dec ecx
je 0x40eaa4
dec ecx
jne 0x40eac6
mov dword [ebp - 0x14], 8
jmp 0x40eac6
mov dword [ebp - 0x14], 4
jmp 0x40eac6
mov dword [ebp - 0x14], 3
jmp 0x40eac6
mov dword [ebp - 0x14], 2
jmp 0x40eac6
mov dword [ebp - 0x14], 1
push dword [ebp + 8]
call fcn.00403350
pop ecx
test eax, eax
je 0x40eb37
push dword [ebp - 0x1c]
call fcn.00403350
pop ecx
test eax, eax
je 0x40eb37
push dword [ebp - 0x20]
call fcn.00403350
pop ecx
test eax, eax
je 0x40eb37
push dword [ebp - 0x10]
call fcn.00403350
pop ecx
test eax, eax
je 0x40eb37
push dword [ebp - 0x14]
call fcn.00403350
pop ecx
test eax, eax
je 0x40eb37
push ebx
call fcn.00403350
pop ecx
test eax, eax
je 0x40eb37
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 [0x566018]
fstp dword [ebp + 8]
fld dword [ebp + 8]
mov dword [ebp + 8], eax
fild dword [ebp + 8]
fmul qword [0x5662a8]
faddp st(1)
fstp dword [ebp + 8]
fld dword [ebp + 8]
fdivr qword [0x564990]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [esp]
call fcn.00404790
call fcn.00531ff0
fld dword [ebp + 8]
fadd st(0), st(0)
mov dword [esi + 0x330], eax
fmul qword [0x566010]
fdiv qword [0x565fb0]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fstp dword [esp]
call fcn.00404790
call fcn.00531ff0
fild dword [esi + 0x330]
imul eax, eax, 0x64
fadd st(0), st(0)
mov dword [esi + 0x32c], eax
call fcn.00531ff0
push eax
push str.LPDDR4__d
lea eax, [esi + 0x3c]
push 0x20
push eax
call fcn.00415470
add esp, 0x14
test byte [edi + 0x14], 1
push 0xc
pop ebx
je 0x40ec1f
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
and dword [ebp - 4], 0
test eax, eax
je 0x40ec04
mov ecx, eax
call fcn.004047aa
jmp 0x40ec06
xor eax, eax
fld dword [0x5661ac]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 2
je 0x40ec5e
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x40ec43
mov ecx, eax
call fcn.004047aa
jmp 0x40ec45
xor eax, eax
fld dword [0x566090]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 4
je 0x40ec9d
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x40ec82
mov ecx, eax
call fcn.004047aa
jmp 0x40ec84
xor eax, eax
fld dword [0x566088]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 8
je 0x40ecdc
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x40ecc1
mov ecx, eax
call fcn.004047aa
jmp 0x40ecc3
xor eax, eax
fld dword [0x566084]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x10
je 0x40ed1b
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 4
test eax, eax
je 0x40ed00
mov ecx, eax
call fcn.004047aa
jmp 0x40ed02
xor eax, eax
fld dword [0x566080]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x20
je 0x40ed5a
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 5
test eax, eax
je 0x40ed3f
mov ecx, eax
call fcn.004047aa
jmp 0x40ed41
xor eax, eax
fld dword [0x56607c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x40
je 0x40ed99
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 6
test eax, eax
je 0x40ed7e
mov ecx, eax
call fcn.004047aa
jmp 0x40ed80
xor eax, eax
fld dword [0x566078]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x14], 0x80
je 0x40edd8
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 7
test eax, eax
je 0x40edbd
mov ecx, eax
call fcn.004047aa
jmp 0x40edbf
xor eax, eax
fld dword [0x566070]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
mov al, byte [edi + 0x15]
test al, al
je 0x40efd5
test al, 1
je 0x40ee20
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 8
test eax, eax
je 0x40ee05
mov ecx, eax
call fcn.004047aa
jmp 0x40ee07
xor eax, eax
fld dword [0x566068]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 2
je 0x40ee5f
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 9
test eax, eax
je 0x40ee44
mov ecx, eax
call fcn.004047aa
jmp 0x40ee46
xor eax, eax
fld dword [0x566060]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 4
je 0x40ee9e
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xa
test eax, eax
je 0x40ee83
mov ecx, eax
call fcn.004047aa
jmp 0x40ee85
xor eax, eax
fld dword [0x5660c4]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 8
je 0x40eedd
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xb
test eax, eax
je 0x40eec2
mov ecx, eax
call fcn.004047aa
jmp 0x40eec4
xor eax, eax
fld dword [0x5660bc]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x10
je 0x40ef18
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], ebx
test eax, eax
je 0x40eefd
mov ecx, eax
call fcn.004047aa
jmp 0x40eeff
xor eax, eax
fld dword [0x5660b4]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x20
je 0x40ef57
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xd
test eax, eax
je 0x40ef3c
mov ecx, eax
call fcn.004047aa
jmp 0x40ef3e
xor eax, eax
fld dword [0x566160]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x40
je 0x40ef96
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xe
test eax, eax
je 0x40ef7b
mov ecx, eax
call fcn.004047aa
jmp 0x40ef7d
xor eax, eax
fld dword [0x56615c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x15], 0x80
je 0x40efd5
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0xf
test eax, eax
je 0x40efba
mov ecx, eax
call fcn.004047aa
jmp 0x40efbc
xor eax, eax
fld dword [0x566158]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
mov al, byte [edi + 0x16]
test al, al
je 0x40f0da
test al, 1
je 0x40f01d
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x10
test eax, eax
je 0x40f002
mov ecx, eax
call fcn.004047aa
jmp 0x40f004
xor eax, eax
fld dword [0x566154]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x16], 4
je 0x40f05c
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x11
test eax, eax
je 0x40f041
mov ecx, eax
call fcn.004047aa
jmp 0x40f043
xor eax, eax
fld dword [0x56614c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x16], 0x10
je 0x40f09b
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x12
test eax, eax
je 0x40f080
mov ecx, eax
call fcn.004047aa
jmp 0x40f082
xor eax, eax
fld dword [0x566144]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
test byte [edi + 0x16], 0x40
je 0x40f0da
push ebx
call fcn.005120bc
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0x13
test eax, eax
je 0x40f0bf
mov ecx, eax
call fcn.004047aa
jmp 0x40f0c1
xor eax, eax
fld dword [0x56613c]
or dword [ebp - 4], 0xffffffff
fstp dword [eax + 4]
mov ecx, dword [esi + 0x338]
push eax
call fcn.00409837
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 [0x566018]
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 [0x5662a8]
faddp st(1)
fstp dword [ebp - 0x1c]
call fcn.00404ce9
jmp 0x40f169
fldz
fcomp dword [ecx + 4]
fnstsw ax
test ah, 5
jp 0x40f161
fld dword [ebp - 0x1c]
fdiv dword [ecx + 4]
fstp dword [ebp + 8]
fld dword [ebp + 8]
fdivr qword [0x564990]
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 0x40f161
fld dword [ebp - 0x20]
fstp dword [ecx + 8]
lea ecx, [ebp - 0x18]
call fcn.005105ae
mov ecx, eax
test ecx, ecx
jne 0x40f11c
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 [0x566018]
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 [0x5662a8]
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 0x40f317
movzx ebx, byte [edi + 0x140]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x40f1f8
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x40f20f
push ebx
lea eax, [esi + 0x5c]
push 0x7f
push eax
call fcn.00530830
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.004071fd
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 0x564894
mov dword [esi + 0x2e0], eax
lea eax, [esi + 0x2bc]
push 0x20
push eax
call fcn.00415470
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 0x40f2b6
mov byte [esi + 0x2b0], 0
movzx ebx, byte [edi + 0x15e]
and ebx, 0x7f
cmp ebx, 0xf
jle 0x40f2e4
push 0xf
pop ebx
xor eax, eax
test ebx, ebx
jle 0x40f2fb
push ebx
lea eax, [esi + 0x7c]
push 0x7f
push eax
call fcn.00530830
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.004071fd
pop ecx
pop ecx
call fcn.00531e00
ret 4