Flow Obfuscation

With the help of name obfuscation it is possible to obtain a certain level of protection which will probably stop an unskilled or lazy intruder, but an experienced hacker will only lose a negligible amount time converting a reverse engineered code into a readable one. That's why serious obfuscators implement at least some form of control flow obfuscation.

Allatori changes the standard Java constructions (loops, conditional and branching instructions) and, what's more, in cases where it's possible, the series of commands are altered so that after decompilation (if they make it that far) the Java equivalent is impossible to find.

The mixture of unique methods used in Allatori makes the code safe to the maximum, often causing the process of decompilation to fail. Below is another example of Allatori's prowess:

Original source:

    /**
     * Returns sum of the elements in the first rowsCount rows
     * and columnsCount columns.
     */
    int sumOfElements(int[][] matrix, int rowsCount, int columnsCount) {
        int sum = 0;
        for (int row = 0; row < rowsCount; row++)
            for (int column = 0; column < columnsCount; column++)
                sum += matrix[row][column];
        return sum;
    }

Name and Flow obfuscated then decompiled:
    int a(int a[][], int a, int a) {
        int i = 0;
        int j = 0;
          goto _L1
_L6:
        int k = 0;
          goto _L2
_L4:
        i += a[j][k];
        ++k;
_L2:
        a;
        JVM INSTR icmplt 17;
           goto _L3 _L4
_L3:
        ++j;
_L1:
        a;
        JVM INSTR icmplt 10;
           goto _L5 _L6
_L5:
        return i;
    }