//
// sub_1005411E0 from 0x1005411e0 to 0x100541274 (148 bytes)
//
// 2 xrefs:
// > sub_100526FF8 @ 0x1005272ac
// > sub_100527B50 @ 0x100527ea4
//
// 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_1005411E0(__int64 *a1, __int64 a2)
{
void *v3; // x0
void *v4; // x19
__int64 v5; // x20
void *v6; // x0
__int64 v8; // x19
void *v9; // x0
if ( a2 )
{
v3 = (void *)sub_1005FF628(a2);
v4 = v3;
if ( v3 )
{
v5 = *a1;
if ( v5 )
{
v6 = *(void **)(v5 + 24);
if ( v6 )
sub_1005DE9D0(v6);
*(_QWORD *)(v5 + 24) = v4;
return 1;
}
sub_1005DE9D0(v3);
}
return 0;
}
v8 = *a1;
if ( !*a1 )
return 0;
v9 = *(void **)(v8 + 24);
if ( v9 )
sub_1005DE9D0(v9);
*(_QWORD *)(v8 + 24) = 0;
return 1;
}