VC驿站

 找回密码
 加入驿站

QQ登录

只需一步,快速开始

搜索
查看: 3903|回复: 3

[交流] 学习破解记录2

[复制链接]
92_avatar_middle
最佳答案
0 
online_vip 发表于 2021-10-11 14:21:20 | 显示全部楼层 |阅读模式
本帖最后由 布衣木人 于 2021-10-11 14:21 编辑

一、常用寄存器
EAX -Extend Accumulator Register累加器寄存器
ECX -Extend Counter Register计数器寄存器
EDX -Extend Data Register数据寄存器
EBX -Extend Base Register基本注册
ESP -Extend Stack Pointer堆栈指针
EBP -Extend Base Pointer基本指针
ESI -Extend Source Index来源索引
EDI -Extend Destination Index目标索引
学习破解记录2
Status Flags:
Carry flag — Set if an arithmetic operation generates a carry or a borrow out of the mostsignificantbit of the result;
cf如果运算中在最高位发生进位或借位,cf设为1。
Parity flag — Set if the least-significant byte of the result contains an even number of 1 bits;
pf如果运算结果中最低字节的1的个数为偶数则pf置1。
Auxiliary Carry flag — Set if an arithmetic operation generates a carry or a borrow out of bit 3 of the result;
af如果运算中在第三位发生了进位或借位,af设为1.
Zero flag — Set if the result is zero;
zf运算结果为0,则zf置1;
Sign flag — Set equal to the most-significant bit of the result, which is the sign bit of a signedinteger. (0 indicates a positive value and 1 indicates a negative value.)
sf符号标志位,正数设置为0,负数设置为1.
Overflow flag — Set if the integer result is too large a positive number or too small a negativenumber (excluding the sign-bit) to fit in the destination operand;
of溢出标志位。
二、常用汇编指令
1、逻辑指令
and指令在两个操作数的对应位之间进行逻辑与操作,并将结果存放在目标操作数中:
and destination,source
两个操作数必须大小一直,同时对应的两个位都是1,则为1,否则为0;
or指令在两个操作数的对应位之间进行逻辑或操作,并将结果存放在目标操作数中:
or destination,source
两个操作数必须大小一直,同时对应的两个位都是0,则为0,否则为1;
xor指令在两个操作数的对应位之间进行逻辑异或操作,并将结果存放在目标操作数中:
xor destination,source
两个操作数必须大小一直,同时对应的两个位值相同,则为0,不同则为1;
not指令倒置操作数中的所有位,即0变1,1变0,。
2、比较指令
test指令在两个操作数的对应位之间进行and操作,并根据运算结果设置符号标志位、零标志位和奇偶标志数。test指令与and指令不同的地方是,是test指令不修改目标操作数。
cmp指令用于比较整数,执行从目的操作数中减去源操作数的隐含减法操作,并且不修改任何操作数。
cmp destination,source
cmp结果 zf cf
目标操作数<源操作数0 0
目标操作数>源操作数 0 0
目标操作数=源操作数 1 0

3、运算操作指令
mov destination,source
movsx reg32,reg/mem扩展并传送
lea指令返回间接操作数的地址。
xchg 交换指令
inc reg/mem 增加1
dec reg/mem 减少1
add destination,source 增加
sub destination,source 减少
neg(非)指令把操作数转换为其二进制补码,将操作数的符号取反。
mul/imul
被乘数 乘数 乘积
al reg/mem8ax
ax reg/mem16dx:ax
eax reg/mem32 edx:eax

div/idiv类似于乘法
4、堆栈
push指令首先减少esp的值,再将源操作数复制到堆栈。
pop指令先把esp指向的堆栈内容复制到一个操作数中,再增加esp的值。
衍生的pushad与popad通常保存寄存器环境时用到。
call 指令通常把返回值放在eax中。
ret
5、跳转指令
jmp 直接跳转
jcc 条件跳转
学习破解记录2
基础的基本就这些,至于函数调用的栈关系图、调用关系、pe结构对初期影响不大,用到了再学。

评分

参与人数 2驿站币 +2 热心值 +5 收起 理由
75_avatar_small wl1383838438 + 3 赞一个!
58_avatar_small thzzl + 2 + 2 赞一个!

查看全部评分





上一篇:学习破解记录1
下一篇:学习破解 3
25_avatar_middle
最佳答案
0 
在线会员 发表于 2021-10-13 19:30:07 | 显示全部楼层
看不懂哦~~
75_avatar_middle
最佳答案
23 
online_supermod 发表于 2021-10-14 19:17:38 | 显示全部楼层
建议去弄一些小的demo  练练手
92_avatar_middle
最佳答案
0 
ico_lz  楼主| 发表于 2021-10-15 13:41:45 | 显示全部楼层
wl1383838438 发表于 2021-10-14 19:17
建议去弄一些小的demo  练练手

嗯嗯,马上的
您需要登录后才可以回帖 登录 | 加入驿站 qq_login

本版积分规则

×【发帖 友情提示】
1、请回复有意义的内容,请勿恶意灌水;
2、纯数字、字母、表情等无意义的内容系统将自动删除;
3、若正常回复后帖子被自动删除,为系统误删的情况,请重新回复其他正常内容或等待管理员审核通过后会自动发布;
4、感谢您对VC驿站一如既往的支持,谢谢合作!

关闭

站长提醒上一条 /2 下一条

QQ|小黑屋|手机版|VC驿站 ( 辽ICP备09019393号-4 )|网站地图wx_jqr

GMT+8, 2023-9-28 13:16

Powered by CcTry.CoM

© 2009-2021 cctry.com

快速回复 返回顶部 返回列表