benilla-re systems structs docs

s_setWindowTextW

global · crt

Address
0x8824ec · 4 bytes, up to 0x8824ef
Type
void *
Meaning
Holds SetWindowTextW, bound from user32.dll by its first call (0x748942)
Confidence
verified, proof one
Finding
storm/unicode#counting-utf-16-units

Finding: Counting UTF-16 units in storm: UTF-8 to UTF-16

0x65b250(src, len, &read) counts, sequence by sequence and the NUL included, what the conversion would store, with the same table, the same bounds and the same results for a source that runs out, but folds each byte sign-extended. A lead from 0xc0 is then negative, so a sequence of two to four bytes (lead 0xc0 to 0xf7) folds above 0x10ffff, whatever follows the lead, and counts 1, a four-byte form included, which the conversion stores as two units; for valid UTF-8 the count is the code points plus one. read takes the bytes consumed, the NUL's included, and 0 for a null or empty source.

The derivation is in the doc.