Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeobfuscatorHelper_getCharAt Error: IndexError: string index out of range #15

Closed
KMKINGMAN opened this issue Jul 13, 2023 · 5 comments
Closed
Labels
bug Something isn't working windows

Comments

@KMKINGMAN
Copy link

i got this error when i try to use your deobfuscator

D: getString method signature: Lio/michaelrocks/paranoid/Deobfuscator$app$Release;->getString(J)Ljava/lang/String;
I: Searching for getString() calls...
Traceback (most recent call last):
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\__main__.py", line 208, in <module>
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\__main__.py", line 106, in main
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\paranoid.py", line 116, in deobfuscate_strings
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\deobfuscator.py", line 59, in DeobfuscatorHelper_getString
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\deobfuscator.py", line 74, in DeobfuscatorHelper_getCharAt
IndexError: string index out of range

i try to edit a function to

def DeobfuscatorHelper_getCharAt(char_index, chunks, state):
    next_state = RandomHelper_next(state)
    chunk = chunks[int(char_index / MAX_CHUNK_LENGTH)]

    print("char_index:", char_index)
    print("chunks:", chunks)
    print("chunk:", chunk)

    try:
        encoded_chunk = chunk[int(char_index % MAX_CHUNK_LENGTH)].encode("utf-16", "surrogatepass")
        print("encoded_chunk:", encoded_chunk)

        char_value = np.frombuffer(encoded_chunk[2:], dtype=np.uint16)[0]
        print("char_value:", char_value)

        xor_result = np.uint64(next_state) ^ (np.uint64(char_value) << np.uint16(32))
        print("xor_result:", xor_result)

        return np.int64(xor_result)

    except IndexError:
        print("IndexError: string index out of range")
        raise

i got

I: Searching for getString() calls...
Traceback (most recent call last):
  File "C:\Users\KINGMAN\Documents\android_tool\deobf\paranoid_deobfuscator\__main__.py", line 208, in <module>
    main(args)
  File "C:\Users\KINGMAN\Documents\android_tool\deobf\paranoid_deobfuscator\__main__.py", line 106, in main
    deobfuscated = deobfuscator.deobfuscate_strings(
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\paranoid.py", line 116, in deobfuscate_strings
    DeobfuscatorHelper_getString(string_id, chunks)
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\deobfuscator.py", line 59, in DeobfuscatorHelper_getString
    state = DeobfuscatorHelper_getCharAt(index + x + 1, chunks, state)
  File "C:\Users\KINGMAN\AppData\Local\Programs\Python\Python310\lib\site-packages\paranoid_deobfuscator-2.0.0-py3.10.egg\paranoid_deobfuscator\deobfuscator.py", line 74, in DeobfuscatorHelper_getCharAt
    encoded_chunk = chunk[int(char_index % MAX_CHUNK_LENGTH)].encode("utf-16", "surrogatepass")
IndexError: string index out of range
@giacomoferretti
Copy link
Owner

This is probably related to #14. You are on Windows, right?

Can you test it in WSL or Linux?

@giacomoferretti giacomoferretti added bug Something isn't working waiting for issuer labels Jul 13, 2023
@KMKINGMAN
Copy link
Author

I tried it on Ubuntu and it worked, but before that I created this script to manually deobfuscate files on Windows
i also use jdax

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.math.BigInteger;

public class Deobfuscator {
    public static void main(String[] args) {
        String inputFilePath = "input.java";
        String outputFilePath = "output.java";

        try {
            String code = readFile(inputFilePath);
            String modifiedCode = replaceMethodInvocations(code);
            writeFile(outputFilePath, modifiedCode);
            System.out.println("Output file created successfully.");
        } catch (IOException e) {
            System.err.println("An error occurred: " + e.getMessage());
        }
    }

    private static String readFile(String filePath) throws IOException {
        StringBuilder code = new StringBuilder();
        try (BufferedReader reader = new BufferedReader(new FileReader(filePath))) {
            String line;
            while ((line = reader.readLine()) != null) {
                code.append(line).append("\n");
            }
        }
        return code.toString();
    }

    private static void writeFile(String filePath, String content) throws IOException {
        try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
            writer.write(content);
        }
    }

    private static String replaceMethodInvocations(String code) {
        Pattern pattern = Pattern.compile("Deobfuscator\\$app\\$Release\\.getString\\(([^)]*)\\)");
        Matcher matcher = pattern.matcher(code);
        StringBuffer buffer = new StringBuffer();
        while (matcher.find()) {
            String methodInvocation = matcher.group();
            String replacement = getStringFromMethodInvocation(methodInvocation);
            matcher.appendReplacement(buffer, Matcher.quoteReplacement("\"" + replacement + "\""));
        }
        matcher.appendTail(buffer);
        return buffer.toString();
    }

    private static String getStringFromMethodInvocation(String methodInvocation) {
        int startIndex = methodInvocation.indexOf("(");
        int endIndex = methodInvocation.lastIndexOf(")");
        String argument = methodInvocation.substring(startIndex + 1, endIndex);
        if (argument.endsWith("L")) {
            argument = argument.substring(0, argument.length() - 1);
        }
        long argumentValue;
        if (argument.startsWith("-")) {
            argumentValue = -Long.parseLong(argument.substring(1));
        } else {
            argumentValue = Long.parseLong(argument);
        }
        System.out.println(argumentValue);
        return DeObf.getString(argumentValue);
    }
}

public class DeobfuscatorHelper {
  public static final int MAX_CHUNK_LENGTH = 0x1fff;

  private DeobfuscatorHelper() {
    // Cannot be instantiated.
  }

  public static String getString(final long id, final String[] chunks) {
    long state = RandomHelper.seed(id & 0xffffffffL);
    state = RandomHelper.next(state);
    final long low = (state >>> 32) & 0xffff;
    state = RandomHelper.next(state);
    final long high = (state >>> 16) & 0xffff0000;
    final int index = (int) ((id >>> 32) ^ low ^ high);
    state = getCharAt(index, chunks, state);
    final int length = (int) ((state >>> 32) & 0xffffL);
    final char[] chars = new char[length];

    for (int i = 0; i < length; ++i) {
      state = getCharAt(index + i + 1, chunks, state);
      chars[i] = (char) ((state >>> 32) & 0xffffL);
    }

    return new String(chars);
  }

  private static long getCharAt(final int charIndex, final String[] chunks, final long state) {
    final long nextState = RandomHelper.next(state);
    final String chunk = chunks[charIndex / MAX_CHUNK_LENGTH];
    return nextState ^ ((long) chunk.charAt(charIndex % MAX_CHUNK_LENGTH) << 32);
  }
}

class DeObf {
    private static final String[] chunks;

    static {
        String[] strArr = {"\ub4ad\uffa0\uff93\u660a\u9521\u11e5\ufb24\u29f2\u036b\u11f2\ufb3d\u29f2\ub4af\uff93\uff90\u6602\u9525\u11e7\ufb31\u29a6\u0368\u11e5\ub4b5\uff93\uff90\u6602\u9525\u11e7\ufb31\u29a6\u0368\u11e4\ufb65\u29e5\u0337\u11e7\ufb36\u29ee\u0365\u11ab\ufb23\u29a6\ub4b7\uff90\uff91\u662c\u9528\u11ef\ufb31\u29c7\u0335\u11f6\ufb06\u29e9\u032b\u11f2\ufb20\u29fe\u0331\u11a6\ub4a7\uffdf\ub4aa\uffb2\uff9e\u660c\u9528\u11c7\ufb26\u29f2\u032c\u11f0\ufb2c\u29f2\u033c\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4b7\uff9e\uff8b\u6611\u9527\u11e5\ufb2d\u29c4\u0324\u11f5\ufb20\u29c5\u032a\u11e8\ufb31\u29e3\u033d\u11f2\ub4ae\uffba\uff8d\u6617\u9529\u11f4\ufb65\u29bc\u0365\ub4aa\uffba\uff9e\u6616\u953f\u11a6\ufb13\u29ef\u0326\u11f2\ufb2a\u29f4\u033c\ub4ae\uff9e\uff9c\u6611\u952f\u11f0\ufb2c\u29f2\u033c\ub4b4\uff8f\uff8d\u660a\u9525\u11e3\ufb36\u29f5\u030b\u11e7\ufb28\u29e3\u0365\u11bb\ufb65\u29e8\u0330\u11ea\ufb29\ub4a7\uffdf\ub4a7\uffdf\ub4a7\uffdf\ub4ab\uffdf\uffb3\u660a\u9528\u11e2\ufb2a\u29e8\u0365\u11ae\ufb74\u29b6\u0375\u11af\ub4ab\uffdf\uffac\u661c\u9522\u11e8\ufb20\u29ff\u0365\u11ae\ufb77\u29b6\u0375\u11af\ub4aa\uffdf\uffb3\u660c\u9535\u11e4\ufb2a\u29e8\u0365\u11ae\ufb74\u29cd\u036c\ub4ad\uffdf\uffab\u660a\u952d\u11ff\ufb2a\u29a6\u036d\u11b3\ufb0e\u29af\ub4b6\uffdf\uffb3\u6604\u9535\u11a6\ufb13\u29e3\u0322\u11e7\ufb36\u29a6\u036d\u11b4\ufb75\u29cd\u036c\ub4a9\uffdf\uffb5\u6604\u952d\u11e7\ufb37\u29f2\u0324\u11a6\ufb6d\u29b7\u0375\u11b6\ufb0e\u29af\ub4a9\uffdf\uffab\u660a\u9534\u11e9\ufb2b\u29f2\u032a\u11a6\ufb6d\u29b4\u0375\u11b6\ufb0e\u29af\ub4ab\uffdf\uffbc\u6604\u952f\u11f4\ufb2a\u29a6\u036d\u11b3\ufb75\u29b6\u030e\u11af\ub4ad\uffdf\uffbb\u6610\u9524\u11e7\ufb2c\u29a6\u036d\u11b7\ufb08\u29af\ub4a8\uffdf\uffac\u660d\u9527\u11e8\ufb22\u29ee\u0324\u11ef\ufb65\u29ae\u0377\u11cb\ufb6c\ub4b5\uffdf\uffaf\u6604\u9534\u11ef\ufb36\u29a6\u0306\u11ee\ufb24\u29f2\u0320\u11e7\ufb30\u29a6\u036d\u11b3\ufb08\u29af\ub4ac\uffdf\uffad\u660a\u952b\u11e3\ufb65\u29ae\u037d\u11cb\ufb6c\ub4a8\uffdf\uffbd\u6604\u9528\u11e1\ufb2e\u29e9\u032e\u11a6\ufb6d\u29b7\u0375\u11cb\ufb6c\ub4aa\uffdf\uffac\u6600\u9529\u11f3\ufb29\u29a6\u036d\u11b4\ufb75\u29cb\u036c\ub4ab\uffdf\uffb2\u6610\u952b\u11e4\ufb24\u29ef\u0365\u11ae\ufb76\u29b6\u0308\u11af\ub4ab\uffdf\uffbd\u6600\u9534\u11ea\ufb2c\u29e8\u0365\u11ae\ufb70\u29b6\u0308\u11af\ub4a8\uffdf\uffa9\u6600\u9528\u11ef\ufb26\u29e3\u0365\u11ae\ufb74\u29b3\u0375\u11cb\ufb6c\ub4b5\uffdf\uffab\u6617\u9529\u11ea\ufb29\u29a6\u0331\u11e7\ufb27\u29ea\u0320\u11a6\ufb6d\u29e0\u0337\u11e3\ufb20\u29af\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4a9\uff9c\uff8a\u6617\u9534\u11e3\ufb2b\u29f2\u0304\u11e5\ufb31\u29ef\u0333\u11ef\ufb31\u29ff\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4a9\uff9c\uff8a\u6617\u9534\u11e3\ufb2b\u29f2\u0304\u11e5\ufb31\u29ef\u0333\u11ef\ufb31\u29ff\ub4aa\uffb2\uff9e\u660c\u9528\u11c7\ufb26\u29f2\u032c\u11f0\ufb2c\u29f2\u033c\ub4a2\uff92\uff9e\u660c\u9528\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4a0\uff88\uff96\u660b\u9522\u11e9\ufb32\ub4ac\uff9e\uff8a\u6611\u9529\u11c7\ufb26\u29f2\u032c\u11e9\ufb2b\ub4aa\uffba\uff9e\u6616\u953f\u11a6\ufb13\u29ef\u0326\u11f2\ufb2a\u29f4\u033c\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4ad\uffba\uff9e\u6616\u953f\u11d0\ufb2c\u29e5\u0331\u11e9\ufb37\u29ff\ub4aa\uffba\uff9e\u6616\u953f\u11a6\ufb13\u29ef\u0326\u11f2\ufb2a\u29f4\u033c\ub4b1\uffb2\uff9e\u660e\u952f\u11e8\ufb22\u29a6\u0320\u11f5\ufb35\u29a6\u0333\u11ef\ufb20\u29f1\u0365\u11f0\ufb2c\u29f5\u032c\u11e4\ufb29\u29e3\ub4bf\uffb2\uff9e\u660e\u952f\u11e8\ufb22\u29a6\u0320\u11f5\ufb35\u29a6\u0333\u11ef\ufb20\u29f1\u0365\u11ef\ufb2b\u29f0\u032c\u11f5\ufb2c\u29e4\u0329\u11e3\ub4aa\uffba\uff9e\u6616\u953f\u11a6\ufb13\u29ef\u0326\u11f2\ufb2a\u29f4\u033c\ub4aa\uff96\uff91\u6615\u9533\u11f2\ufb1a\u29eb\u0320\u11f2\ufb2d\u29e9\u0321\ub487\uff98\uff9a\u6611\u950f\u11e8\ufb35\u29f3\u0331\u11cb\ufb20\u29f2\u032d\u11e9\ufb21\u29d1\u032c\u11e8\ufb21\u29e9\u0332\u11d0\ufb2c\u29f5\u032c\u11e4\ufb29\u29e3\u030d\u11e3\ufb2c\u29e1\u032d\u11f2\ub4aa\uffba\uff9e\u6616\u953f\u11a6\ufb13\u29ef\u0326\u11f2\ufb2a\u29f4\u033c\ub4b9\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb23\u29f4\u0324\u11eb\ufb20\u29f1\u032a\u11f4\ufb2e\u29a8\u0308\u11ef\ufb2b\u29ef\u0326\u11ea\ufb2c\u29f6\ub4ad\uff98\uff9a\u6611\u9507\u11e5\ufb31\u29ef\u0333\u11ef\ufb31\u29ff\ub489\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb32\u29ef\u032b\u11e2\ufb2a\u29f1\u0328\u11e7\ufb2b\u29e7\u0322\u11e3\ufb37\u29a8\u030b\u11e7\ufb31\u29ef\u0333\u11e3\ufb12\u29ef\u032b\u11e2\ufb2a\u29f1\u0317\u11e3\ufb2b\u29e2\u0320\u11f4\ufb20\u29f4\ub4ab\uff92\uffae\u6610\u9523\u11f3\ufb20\u29e2\u0300\u11f0\ufb20\u29e8\u0331\u11f5\ub4a1\uff93\uff96\u6607\u9527\u11a8\ufb36\u29e9\ub4a0\uff88\uff96\u660b\u9522\u11e9\ufb32\ub4ae\uffb7\uffb7\u665f\u952b\u11eb\ufb7f\u29f5\u0336\ub4b2\uff98\uffaf\u6617\u9523\u11e2\ufb2c\u29e5\u0331\u11ef\ufb2a\u29e8\u0301\u11f4\ufb24\u29f1\u0315\u11e9\ufb32\u29e3\u0337\ub4ac\uff9e\uff8a\u6611\u9529\u11c7\ufb26\u29f2\u032c\u11e9\ufb2b\ub4a9\uff98\uffb3\u660c\u9528\u11e3\ufb36\u29d2\u032d\u11ef\ufb26\u29ed\u032b\u11e3\ufb36\u29f5\ub4b4\uff98\uffb3\u660c\u9528\u11e3\ufb36\u29d2\u0337\u11e7\ufb2b\u29f5\u0335\u11e7\ufb37\u29e3\u032b\u11e5\ufb3c\ub4a8\uff98\uffbe\u660b\u9521\u11ea\ufb20\u29d5\u0331\u11e3\ufb35\u29d5\u032c\u11fc\ufb20\ub4b1\uff98\uffbb\u660a\u9519\u11ef\ufb29\u29ea\u0320\u11e1\ufb24\u29ea\u031a\u11e4\ufb37\u29e3\u0324\u11ed\ufb1a\u29e7\u0323\u11f2\ufb20\u29f4\ub4b2\uff98\uffaf\u6617\u9523\u11e2\ufb2c\u29e5\u0331\u11ef\ufb2a\u29e8\u0301\u11f4\ufb24\u29f1\u0315\u11e9\ufb32\u29e3\u0337\ub4a9\uff98\uffb3\u660c\u9528\u11e3\ufb36\u29d2\u032d\u11ef\ufb26\u29ed\u032b\u11e3\ufb36\u29f5\ub4b4\uff98\uffb3\u660c\u9528\u11e3\ufb36\u29d2\u0337\u11e7\ufb2b\u29f5\u0335\u11e7\ufb37\u29e3\u032b\u11e5\ufb3c\ub4a8\uff98\uffbe\u660b\u9521\u11ea\ufb20\u29d5\u0331\u11e3\ufb35\u29d5\u032c\u11fc\ufb20\ub4b1\uff98\uffbb\u660a\u9519\u11ef\ufb29\u29ea\u0320\u11e1\ufb24\u29ea\u031a\u11e4\ufb37\u29e3\u0324\u11ed\ufb1a\u29e7\u0323\u11f2\ufb20\u29f4\ub4ac\uff9e\uff8a\u6611\u9529\u11c7\ufb26\u29f2\u032c\u11e9\ufb2b\ub4a0\uff88\uff96\u660b\u9522\u11e9\ufb32\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4ae\uff99\uff9a\u6604\u9532\u11f3\ufb37\u29e3\u0336\ub4a6\ub4a6\ub4a6\ub4ad\uffba\uff9e\u6616\u953f\u11d0\ufb2c\u29e5\u0331\u11e9\ufb37\u29ff\ub4ad\uffba\uff9e\u6616\u953f\u11d0\ufb2c\u29e5\u0331\u11e9\ufb37\u29ff\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub488\uff92\uff9e\u6617\u952d\u11e3\ufb31\u29bc\u036a\u11a9\ufb21\u29e3\u0331\u11e7\ufb2c\u29ea\u0336\u11b9\ufb2c\u29e2\u0378\u11e5\ufb2a\u29eb\u036b\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub4ee\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11f6\ufb29\u29e7\u033c\u11a8\ufb22\u29e9\u032a\u11e1\ufb29\u29e3\u036b\u11e5\ufb2a\u29eb\u036a\u11f5\ufb31\u29e9\u0337\u11e3\ufb6a\u29e7\u0335\u11f6\ufb36\u29a9\u0321\u11e3\ufb31\u29e7\u032c\u11ea\ufb36\u29b9\u032c\u11e2\ufb78\u29e5\u032a\u11eb\ufb6b\u29eb\u032c\u11e8\ufb2c\u29e5\u0329\u11ef\ufb35\u29a8\u0320\u11ef\ufb22\u29ee\u0331\u11e4\ufb24\u29ea\u0329\u11f6\ufb2a\u29e9\u0329\ub4a3\uff8f\uff90\u6612\u9523\u11f4\ub4a1\uffac\uff8a\u6606\u9525\u11e3\ufb36\u29f5\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4a3\uff9e\uff8d\u6608\u9570\u11b2\ub4a3\uff9e\uff8d\u6608\u9570\u11b2\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub481\uff9e\uff8f\u6615\u952a\u11ef\ufb26\u29e7\u0331\u11ef\ufb2a\u29e8\u036a\u11f0\ufb2b\u29e2\u036b\u11e7\ufb2b\u29e2\u0337\u11e9\ufb2c\u29e2\u036b\u11f6\ufb24\u29e5\u032e\u11e7\ufb22\u29e3\u0368\u11e7\ufb37\u29e5\u032d\u11ef\ufb33\u29e3\ub4ba\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29c2\u0300\u11ca\ufb00\u29d2\u0300\ub4ae\uff8f\uff9e\u6606\u952d\u11e7\ufb22\u29e3\u037f\ub4a4\uffcc\uffcd\ub4ae\uff8a\uff8c\u6600\u9534\u11e8\ufb24\u29eb\u0320\ub4a1\uffac\uffbb\u662e\u9519\u11cf\ufb0b\u29d2\ub4a3\uffbd\uffb0\u6624\u9514\u11c2\ub4a3\uffbd\uffad\u6624\u9508\u11c2\ub4a3\uffb2\uffb0\u6621\u9503\u11ca\ub4a0\uffbb\uffba\u6633\u950f\u11c5\ufb00\ub4aa\uffb2\uffbe\u662b\u9513\u11c0\ufb04\u29c5\u0311\u11d3\ufb17\u29c3\u0317\ub4a4\uffa4\uffdf\ub4a7\uffdf\ub4a7\uffa2\ub4a8\uffac\uffaa\u6635\u9516\u11c9\ufb17\u29d2\u0300\u11c2\ufb1a\u29c7\u0307\u11cf\ufb16\ub4a8\uff8c\uff9a\u6609\u9523\u11e5\ufb31\u29d9\u0326\u11e9\ufb2b\u29f2\u0320\u11e8\ufb31\ub4ac\uff9e\uff8c\u6616\u952f\u11f5\ufb31\u29a8\u0324\u11f6\ufb2e\ub4ac\uff9e\uff8c\u6616\u952f\u11f5\ufb31\u29a8\u0324\u11f6\ufb2e\ub4a7\uffc5\ub4b5\uff9c\uff90\u6608\u9568\u11e0\ufb24\u29e5\u0320\u11e4\ufb2a\u29e9\u032e\u11a8\ufb2e\u29e7\u0331\u11e7\ufb2b\u29e7\ub4b4\uff9c\uff90\u6608\u9568\u11e7\ufb2b\u29e2\u0337\u11e9\ufb2c\u29e2\u036b\u11e5\ufb2d\u29f4\u032a\u11eb\ufb20\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub48f\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11f6\ufb20\u29f4\u0328\u11ef\ufb36\u29f5\u032c\u11e9\ufb2b\u29a8\u0312\u11d4\ufb0c\u29d2\u0300\u11d9\ufb00\u29de\u0311\u11c3\ufb17\u29c8\u0304\u11ca\ufb1a\u29d5\u0311\u11c9\ufb17\u29c7\u0302\u11c3\ub4a3\uff9e\uff8d\u6608\u9570\u11b2\ub4a3\uff9e\uff8d\u6608\u9570\u11b2\ub4a4\uffcc\uffcd\ub4a4\uffcc\uffcd\ub4a3\uff8f\uff90\u6612\u9523\u11f4\ub493\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11f5\ufb20\u29f2\u0331\u11ef\ufb2b\u29e1\u0336\u11a8\ufb17\u29c3\u0314\u11d3\ufb00\u29d5\u0311\u11d9\ufb0c\u29c1\u030b\u11c9\ufb17\u29c3\u031a\u11c4\ufb04\u29d2\u0311\u11c3\ufb17\u29df\u031a\u11c9\ufb15\u29d2\u030c\u11cb\ufb0c\u29dc\u0304\u11d2\ufb0c\u29c9\u030b\u11d5\ub4ae\uff8f\uff9e\u6606\u952d\u11e7\ufb22\u29e3\u037f\ub4a4\uffcc\uffcd\ub4a4\uffcc\uffcd\ub4aa\uff9c\uff90\u660b\u9528\u11e3\ufb26\u29f2\u032c\u11f0\ufb2c\u29f2\u033c\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub4be\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11e3\ufb24\u29f5\u033c\u11f0\ufb2c\u29e5\u0331\u11e9\ufb37\u29ff\u036b\u11f5\ufb2d\u29e9\u0335\ub4b8\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11e2\ufb2c\u29f5\u0326\u11e9\ufb37\u29e2\u036b\u11e1\ufb22\u29a9\u0320\u11e7\ufb36\u29ff\u0333\u11ef\ufb26\u29f2\u032a\u11f4\ufb3c\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub488\uff92\uff9e\u6617\u952d\u11e3\ufb31\u29bc\u036a\u11a9\ufb21\u29e3\u0331\u11e7\ufb2c\u29ea\u0336\u11b9\ufb2c\u29e2\u0378\u11e5\ufb2a\u29eb\u036b\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub4ee\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11f6\ufb29\u29e7\u033c\u11a8\ufb22\u29e9\u032a\u11e1\ufb29\u29e3\u036b\u11e5\ufb2a\u29eb\u036a\u11f5\ufb31\u29e9\u0337\u11e3\ufb6a\u29e7\u0335\u11f6\ufb36\u29a9\u0321\u11e3\ufb31\u29e7\u032c\u11ea\ufb36\u29b9\u032c\u11e2\ufb78\u29e5\u032a\u11eb\ufb6b\u29eb\u032c\u11e8\ufb2c\u29e5\u0329\u11ef\ufb35\u29a8\u0320\u11ef\ufb22\u29ee\u0331\u11e4\ufb24\u29ea\u0329\u11f6\ufb2a\u29e9\u0329\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4ae\uff8a\uff8c\u6600\u9534\u11e8\ufb24\u29eb\u0320\ub4ae\uff8f\uff9e\u6616\u9535\u11f1\ufb2a\u29f4\u0321\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4ae\uff8a\uff8c\u6600\u9534\u11e8\ufb24\u29eb\u0320\ub4ae\uff8f\uff9e\u6616\u9535\u11f1\ufb2a\u29f4\u0321\ub4a6\ub4a6\ub4af\uff8c\uff97\u660a\u9533\u11ea\ufb21\u29d5\u0320\u11f2\ub4ae\uff96\uff8c\u6635\u952f\u11e8\ufb16\u29e3\u0331\ub4a6\ub4a6\ub4a6\ub4bc\uff9c\uff90\u6608\u9568\u11eb\ufb2c\u29e8\u032c\u11e5\ufb29\u29ef\u0335\u11a8\ufb20\u29ef\u0322\u11ee\ufb31\u29e4\u0324\u11ea\ufb29\u29f6\u032a\u11e9\ufb29\ub4a2\uff9b\uff90\u660b\u9523\ub4a1\uffac\uff8a\u6606\u9525\u11e3\ufb36\u29f5\ub4ac\uff91\uff9e\u6611\u952f\u11f0\ufb20\u29ab\u0329\u11ef\ufb27\ub4ab\uffce\uffc9\u665d\u9571\u11be\ufb7d\u29b4\u037c\u11b7\ufb7c\u29b0\u0372\u11b4\ub4a7\uffdf\ub4ae\uff96\uff8c\u6635\u952f\u11e8\ufb16\u29e3\u0331\ub4ae\uff8c\uff9a\u6611\u9532\u11ef\ufb2b\u29e1\u0336\ub4ae\uff8c\uff9a\u6611\u9532\u11ef\ufb2b\u29e1\u0336\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4ae\uff8a\uff8c\u6600\u9534\u11e8\ufb24\u29eb\u0320\ub4ae\uff8f\uff9e\u6616\u9535\u11f1\ufb2a\u29f4\u0321\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4ae\uff8a\uff8c\u6600\u9534\u11e8\ufb24\u29eb\u0320\ub4ad\uff9c\uff8d\u6600\u9522\u11e3\ufb2b\u29f2\u032c\u11e7\ufb29\u29f5\ub4ae\uff8f\uff9e\u6616\u9535\u11f1\ufb2a\u29f4\u0321\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub4b2\uff92\uff9e\u6617\u952d\u11e3\ufb31\u29bc\u036a\u11a9\ufb21\u29e3\u0331\u11e7\ufb2c\u29ea\u0336\u11b9\ufb2c\u29e2\u0378\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub488\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11f6\ufb29\u29e7\u033c\u11a8\ufb22\u29e9\u032a\u11e1\ufb29\u29e3\u036b\u11e5\ufb2a\u29eb\u036a\u11f5\ufb31\u29e9\u0337\u11e3\ufb6a\u29e7\u0335\u11f6\ufb36\u29a9\u0321\u11e3\ufb31\u29e7\u032c\u11ea\ufb36\u29b9\u032c\u11e2\ufb78\ub4a0\uffca\uffd1\u6654\u9575\u11a8\ufb75\ub4be\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11e3\ufb24\u29f5\u033c\u11f0\ufb2c\u29e5\u0331\u11e9\ufb37\u29ff\u036b\u11f5\ufb2d\u29e9\u0335\ub4b8\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11e2\ufb2c\u29f5\u0326\u11e9\ufb37\u29e2\u036b\u11e1\ufb22\u29a9\u0320\u11e7\ufb36\u29ff\u0333\u11ef\ufb26\u29f2\u032a\u11f4\ufb3c\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub4b2\uff92\uff9e\u6617\u952d\u11e3\ufb31\u29bc\u036a\u11a9\ufb21\u29e3\u0331\u11e7\ufb2c\u29ea\u0336\u11b9\ufb2c\u29e2\u0378\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub488\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11f6\ufb29\u29e7\u033c\u11a8\ufb22\u29e9\u032a\u11e1\ufb29\u29e3\u036b\u11e5\ufb2a\u29eb\u036a\u11f5\ufb31\u29e9\u0337\u11e3\ufb6a\u29e7\u0335\u11f6\ufb36\u29a9\u0321\u11e3\ufb31\u29e7\u032c\u11ea\ufb36\u29b9\u032c\u11e2\ufb78\ub4b5\uff9c\uff90\u6608\u9568\u11e0\ufb24\u29e5\u0320\u11e4\ufb2a\u29e9\u032e\u11a8\ufb2e\u29e7\u0331\u11e7\ufb2b\u29e7\ub4b5\uff9c\uff90\u6608\u9568\u11e0\ufb24\u29e5\u0320\u11e4\ufb2a\u29e9\u032e\u11a8\ufb2e\u29e7\u0331\u11e7\ufb2b\u29e7\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub481\uff92\uff9e\u6617\u952d\u11e3\ufb31\u29bc\u036a\u11a9\ufb21\u29e3\u0331\u11e7\ufb2c\u29ea\u0336\u11b9\ufb2c\u29e2\u0378\u11e5\ufb2a\u29eb\u036b\u11e0\ufb24\u29e5\u0320\u11e4\ufb2a\u29e9\u032e\u11a8\ufb2e\u29e7\u0331\u11e7\ufb2b\u29e7\ub4bc\uff9e\uff91\u6601\u9534\u11e9\ufb2c\u29e2\u036b\u11ef\ufb2b\u29f2\u0320\u11e8\ufb31\u29a8\u0324\u11e5\ufb31\u29ef\u032a\u11e8\ufb6b\u29d0\u030c\u11c3\ufb12\ub4e7\uff97\uff8b\u6611\u9536\u11f5\ufb7f\u29a9\u036a\u11f6\ufb29\u29e7\u033c\u11a8\ufb22\u29e9\u032a\u11e1\ufb29\u29e3\u036b\u11e5\ufb2a\u29eb\u036a\u11f5\ufb31\u29e9\u0337\u11e3\ufb6a\u29e7\u0335\u11f6\ufb36\u29a9\u0321\u11e3\ufb31\u29e7\u032c\u11ea\ufb36\u29b9\u032c\u11e2\ufb78\u29e5\u032a\u11eb\ufb6b\u29e0\u0324\u11e5\ufb20\u29e4\u032a\u11e9\ufb2e\u29a8\u032e\u11e7\ufb31\u29e7\u032b\u11e7\ub4b5\uff9c\uff90\u6608\u9568\u11e0\ufb24\u29e5\u0320\u11e4\ufb2a\u29e9\u032e\u11a8\ufb2e\u29e7\u0331\u11e7\ufb2b\u29e7\ub4b5\uff9c\uff90\u6608\u9568\u11e0\ufb24\u29e5\u0320\u11e4\ufb2a\u29e9\u032e\u11a8\ufb2e\u29e7\u0331\u11e7\ufb2b\u29e7\ub4a1\uff8c\uff8a\u6606\u9525\u11e3\ufb36\u29f5\ub4a1\uff8c\uff8a\u6606\u9525\u11e3\ufb36\u29f5\ub4a6\ub4a1\uffac\uff8a\u6606\u9525\u11e3\ufb36\u29f5\ub4a5\uffc5\ufff5\u6645\ub4a5\uffc5\ufff5\u6645\ub4a0\uff88\uff96\u660b\u9522\u11e9\ufb32"};
        chunks = strArr;
    }

    public static String getString(long j) {
        return DeobfuscatorHelper.getString(j, chunks);
    }
}


public class RandomHelper {
  private RandomHelper() {
    // Cannot be instantiated.
  }

  public static long seed(final long x) {
    final long z = (x ^ (x >>> 33)) * 0x62a9d9ed799705f5L;
    return ((z ^ (z >>> 28)) * 0xcb24d0a5c88c35b3L) >>> 32;
  }

  public static long next(final long state) {
    short s0 = (short) (state & 0xffff);
    short s1 = (short) ((state >>> 16) & 0xffff);
    short next = s0;
    next += s1;
    next = rotl(next, 9);
    next += s0;

    s1 ^= s0;
    s0 = rotl(s0, 13);
    s0 ^= s1;
    s0 ^= (s1 << 5);
    s1 = rotl(s1, 10);

    long result = next;
    result <<= 16;
    result |= s1;
    result <<= 16;
    result |= s0;
    return result;
  }

  private static short rotl(final short x, final int k) {
    return (short) ((x << k) | (x >>> (32 - k)));
  }
}

@giacomoferretti
Copy link
Owner

giacomoferretti commented Jul 18, 2023

You could try earlier version of paranoid-deobfuscator, the one using a Java helper.

See 4779c57, the last commit using it.

@giacomoferretti
Copy link
Owner

giacomoferretti commented Nov 21, 2024

Probably found the bug... Missed a np.int64.

Do you still use the library? Do you still have the file used in this issue?

@giacomoferretti
Copy link
Owner

Should be fixed in 8a3a68c

Reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

2 participants