GenerateRandomName
function · glue · primitive
- Address
0x475130· 429 bytes, up to0x4752dc- Signature
void __thiscall (void *this, char *buf, uint32_t size)- Meaning
- Grows a name from three-byte keys by count-weighted draws, then drops the underscore and capitalizes
- Confidence
- verified, proof one
- Finding
- glue/create#generating-a-name
Finding: Generating a name in glue: character create
A name grows in a zeroed buffer of size bytes. While it is empty the candidates are the keys
beginning with _, after that those whose first two bytes are its last two. With total their
summed counts and r one advance of 0x882664, x is the high dword of total · r; the first
candidate in key order whose count exceeds what remains of x wins. An empty buffer takes the
key; otherwise the key's third byte is appended, and a two-byte key ends the name, as do no
candidate and size − 1 bytes. The first byte is then removed and the next upper-cased.
The derivation is in the doc.
Callers 1
- GenerateCreateName glue
Callees 8
- 0x4100f0 crt
- _toupper crt
- NTempest::CRandom::uint32 random
- MulHigh32 cmath
- SStrCmp storm
- SStrCopy storm
- SStrLen storm
- SStrPack storm
Calls and jumps by a bare address, from tables/calls.tsv.