我试图在反编译后对一些Java .class文件进行反混淆处理,而且我遇到了代码的一部分,它以一种我认为不能使用标签的方式使用标签.我不知道这是否是反编译器误解标签的错误,或者代码是否故意以这种方式混淆.换句话说,可以在Java字节码中以这种方式使用标签吗?
请注意,标签出现在相关的break语句之后,而不是之前.它几乎似乎是使用它们作为goto,而不是用于退出循环的标签.根本没有循环,所以我对它们应该如何在这里使用感到困惑.
这里发生了什么?我在评论中标记了3个标签(###)
if (i != 96)
{
if ((i ^ 0xFFFFFFFF) != -98)
{
if (i == 98)
break label417; // ### Here are the three breaks... The relevant labels appear later in the code
if (i != 99)
break label540;
if (!bool)
break label461;
}
}
else
{
if (localwb == this.localWB5)
{
if (this.localWB4 != null) {
this.localWB4.a((byte)-92, this);
if (!bool);
}
else
{
this.localWB6.a((byte)-9, this);
}
return true;
}
if (localwb == this.localWB4)
{
this.localWB6.a((byte)-59, this);
return true;
}
if (this.localWB3 != localwb)
break label540;
this.localWB2.a((byte)-38, this);
return true;
}
if (this.localWB6 == localwb)
{
if (this.localWB4 != null) {
this.localWB4.a((byte)-122, this);
if (!bool);
}
else {
this.localWB5.a((byte)-63, this);
}
return true;
}
if (this.localWB4 == localwb)
{
this.localWB5.a((byte)-22, this);
return true;
}
if ((this.localWB2 == localwb) && (this.localWB3.M))
{
this.localWB3.a((byte)-84, this);
return true;
label417: // ### The first label. Note how this next if-statement has inaccessible code... if the above if-statement is true, it would have already returned true; However, the label appears after the return statement, almost as if the label is being used as a goto.
if (localwb == this.localWB2)
{
this.localWB6.a((byte)-86, this);
return true;
}
if (this.localWB3 == localwb)
{
this.localWB5.a((byte)-31, this);
return true;
label461: // ### The second label
if ((this.localWB6 == localwb) || (this.localWB4 == localwb))
{
this.localWB2.a((byte)-60, this);
return true;
}
if (localwb == this.localWB5)
{
if (this.localWB3.M)
{
this.localWB3.a((byte)-44, this);
if (!bool);
}
else {
this.localWB2.a((byte)-9, this);
}
return true;
}
}
}
label540: // ### The final label.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4004 次 |
| 最近记录: |