//
// sub_1005E7914 from 0x1005e7914 to 0x1005e7984 (112 bytes)
//
// 2 xrefs:
// > ??> @ 0x10083d078
// > ??> @ 0x10083d0d0
//
// 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_1005E7914(__int64 a1, int a2, __int64 a3, __int64 a4)
{
__int64 v4; // x8
__int64 v6; // x9
__int64 v7; // x10
__int64 v8; // x10
v4 = *(_QWORD *)(a1 + 120);
if ( !a2 )
{
*(_QWORD *)(v4 + 496) = 0;
*(_QWORD *)(v4 + 504) = 0;
return 1;
}
if ( a2 != 8 )
return 0xFFFFFFFFLL;
v6 = *(_QWORD *)(a4 + 120);
v7 = *(_QWORD *)(v4 + 496);
if ( v7 )
{
if ( v7 != v4 )
return 0;
*(_QWORD *)(v6 + 496) = v6;
}
v8 = *(_QWORD *)(v4 + 504);
if ( !v8 )
return 1;
if ( v8 != v4 + 248 )
return 0;
*(_QWORD *)(v6 + 504) = v6 + 248;
return 1;
}