//
// sub_D1675C from 0xd1675c to 0xd167f0 (148 bytes)
//
// 1 xrefs:
// > ProfilePage::onSocialPage @ 0x8f8a8c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
size_t __fastcall sub_D1675C(__int64 *a1, void *a2, size_t a3, size_t a4)
{
__int64 v4; // x21
size_t result; // x0
size_t v6; // x4
size_t v9; // x19
v4 = *a1;
result = -1;
v6 = *(_QWORD *)(v4 - 24);
if ( a4 <= v6 )
{
if ( v6 - a4 > a3 )
v9 = a3;
else
v9 = v6 - a4;
while ( 1 )
{
if ( !memcmp((const void *)(v4 + v9), a2, a4) )
return v9;
if ( !v9 )
break;
--v9;
}
return -1;
}
return result;
}