Open blue-devil opened 1 year ago
The linked binary doesn't exist. Could you please provide a fresh link?
Hello @plafosse , I have updated the link: Updated link Alternative link
Thanks for the update. The root cause of this issue is the lifting lack of support for the following armv7 instructions:
vcvt, vabs, vcmpe, vmrs
I'm going to move this to the Arm repository, for it to be dealt with. If you were so inclined this architecture is open source and you could implement the instructions yourself :)
The relevant code in HLIL:
main:
0 @ 00008628 int32_t r2
1 @ 00008628 int32_t r3
2 @ 00008628 r3:r2 = 0x400921cac083126f
3 @ 0000862c double var_18 = r3:r2
4 @ 00008634 int32_t r2_1
5 @ 00008634 int32_t r3_1
6 @ 00008634 r3_1:r2_1 = 0x401921cac083126f
7 @ 00008650 int32_t r2_2
8 @ 00008650 int32_t r3_2
9 @ 00008650 r3_2:r2_2 = 0x4023cccccccccccd
10 @ 00008654 int64_t var_30 = r3_2:r2_2
I think the real problem is we do not support setting the type of sth like r3:r2
. Otherwise, we should have displayed it correctly. @plafosse
The binary uploaded to GH:
There are a couple of ways to approach this:
var_18
. However, we cannot set a floating point UIDF for now. r3:r2
.
Hello,
What is the feature you'd like to have? Binary ninja cannot detect/parse doubles in HLIL/PseudoC view if the binary is an ARM binary
Additional Information:
I want to report a decompilation incapability. I have realized this while solving a challenge from r0. Mirror download link
In this situation we have a 32 bit ARM binary. Anyone can run binary in Raspbian.
This binary has been initializing some doubles. Then uses them. I have realized that Binary Ninja HLIL and Pseudo C views cannot decompile the doubles in exact values:
Disassembly:
Pseudo C
Let's cross check this binary in IDA Pro:
Disassembly:
Pseudo C
BTW, I have extracted the pseudo c code and recompiled as x86, then check it through Binary Ninja:
Pseudo C
Final words
Binary Ninja have problems detecting/parsing doubles if the binary is an ARM binary, but can decompile/detect doubles if the binary is x86 binary