是否有命令行工具可以获取汇编指令的机器代码?

发布于 2024-09-18 21:04:11 字数 135 浏览 11 评论 0原文

0x042444FF; /* inc dword ptr [esp+4] */

我需要这个工具来知道哪个部分意味着 incdword ,反之亦然。

0x042444FF; /* inc dword ptr [esp+4] */

I need this tool to know which part means inc , dword or vice versa.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

何以心动 2024-09-25 21:04:11

您可以使用 objdump 工具将可执行二进制文件“反编译”回汇编代码,尽管由于可能的优化,生成的汇编代码可能与原始汇编代码不同(但它们应该相似)本质上)。

You can use the objdump tool to 'decompile' an executable binary back to assembly code, though because of possible optimisations, the resulting assembly code may not be the same as the original assembly (but they should be similar in essence).

顾铮苏瑾 2024-09-25 21:04:11

命令行工具,获取该十六进制数字并为您反汇编它。我没听说过有工具。您可以使用该数字创建一个 elf 文件,并将这四个字节作为二进制文件,然后调用 objdump。有了类似的东西,你就可以查一下。

http://ref.x86asm.net/index.html

http://ref.x86asm.net/coder32.html

0x44 告诉您这是一个增量。 x86 是可变长度,因此其他一些字节会发挥作用。如果 0x04 是 esp 的偏移量,我不会感到惊讶。

command line tool that takes that hex number and disassembles it for you. I have not heard of a tool. You could take that number make an elf file from it with those four bytes as the binary then call objdump. With something like that though you could just look it up.

http://ref.x86asm.net/index.html

or

http://ref.x86asm.net/coder32.html

The 0x44 tells you it is an increment. x86 is variable length so some of the other bytes come into play. I wouldnt be surprised if the 0x04 is the offset to esp.

回忆躺在深渊里 2024-09-25 21:04:11

下面的方法有点不方便,但它可以工作:

$ xxd -r > objdump-test.bin
0000 ff 44 24 04
$ objdump -D --target=binary --architecture i386:intel objdump-test.bin 

objdump-test.bin:     file format binary

Disassembly of section .data:

0000000000000000 <.data>:
   0:   ff 44 24 04             inc    DWORD PTR [esp+0x4]

xxd 是一个可以反向工作的十六进制转储实用程序,它是 X11 的一部分。 0000 是结果文件中十六进制数据的地址。

您可以使用任何其他工具来创建二进制文件。

The following is a bit inconvenient, but it works:

$ xxd -r > objdump-test.bin
0000 ff 44 24 04
$ objdump -D --target=binary --architecture i386:intel objdump-test.bin 

objdump-test.bin:     file format binary

Disassembly of section .data:

0000000000000000 <.data>:
   0:   ff 44 24 04             inc    DWORD PTR [esp+0x4]

xxd is a hexdump utilitity that can work in reverse, it is part of X11. The 0000 is the address of the hex data in the resulting file.

You could use any other tool to create a binary file instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文