请问如何用C语言实现这样的汇编

mme 2007-02-27 01:43:06
我多次看到有这样的汇编代码

.text:00010C09 cmp ecx, 3
.text:00010C0C mov [eax+4Ch], esi
.text:00010C0F pop esi
.text:00010C10 ja short loc_10C4B
.text:00010C12 jmp ds:off_10CA0[ecx*4] // 注意这里
.text:00010C19
.text:00010C19 loc_10C19: ; DATA XREF: .text:00010CA4o
.text:00010C19 mov cl, [eax+30h]
.text:00010C1C test cl, cl
.text:00010C1E jnz short loc_10C4B
.text:00010C20 mov cl, [eax+18h]
.text:00010C23 test cl, cl
.text:00010C25 jz short loc_10C4B
.text:00010C27 mov byte ptr [eax+31h], 4
.text:00010C2B jmp short loc_10C4F
.text:00010C2D ; 哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪?
.text:00010C2D
.text:00010C2D loc_10C2D: ; CODE XREF: sub_10BC0+52j
.text:00010C2D ; DATA XREF: .text:off_10CA0o ...
.text:00010C2D mov cl, [eax+18h]
.text:00010C30 test cl, cl
.text:00010C32 jz short loc_10C3A
.text:00010C34 mov byte ptr [eax+31h], 4
.text:00010C38 jmp short loc_10C4F
.text:00010C3A ; 哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪?
.text:00010C3A
.text:00010C3A loc_10C3A: ; CODE XREF: sub_10BC0+52j
.text:00010C3A ; sub_10BC0+72j
.text:00010C3A ; DATA XREF: ...
.text:00010C3A test [eax+1Ch], dl
.text:00010C3D jz short loc_10C45
.text:00010C3F mov byte ptr [eax+31h], 7
.text:00010C43 jmp short loc_10C4F
.text:00010C9B loc_10C9B: ; CODE XREF: sub_10BC0+11j
.text:00010C9B ; sub_10BC0+1Aj ...
.text:00010C9B xor eax, eax
.text:00010C9D
.text:00010C9D locret_10C9D: ; CODE XREF: sub_10BC0+97j
.text:00010C9D ; sub_10BC0+9Ej
.text:00010C9D retn 8
.text:00010C9D sub_10BC0 endp
.text:00010C9D
.text:00010C9D ; 哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪?
.text:00010CA0 off_10CA0 dd offset loc_10C2D ; DATA XREF: sub_10BC0+52r
.text:00010CA4 dd offset loc_10C19
.text:00010CA8 dd offset loc_10C3A
.text:00010CAC dd offset loc_10C2D




大家可以看到
.text:00010C12 jmp ds:off_10CA0[ecx*4]
这行是转跳到.text:00010CA0的off_10CA0数组里面去

我就是想不明白,C语言可以做到这样的转跳么?





...全文
302 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
mme 2007-03-03
  • 打赏
  • 举报
回复
嗯,可能楼上说的有道理

给分了

Yofoo 2007-03-02
  • 打赏
  • 举报
回复
可以,这是个switch 语句

switch(ecx)
{
case 0: goto loc_10C2D ;
case 1: goto loc_10C19;
....

default: goto short loc_10C4B;
}
tiger0607 2007-02-27
  • 打赏
  • 举报
回复
应该是反汇编错了

21,497

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧