//
// sub_100048E98 from 0x100048e98 to 0x100048f10 (120 bytes)
//
// 6 xrefs:
// > sub_100048C00 @ 0x100048c3c
// > GJShopLayer::init @ 0x10014a850
// > GJShopLayer::init @ 0x10014a8f4
// > GJShopLayer::onExit @ 0x10014be6c
// > GJShopLayer::onExit @ 0x10014bf10
// > sub_100151EF8 @ 0x100151f4c
//
// 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
//
__int64 __fastcall sub_100048E98(__int64 a1, unsigned __int64 a2)
{
size_t v4; // x21
void *v5; // x0
if ( a2 >= 0x7FFFFFFFFFFFFFF8LL )
sub_100009850();
if ( a2 > 0x16 )
{
if ( (a2 | 7) == 0x17 )
v4 = 25;
else
v4 = (a2 | 7) + 1;
v5 = operator new(v4);
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = v4 | 0x8000000000000000LL;
*(_QWORD *)a1 = v5;
}
else
{
*(_QWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0;
*(_QWORD *)a1 = 0;
*(_BYTE *)(a1 + 23) = a2;
}
return a1;
}