//
// sub_100428160 from 0x100428160 to 0x100428280 (288 bytes)
//
// 2 xrefs:
// > sub_100427FD0 @ 0x1004280a4
// > sub_1004CEE58 @ 0x1004cf0d4
//
// 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_100428160(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x0
_QWORD *v4; // x8
_QWORD *v5; // x9
_QWORD *v6; // x21
__int64 v7; // x21
_QWORD *v8; // x0
_QWORD *v9; // x9
__int64 v10; // x0
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 40LL))(a1);
if ( !(_DWORD)result )
{
*(_BYTE *)(a1 + 80) = 0;
result = sub_100428538(a1);
if ( !(_DWORD)result )
{
v3 = *(_QWORD *)(a1 + 8);
if ( v3 != -1 )
sub_1004F5F00(v3);
v4 = *(_QWORD **)(a1 + 16);
while ( v4 != (_QWORD *)(a1 + 16) )
{
v6 = (_QWORD *)*v4;
v5 = (_QWORD *)v4[1];
*v5 = *v4;
*(_QWORD *)(*v4 + 8LL) = v5;
*v4 = v4;
v4[1] = v4;
result = sub_10044D1DC(v4);
v4 = v6;
if ( (_DWORD)result )
return result;
}
v7 = *(_QWORD *)(a1 + 40);
while ( v7 != a1 + 40 )
{
if ( v7 )
v8 = (_QWORD *)(v7 - 8);
else
v8 = nullptr;
v7 = v8[1];
v9 = (_QWORD *)v8[2];
*v9 = v7;
*(_QWORD *)(v8[1] + 8LL) = v9;
v8[2] = v8 + 1;
v8[1] = v8 + 1;
result = (*(__int64 (__fastcall **)(_QWORD *))(*v8 + 16LL))(v8);
if ( (_DWORD)result )
return result;
}
v10 = *(_QWORD *)(a1 + 64);
if ( v10 )
v10 = sub_1004B5C10(v10, 0);
result = sub_1004B3C10(v10);
if ( !(_DWORD)result )
{
sub_1004B1970(
*((_QWORD *)off_1008524C8 + 54),
a1,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile.cpp",
235,
1);
return 0;
}
}
}
return result;
}