//
// sub_100540848 from 0x100540848 to 0x10054088c (68 bytes)
//
// 6 xrefs:
// > sub_10051CF68 @ 0x10051dab8
// > sub_100521AE0 @ 0x100522418
// > sub_100526EB0 @ 0x100526fac
// > sub_100528820 @ 0x100528938
// > sub_100537D24 @ 0x100538834
// > sub_100538A48 @ 0x100539354
//
// 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_100540848(__int64 a1)
{
__int64 result; // x0
result = *(_QWORD *)(a1 + 32);
if ( result )
{
if ( result == *(_QWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = sub_1005DAE6C(result);
result = *(_QWORD *)(a1 + 32);
}
result = sub_1005DA554(result);
*(_QWORD *)(a1 + 32) = 0;
}
return result;
}