|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2000-2015 JetBrains s.r.o. |
|
|
|
* Copyright 2000-2016 JetBrains s.r.o. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -172,15 +172,13 @@ public class IrreducibleCFGDeobfuscator { |
|
|
|
|
|
|
|
|
|
|
|
private static int getStatementSize(Statement statement) { |
|
|
|
private static int getStatementSize(Statement statement) { |
|
|
|
|
|
|
|
|
|
|
|
int res = 0; |
|
|
|
int res; |
|
|
|
|
|
|
|
|
|
|
|
if (statement.type == Statement.TYPE_BASICBLOCK) { |
|
|
|
if (statement.type == Statement.TYPE_BASICBLOCK) { |
|
|
|
res = ((BasicBlockStatement)statement).getBlock().getSeq().length(); |
|
|
|
res = ((BasicBlockStatement)statement).getBlock().getSeq().length(); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
for (Statement stat : statement.getStats()) { |
|
|
|
res = statement.getStats().stream().mapToInt(IrreducibleCFGDeobfuscator::getStatementSize).sum(); |
|
|
|
res += getStatementSize(stat); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return res; |
|
|
|
return res; |
|
|
|