首页
社区
课程
招聘
[求助]大神觉得这段汇编是在遍历二叉树吗
发表于: 2016-11-19 09:56 3792

[求助]大神觉得这段汇编是在遍历二叉树吗

2016-11-19 09:56
3792
大神帮忙看下这段汇编,感觉像二叉树,但是又不确定,一段汇编看不太明白

00000000`00826760 55 push rbp
00000000`00826761 8bec mov ebp,esp
00000000`00826763 83ec08 sub esp,8
00000000`00826766 8b416c mov eax,dword ptr [rcx+6Ch]
00000000`00826769 2b4168 sub eax,dword ptr [rcx+68h]
00000000`0082676c 53 push rbx
00000000`0082676d c1f804 sar eax,4
00000000`00826770 56 push rsi
00000000`00826771 57 push rdi
00000000`00826772 8bd0 mov edx,eax
00000000`00826774 33ff xor edi,edi
00000000`00826776 8945f8 mov dword ptr [rbp-8],eax
00000000`00826779 85d2 test edx,edx
00000000`0082677b 7436 je 00000000`008267b3


00000000`0082677d 8b4168 mov eax,dword ptr [rcx+68h]
00000000`00826780 8945fc mov dword ptr [rbp-4],eax


00000000`00826783 8b5dfc mov ebx,dword ptr [rbp-4]
00000000`00826786 8bca mov ecx,edx
00000000`00826788 d1e9 shr ecx,1
00000000`0082678a 8d0439 lea eax,[rcx+rdi]
00000000`0082678d 8bf0 mov esi,eax
00000000`0082678f 03f6 add esi,esi
00000000`00826791 8b74f304 mov esi,dword ptr [rbx+rsi*8+4]
00000000`00826795 8b5d08 mov ebx,dword ptr [rbp+8]
00000000`00826798 3bf3 cmp esi,ebx
00000000`0082679a 730c jae 00000000`008267a8

;这里看不懂
00000000`0082679c 8d7801 lea edi,[rax+1]
00000000`0082679f 83c8ff or eax,0FFFFFFFFh
00000000`008267a2 2bc1 sub eax,ecx
00000000`008267a4 03d0 add edx,eax
00000000`008267a6 eb04 jmp 00000000`008267ac


00000000`008267a8 7409 je 00000000`008267b3


00000000`008267aa 8bd1 mov edx,ecx


00000000`008267ac 85d2 test edx,edx
00000000`008267ae 75d3 jne 00000000`00826783


00000000`008267b0 8b45f8 mov eax,dword ptr [rbp-8]


00000000`008267b3 5f pop rdi
00000000`008267b4 5e pop rsi
00000000`008267b5 5b pop rbx
00000000`008267b6 8be5 mov esp,ebp
00000000`008267b8 5d pop rbp
00000000`008267b9 c20400 ret 4

[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 288
活跃值: (212)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
2
问一下,二叉树用这几行代码能写出来么?
2016-11-19 14:36
0
雪    币: 324
活跃值: (60)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
3
这段汇编是对某一个结构进行查找的,可以看第四句和第五句汇编,就感觉是取出这个结构的两个值,然后在这两个值中间的数据进行一些查找操作,所以我想问这个结构是不是一个二叉树
2016-11-19 15:33
0
游客
登录 | 注册 方可回帖
返回
//