I have written a script which extracts all the assembly code from a PE using this code in ghidra
instructionList = []
for instr in currentProgram.getListing().getInstructions(True):
instructionList.append(instr)
but the issue is that, is changes all the .DLL calls in the assembly code. For example, if the listing window shows
CALL dword ptr [->MSVCRT.DLL::signal]
The output I get is
CALL dword ptr [EBP + -0x14]
Is there a way to get the assembly code exactly as it is in the listing window