I am currently researching smali / "obfuscator for code", and now I'm trying to get acquainted with decompiled source codes. To do this, I created a simple application and decompiled it smali.
I am trying to understand decompiled source code to improve and compare security (versus decompilation) after using obfuscator code later. Although most smali sources are not that complicated, I still have problems converting digit formats.
Can you explain to me, for example. next line. I guess it should have a value of five, but I'm not sure what binary format it is. How to calculate it 0x4014 = 5 ???
const-wide/high16 v0, 0x4014
The complete java codes and smali codes for this test function are included:
Java source:
boolean test(int a, double d) {
if (a < 5 && d < 5)
return true;
else
return false;
}
Source Smali:
.method test(ID)Z
.locals 2
.parameter "a"
.parameter "d"
.prologue
.line 28
const/4 v0, 0x5
if-ge p1, v0, :cond_0
const-wide/high16 v0, 0x4014
cmpg-double v0, p2, v0
if-gez v0, :cond_0
.line 29
const/4 v0, 0x1
.line 31
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method