//
// sub_1004282BC from 0x1004282bc to 0x100428400 (324 bytes)
//
// 1 xrefs:
// > ??> @ 0x100826d18
//
// 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_1004282BC(__int64 a1, int a2, int a3, __int64 a4)
{
__int64 v4; // x22
char v7; // w21
__int64 v8; // x19
__int64 v9; // x0
_QWORD *v10; // x21
__int64 v11; // x0
__int64 v12; // x9
_QWORD *v13; // x20
_QWORD *v14; // x23
_QWORD *v15; // x0
__int64 v16; // x0
if ( *(_BYTE *)(a1 + 80) )
return 28;
if ( a2 )
v7 = a2;
else
v7 = 48;
sub_1004B4118(a4);
v4 = sub_1004F59C4(a3, v7);
if ( !(_DWORD)v4 )
{
v8 = *(_QWORD *)(a1 + 64);
sub_1004B5C70(v8);
v9 = sub_1004B11FC(
*((_QWORD *)off_1008524C8 + 54),
1392,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile.cpp",
96,
0,
0,
1);
if ( v9 )
{
v10 = (_QWORD *)v9;
v11 = sub_10044CD94();
v4 = sub_10044CEC4(v11, 0, a1);
if ( !(_DWORD)v4 )
{
v12 = *(_QWORD *)(a1 + 24);
*v10 = a1 + 16;
v10[1] = v12;
*(_QWORD *)(a1 + 24) = v10;
*(_QWORD *)v10[1] = v10;
v13 = (_QWORD *)(a1 + 40);
v14 = v13;
while ( 1 )
{
v14 = (_QWORD *)*v14;
if ( v14 == v13 )
break;
if ( v14 )
v15 = v14 - 1;
else
v15 = nullptr;
v16 = (*(__int64 (__fastcall **)(_QWORD *, _QWORD *))(*v15 + 64LL))(v15, v10);
if ( (_DWORD)v16 )
{
v4 = v16;
goto LABEL_18;
}
}
v4 = 0;
}
}
else
{
v4 = 38;
}
LABEL_18:
sub_1004B5CA0(v8);
}
return v4;
}