Assembleallforms

int Assembleallforms(wchar_t *src,ulong ip,t_asmmod *model,int maxmodel,int mode,wchar_t *errtxt);

Generates all possible binary forms of the specified source command(s) and fills list of models. Assembleallforms() understands commands in MASM, IDEAL and HLA formats dependless on the currently selected disassembling mode. Syntax is relatively fuzzy and accepts commands that would be rejected by some compilers.
May be slow. Attention, the number of produced models may be very large!


Parameters:

src
(in) Pointer to the UNICODE string containing 80x86 command (or even several command separated by semicolon, depending on the mode) in the text form
ip
(in) Address where command must be placed, necessary to calculate offsets for relative jumps and calls. Ignored if flag AM_IMPRECISE is set
model
(out) Pointer to the array of at least maxmodel structures of type t_asmmod, receives generated binary commands. Internally, OllyDbg allocates NSEARCHCMD models for a single source command, although this number is strongly exaggerated
maxmodel
(in) Maximal allowed number of produced models
mode
(in) Assembling mode, a combination of zero or more of the following flags:
AM_ALLOWBAD - allows bad or undocumented commands

AM_IMPRECISE - allows generation of imprecise models used in search
AM_MULTI - if set simultaneously with AM_IMPRECISE, src may contain several commands separated by semicolon for the same address. Use it only in search models that trigger on several different commands
errtxt
(out) Pointer to the UNICODE buffer at least TEXTLEN wide characters long that receives error message, or NULL if error message is not needed


Return values:

Returns number of generated models, or 0 on error


See also:
Assembler and disassembler, t_asmmod, Assemble()