benilla-re systems structs docs

PcreExec

function · unassigned · primitive

Address
0x724350 · 1568 bytes, up to 0x72496f
Signature
int32_t __fastcall (const void *code, const void *extra, const char *subject, int32_t length, int32_t startOffset, int32_t options, int32_t *ovector, int32_t ovecSize)
Meaning
Matches a compiled pattern against a subject with the extra block's, the pattern's or the default tables
Confidence
verified, proof one
Finding
ui/chatfilter#the-matchers-character-tables

Finding: The matcher's character tables in ui: the spam and profanity filters

pcre_exec (0x724350) takes its tables from the extra block when that sets flag 8, else from the compiled pattern, else the default tables 0x873b40, which every filter uses: lower case at +0x0, the case flip at +0x100 (0x873c40) and the character types at +0x340 (0x873e80). The types give bit 0x10, word, to 0–9, A–Z, _, a–z and 0xc0 to 0xff but 0xd7, 0xde and 0xf7, 124 characters, and bit 0x01, space, to 0x09, 0x0a, 0x0c, 0x0d, 0x20 and 0xa0. The case flip changes only A–Z and a–z. In UTF-8 mode the matcher decodes each character, and one of 0x100 or above is neither: a word boundary takes it as a non-word character, \s fails on it and \S matches it.

The derivation is in the doc.

Callers 1

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.