//
// sub_100551280 from 0x100551280 to 0x100551338 (184 bytes)
//
// 3 xrefs:
// > sub_100610F5C @ 0x100611030
// > sub_100610F5C @ 0x100611210
// > sub_100610F5C @ 0x1006112c4
//
// This function is hookable on this platform (idp: arm, 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:07:53 +0000
//
bool __fastcall sub_100551280(__int64 a1, __int64 a2, unsigned int a3)
{
unsigned int v3; // w19
unsigned int v6; // w22
int v8; // [xsp+Ch] [xbp-24h] BYREF
if ( !a3 )
return 1;
v3 = a3;
if ( (*(_DWORD *)(a2 + 24) & 7) != 0 )
{
if ( 8 - (*(_DWORD *)(a2 + 24) & 7u) >= a3 )
v6 = a3;
else
v6 = 8 - (*(_DWORD *)(a2 + 24) & 7);
if ( !(unsigned int)sub_100550E58(a1, a2, &v8, v6) )
return 0;
v3 -= v6;
}
if ( v3 >= 8 )
{
if ( !(unsigned int)sub_100551338(a1, a2, v3 >> 3) )
return 0;
v3 &= 7u;
}
return !v3 || (unsigned int)sub_100550E58(a1, a2, &v8, v3);
}