//
// sub_1004E7054 from 0x1004e7054 to 0x1004e70c0 (108 bytes)
//
// 2 xrefs:
// > sub_10042CE18 @ 0x10042d234
// > sub_1004DA69C @ 0x1004da834
//
// 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_1004E7054(__int64 result, __int64 a2)
{
__int64 v3; // x20
__int64 v4; // x1
__int64 v5; // x1
if ( *(_DWORD *)(a2 + 48) )
{
v3 = result;
v4 = *(_QWORD *)(a2 + 40);
if ( v4 )
sub_100478D80(result, v4);
v5 = *(_QWORD *)(a2 + 8);
if ( v5 )
sub_100478D80(v3, v5);
*(_QWORD *)(a2 + 48) = 0;
*(_OWORD *)(a2 + 16) = 0u;
*(_OWORD *)(a2 + 32) = 0u;
*(_OWORD *)a2 = 0u;
return sub_100478D80(v3, a2);
}
return result;
}