Closed github-actions[bot] closed 10 months ago
After taking a closer look at the sample, I am not sure if we fix it at the right place. The MLIL CFG in BinaryNinja looks as follows:
Since this is not really a switch, we do this monkey-patch in the parser:
return {edge.target.source_block.start: [Constant(i)] for i, edge in enumerate(block.outgoing_edges)}
Thus, the switch-edge becomes the constant 0. We ignore this during the restructuring, because the graph has only one leave and we assume that its reaching-condition is True.
In this case, it seems more that the jump
statement simply jumps to the next statement, i.e., from line 24 to 25. Perhaps, we have to adopt something in the parser here instead of the switch-variable-detection.
closes #279