Type UI_AppendColorCodeToString wide input and next-line output
Ghidra v1804 · 39698f0
The complete84-byte function accepts a writable WCHAR string in ECX and an output WCHAR** in EDX. It saves the output address in EBX and writes a null pointer, saves the input in EDI/ESI, calls wide strlen, scans WORDs with a2-byte stride, replaces newline0xA with a WORD NUL, then on success writes the following WCHAR address through EBX. Failure returns0 with null output; success returns1. Both callers pass wide buffers and addresses of pointer slots, then draw the returned second line through an existing WCHAR* text consumer. Full target, both caller ranges and wide strlen match original Windows bytes; the skill caller’s complete two-target switch/nine-byte selector map and all four input reaching definitions were checked. Retype only pWszString void* to WCHAR* and pNextLineOut void* to WCHAR**. Preserve chosen names, ECX/EDX storage, fastcall and int return; both exits are bare RET. No rename, shared layout or runtime/build claim.
Changes 2, applied together
Retype variable
win 0x004a7660 ECXtypevoid *→WCHAR *Retype variable
win 0x004a7660 EDXtypevoid *→WCHAR * *