本帖最后由 小试锋芒 于 2014-9-9 18:55 编辑
雷霆战机2完美版的 礼包码的获取。。
礼包码的关键字有 礼包
用dalvik打开dex 搜索 礼包 搜到两个
如果对游戏简单分析过可以知道我们要的东西在第二个 点进去在methods里继续定位 礼包
选择第二个
以下是里面的代码
[AppleScript] 纯文本查看 复制代码 const v11 0x9c40
const/16 v10 0x2710
const/16 v9 0xf
const/16 v8 0xe
const/16 v7 0xd
sget-object v3 La5game/leidian2/MyInputConnection;->inputString:Ljava/lang/String;
invoke-virtual {v3} Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v3
const-string v4 ""
if-eqz v3 :label_29
const/4 v2 0
const/4 v1 0
label_23:
invoke-virtual {v3} Ljava/lang/String;->length()I
move-result v5
if-lt v1 v5 :label_39
label_29:
const-string v5 ""
if-ne v4 v5 :label_85
const-string v5 "输入有误1,请重新输入!"
invoke-static {v5} La5game/leidian2/Utilities;->showMessage(Ljava/lang/String;)V
label_38:
return-void
label_39:
invoke-virtual {v3,v1} Ljava/lang/String;->charAt(I)C
move-result v5
invoke-static {v5} Ljava/lang/Character;->isDigit(C)Z
move-result v5
if-eqz v5 :label_82
add-int/lit8 v2 v2 1
const/16 v5 0x9
if-le v2 v5 :label_61
const-string v5 "2输入的礼包码不正确,请重新输入!"
invoke-static {v5} La5game/leidian2/Utilities;->showMessage(Ljava/lang/String;)V
goto :label_29
label_61:
new-instance v5 Ljava/lang/StringBuilder;
invoke-static {v4} Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v6
invoke-direct {v5,v6} Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3,v1} Ljava/lang/String;->charAt(I)C
move-result v6
invoke-virtual {v5,v6} Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5} Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
label_82:
add-int/lit8 v1 v1 1
goto :label_23
label_85:
invoke-static {v4} Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
if-nez v0 :label_97
const-string v5 "输入有误3,请重新输入!"
invoke-static {v5} La5game/leidian2/Utilities;->showMessage(Ljava/lang/String;)V
goto :label_38
label_97:
rem-int/lit16 v5 v0 337
if-nez v5 :label_212
sget v5 La5game/leidian2/gamestate/UserData;->gameGold:I
add-int/lit16 v5 v5 20000
sput v5 La5game/leidian2/gamestate/UserData;->gameGold:I
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
add-int/lit16 v5 v5 20000
sput v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
const v6 0x186a0
if-lt v5 v6 :label_174
invoke-static {v9} La5game/leidian2/Utilities;->showAchPop(I)V
label_123:
sget v5 La5game/leidian2/gamestate/UserData;->gameGold:I
add-int/2addr v5 v11
sput v5 La5game/leidian2/gamestate/UserData;->gameGold:I
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
add-int/2addr v5 v11
sput v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
const v6 0x186a0
if-lt v5 v6 :label_193
invoke-static {v9} La5game/leidian2/Utilities;->showAchPop(I)V
label_143:
const-string v5 "恭喜获得6万水晶,5个必杀,5个护盾!"
invoke-static {v5} La5game/leidian2/Utilities;->showMessage(Ljava/lang/String;)V
const/4 v5 1
sput-boolean v5 La5game/leidian2/gamestate/UserData;->bhuodong:Z
sget v5 La5game/leidian2/gamestate/UserData;->bombNum:I
add-int/lit8 v5 v5 5
sput v5 La5game/leidian2/gamestate/UserData;->bombNum:I
sget v5 La5game/leidian2/gamestate/UserData;->transNum:I
add-int/lit8 v5 v5 5
sput v5 La5game/leidian2/gamestate/UserData;->transNum:I
invoke-static {} La5game/leidian2/gamestate/UserData;->saveGameData()V
invoke-static {} La5game/leidian2/gamestate/UserData;->saveSmsData()V
const/4 v5 2
sput v5 La5game/leidian2/gamestate/GS_Cover;->state:I
goto/16 :label_38
label_174:
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
const v6 0xc350
if-lt v5 v6 :label_185
invoke-static {v8} La5game/leidian2/Utilities;->showAchPop(I)V
goto :label_123
label_185:
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
if-lt v5 v10 :label_123
invoke-static {v7} La5game/leidian2/Utilities;->showAchPop(I)V
goto :label_123
label_193:
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
const v6 0xc350
if-lt v5 v6 :label_204
invoke-static {v8} La5game/leidian2/Utilities;->showAchPop(I)V
goto :label_143
label_204:
sget v5 La5game/leidian2/gamestate/UserData;->gameGoldTotal:I
if-lt v5 v10 :label_143
invoke-static {v7} La5game/leidian2/Utilities;->showAchPop(I)V
goto :label_143
label_212:
const-string v5 "输入的礼包码不正确4,请重新输入!"
invoke-static {v5} La5game/leidian2/Utilities;->showMessage(Ljava/lang/String;)V
goto/16 :label_38
上面的代码我对这些错误提示都添加了一个数字 1234 这是为了知道在输入11位礼包码错误后到底会提示哪个(跳转太多我有的也看不懂,干脆就编号然后打包运行下,这样就可以知道了)
保存然后安装运行下
注意礼包码我是用了11位数字
然后游戏提示
"输入的礼包码不正确4,请重新输入!“
很明显是
[AppleScript] 纯文本查看 复制代码 label_212:
const-string v5 "输入的礼包码不正确4,请重新输入!"
invoke-static {v5} La5game/leidian2/Utilities;->showMessage(Ljava/lang/String;)V
goto/16 :label_38
往上找是哪里跳到了212
[AppleScript] 纯文本查看 复制代码 label_97:
rem-int/lit16 v5 v0 337
if-nez v5 :label_212
rem-int/lit16 v5 v0 337 大概意思是说 337%V0 结果放到V5里(%是取余 别告诉我不知道“取余”是什么意思啊。。)
if-nez v5 :label_212 如果V5里的值不为0就跳到212
看到这里我果断 直接把337改成1不就哦了么。。呵呵呵呵
当然我们也可以不修改 只要这个激活码是337的倍数就哦了~~记住礼包是11位 比如33700000000
|