Decodeascii

OllyDbg Plugin API

Decodeascii

Decodes ASCII string that starts at address addr in the memory of debugged process into string s of length len. If mode is DASC_TEST or DASC_NOHEX, checks whether this really looks like a string, if DASC_ASCII - decodes as ASCII string, if DASC_PASCAL - decodes as Pascal string (not zero-terminated, preceded with byte length). If mode is DASC_NOHEX and value points to a string, precedes decoded string with "ASCII". Returns length of resulting text, not including terminal '\0'.

int Decodeascii(ulong addr,char *s,int len,int mode);

Parameters:

addr - address in the memory of debugged process where ASCII string starts;

s - pointer to buffer of length at least TEXTLEN bytes where Decodeascii places decoded string;

len - length of string s in bytes;

mode - decoding mode, one of the following:

DASC_TEST Test whether pointed data really looks like an ASCII string. If not, print hexadecimal address instead of string
DASC_NOHEX Test whether pointed data really looks like an ASCII string. If not, return 0.
DASC_ASCII Force ASCII string
DASC_PASCAL Force Pascal string

See also: Decodeunicode, Decodeaddress, Decodecharacter