This one works fine yet provides all of the machine addresses as beginning at zero:
xed -i Halt7.obj
I really need the machine addresses to begin at their COFF object file offsets.
Here is what I have tried: They give me the help message (list of options) indicating a syntax error in my specification of options.
xed -i -as 0xb4 Halt7.obj xed -ir -as 0xb4 Halt7.obj xed -i -as 0xb4 -ae 0x121 Halt7.obj xed -ir -as 0xb4 -ae 0x121 Halt7.obj
One of the following is required:
-i input_file (decode pecoff-format file) -ir raw_input_file (decode a raw unformatted binary file)
Optional arguments:
-as addr (Address to start disassembling. Use 0x for hex addresses) -ae addr (Address to end disassembling. Use 0x for hex addresses)
This correct answer provided by Peter Cordes shown below
This option disassembled the file correctly yet showed the addresses beginning at offset zero.
xed -i Halt7.obj
XDIS 0: PUSH BASE 55 push ebp XDIS 1: DATAXFER BASE 8BEC mov ebp, esp XDIS 3: PUSH BASE 51 push ecx XDIS 4: DATAXFER BASE C745FC00000000 mov dword ptr [ebp-0x4], 0x0 XDIS b: DATAXFER BASE 8B45FC mov eax, dword ptr [ebp-0x4] XDIS e: PUSH BASE 50 push eax XDIS f: CALL BASE E80C000000 call 0x20 XDIS 14: BINARY BASE 83C404 add esp, 0x4 XDIS 17: DATAXFER BASE B801000000 mov eax, 0x1 XDIS 1c: DATAXFER BASE 8BE5 mov esp, ebp XDIS 1e: POP BASE 5D pop ebp XDIS 1f: RET BASE C3 ret
This is what I wanted to achieve and the syntax was provided by Peter Cordes shown below
xed -i Halt7.obj -b 0xb4
XDIS b4: PUSH BASE 55 push ebp XDIS b5: DATAXFER BASE 8BEC mov ebp, esp XDIS b7: PUSH BASE 51 push ecx XDIS b8: DATAXFER BASE C745FC00000000 mov dword ptr [ebp-0x4], 0x0 XDIS bf: DATAXFER BASE 8B45FC mov eax, dword ptr [ebp-0x4] XDIS c2: PUSH BASE 50 push eax XDIS c3: CALL BASE E80C000000 call 0xd4 XDIS c8: BINARY BASE 83C404 add esp, 0x4 XDIS cb: DATAXFER BASE B801000000 mov eax, 0x1 XDIS d0: DATAXFER BASE 8BE5 mov esp, ebp XDIS d2: POP BASE 5D pop ebp XDIS d3: RET BASE C3 ret