The string array is not wrapped in a function before 2.19.0. Hence, it's not suitable to identify the string array directly, and the fallback mode is made for this situation. However, the previous fallback mode cannot match the rotate function correctly in some cases (e.g. #50 ).
I have reworked this part based on the source code. The new method will traverse the CallExpression instead, which is the surface of the RotateFunction. After finding the RotateFunction, we can identify the StringArray and StringArrayCallsWrapper.
Besides, we have to identify three versions of StringArrayCallsWrapper:
javascript-obfuscator/javascript-obfuscator@c940f0c0020d0968924b7f8348c62564a7aafff0 (v < 2.12.0)
javascript-obfuscator/javascript-obfuscator@4f9df91320f37a412360ac2a2004b6a07a56d941 (2.12.0 <= v < 2.15.4)
javascript-obfuscator/javascript-obfuscator@5683e75a9148585c7efc0d3f48ea225b83cc1e3e (2.15.4 <= v < 2.19.0)
The string array is not wrapped in a function before 2.19.0. Hence, it's not suitable to identify the string array directly, and the fallback mode is made for this situation. However, the previous fallback mode cannot match the rotate function correctly in some cases (e.g. #50 ).
I have reworked this part based on the source code. The new method will traverse the
CallExpression
instead, which is the surface of the RotateFunction. After finding the RotateFunction, we can identify the StringArray and StringArrayCallsWrapper.Besides, we have to identify three versions of
StringArrayCallsWrapper
: