汇编及编程技巧探秘
1. 条件代码后缀指令
在汇编编程里,带有条件代码后缀的指令数量是没有限制的,前提是这些指令不会修改 CPU 标志。在 Thumb 模式下,有 IT 指令,它能给接下来的四条指令添加条件后缀。示例如下:
CMP register, register/value
ITEEE EQ ; set these suffixes: if-then-else-else-else
instr1
; instruction will be executed if condition is true
instr2
; instruction will be executed if condition is false
instr3
; instruction will be executed if condition is false
instr4
; instruction will be executed if condition is false
2. 练习
对于 ARM64,尝试重写相关代码,移除所有条件跳转指令,使用 CSEL 指令。
3. 软件破解
大部分软件都能通过搜索保护检查的位置来进行破解,比如加密狗、许可证密钥、序列号等。常见的代码形式如下:
...
call check_protection
jz
all_OK
call message_box_protection_missing
call exit
all_OK:
超级会员免费看
订阅专栏 解锁全文
67

被折叠的 条评论
为什么被折叠?



