//
// FontObject::getFontAdvance from 0x14003e950 to 0x14003e9ed (157 bytes)
//
// 2 xrefs:
// > MultilineBitmapFont::stringWithMaxWidth @ 0x14007afb7
// > MultilineBitmapFont::stringWithMaxWidth @ 0x14007afee
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:25:28 +0000
//
__int64 __fastcall FontObject::getFontAdvance(_QWORD *a1, unsigned int a2)
{
__int64 v2; // r8
__int64 *v3; // rcx
__int64 v4; // rax
__int64 v5; // rcx
v2 = a1[16];
v3 = (__int64 *)(a1[18]
+ 16
* (a1[21]
& (0x100000001B3LL
* (((unsigned __int64)a2 >> 24)
^ (0x100000001B3LL
* ((0x100000001B3LL
* (BYTE1(a2) ^ (0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL))))
^ BYTE2(a2)))))));
v4 = v3[1];
if ( v4 != v2 )
{
v5 = *v3;
if ( a2 == *(_DWORD *)(v4 + 16) )
goto LABEL_7;
while ( v4 != v5 )
{
v4 = *(_QWORD *)(v4 + 8);
if ( a2 == *(_DWORD *)(v4 + 16) )
goto LABEL_7;
}
}
v4 = 0;
LABEL_7:
if ( !v4 )
v4 = v2;
if ( v4 == v2 )
return 0;
else
return *(unsigned int *)(v4 + 20);
}