Root > Reference > All Functions > DisasmFunction

Function DisasmFunction

Previous pageReturn to chapter overviewNext page   

Disasms function.







Code (Delphi)

function DisasmFunction(

const Address: Pointer;

const AExceptionAddress: Pointer = nil;

const ASize: Integer = 0;

const ALines: Integer = 0;

const AOptions: TEurekaModuleOptions = nil;

const AEncrypt: Boolean = False

): String;



Address [in]

A pointer to beginning of the function. Size of the function is determinated from AExceptionAddress, ASize, ALines or virtual region side if neither param is specified.


AExceptionAddress [in, optional]

A pointer to exception address inside function. If this argument is specified then the function will mark corresponding line in disassembly output as "< Exception Here". Function size will also be increased to include this address (if necessary).


ASize [in, optional]

Function's size in bytes. If this argument is set then the function will stop disassebmling only after specified number of bytes. Otherwise it will stop at first RET instruction or if ALines, AExceptionAddress or end of virtual region is reached.


ALines [in, optional]

Maximum number of lines (i.e. instructions) to disassemble after AExceptionAddress. Have no effect if AExceptionAddress is not specified.


Return value

A textual representation of disassembled function including comments, marks, addresses, RAW bytes and decoded instructions.



This function is used to generate disasm view in bug reports. This function uses EDisAsm unit.



When neither of AExceptionAddress, ASize and ALines arguments are specified: this function will disassemble machine code to the end of the allocated memory region or until RET instruction is encountered.


This function can be used to disassemble arbitrary block of machine code. Address does not have to point to beginning of some function. It can point to any CPU instruction. One can use FindLowAddress to obtain starting address from known AExceptionAddress value. Return value of FindLowAddress can be used as Address param.



When this function is used with FindLowAddress: it's recommended that FindLowAddress's ALines argument equals to DisasmFunction's ALines argument.


See also

Send feedback... Build date: 2023-05-05
Last edited: 2023-05-05
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: