开发者

disassembling, changing and assembling DLL file

开发者 https://www.devze.com 2023-03-29 17:26 出处:网络
I have a DLL which I have disassembled, and just to test that my project is going to work. I have tried assembling it again but without luck.

I have a DLL which I have disassembled, and just to test that my project is going to work. I have tried assembling it again but without luck.

I'm getting different kinds of errors.

The disassembly I have done with IDA Pro freeware, and then exported the file as an .asm, to try to assemble it again I have tried to use A86 assembler and flat assembler.

Maybe I'm disassembling the DLL the wrong or using the wrong assembler, but could somebody maybe point me to some tools and/or resources about this?

Data:

A86, IDA no analysis done on disassembly:

C:\Users\Ma\Documents\sap assembler\a86\Temp>a86 TEST.ASM

A86 macro assembler, V4.02 Copyright 1995 Eric Isaacson

Source:

TEST.ASM [COMPAT.8

Sorry, no such file

Flat assembler 1.69.32, IDA no analysis done on disassembly:

illegal instruction

instruction: .686p

Flat assembler 1.69.32, IDA analysis done on disassembly:

error: invalid name

_LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E struc

a86, with analysis done in IDA upon disassembling:

~^
#ERROR messages will be removed if you 开发者_Python百科leave these first two lines in     @@@@#

ICreateErrorInfo struc ; (sizeof=0x4, standard type)
lpVtbl dd ?     ; offset
ICreateErrorInfo ends


fd_set struc ; (sizeof=0x104, standard type)
fd_count dd ?
fd_array dd 64 dup(?)
fd_set ends


_LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E struc ; (sizeof=0x8, standard type)
~              ^
#ERROR 06: Symbol Required                                                @@@@#
LowPart dd ?
HighPart dd ?
_LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E ends
~              ^
#ERROR 40: Conflicting Multiple Definition Not Allowed                    @@@@#


LARGE_INTEGER union ; (sizeof=0x8, standard type)
~ ^
#ERROR 01: Unknown Mnemonic                                               @@@@#
anonymous_0 _LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E ?
~ ^
#ERROR 01: Unknown Mnemonic                                               @@@@#
u _LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E ?
~ ^
#ERROR 01: Unknown Mnemonic 

Is my workflow wrong?


IDA's output is mostly geared towards MASM syntax but is not guaranteed to be re-assembleable even by it. Some of the constructs it uses to represent the binary faithfully might not be supported by any assembler.

You will need to edit the produced file to make it acceptable. For example, the ::$ used to represent unnamed C unions or structures will need to be replaced with proper characters for identifiers, e.g. an underscore.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号