benilla-re systems structs docs

CompareFriends

function · net · primitive

Address
0x5ae870 · 148 bytes, up to 0x5ae903
Signature
int __cdecl (const void *a, const void *b)
Meaning
Orders friend slots: empty last, then a zero online byte last, then names without case, a missing name last
Confidence
verified, proof one
Finding
net/friends#friend-order
Test
net::friends_compare

Finding: Friend order in net: friends

0x5ae850 sorts the 50 slots with qsort and the comparator 0x5ae870. A slot with guid 0 goes last, two such are equal. Then, when the online bytes differ, the one that is 0 goes last; two different non-zero bytes give -1 both ways, but the byte is only written 0 or 1. Then the names compare without case through 0x64a4c0 with no bound (Strings without case); a missing name goes last, two missing are equal.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

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