"Hardcoded strings" here means "immutable strings stored at a constant address in memory". This allows us to do a lookup solely based on the address.
Prerequisites
None. Also needs to work with #3, though.
Implementation
This consists of four parts:
Basic lookup function based on a string's address
Hooks for TextOut, MessageBox and possibly other Win32 API functions calling the lookup function
Breakpoint to call the lookup function (unnecessary; hardcoded strings are either fully constant (which means our hooks take care of them anyway) or format strings (see below).)
Custom sprintf handler
No. 4 is necessary because some of these hardcoded strings are sprintf format strings, and we shouldn't trust on the game's own buffers being large enough.
Hardcoded strings
Description
"Hardcoded strings" here means "immutable strings stored at a constant address in memory". This allows us to do a lookup solely based on the address.
Prerequisites
None. Also needs to work with #3, though.
Implementation
This consists of four parts:
TextOut
,MessageBox
and possibly other Win32 API functions calling the lookup functionBreakpoint to call the lookup function(unnecessary; hardcoded strings are either fully constant (which means our hooks take care of them anyway) or format strings (see below).)sprintf
handlerNo. 4 is necessary because some of these hardcoded strings are
sprintf
format strings, and we shouldn't trust on the game's own buffers being large enough.