//
// sub_1004BC0F4 from 0x1004bc0f4 to 0x1004bc20c (280 bytes)
//
// 5 xrefs:
// > sub_1004CE560 @ 0x1004ce604
// > sub_1004CE560 @ 0x1004ce62c
// > sub_1004CE560 @ 0x1004ce654
// > sub_1004CE560 @ 0x1004ce67c
// > sub_1004D11BC @ 0x1004d1208
//
// 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_1004BC0F4(__int64 a1, __int128 *a2, _DWORD *a3, __int64 a4, int a5)
{
char *v10; // x0
__int128 v11; // q0
__int128 v12; // q0
__int128 v13; // q1
__int128 v14; // q2
__int128 v15; // q0
__int128 v16; // q1
__int128 v17; // q2
int v18; // w8
__int64 v19; // x10
__int64 result; // x0
if ( !a2 )
return 31;
if ( *(_DWORD *)a2 != 5 )
return 56;
v10 = (char *)sub_1004B14F8(
*((__int64 **)off_1008524C8 + 54),
280,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_pluginfactory.cpp",
1061,
0);
if ( !v10 )
return 38;
*(_QWORD *)v10 = v10;
*((_QWORD *)v10 + 1) = v10;
*((_QWORD *)v10 + 2) = 0;
v11 = *a2;
*(_OWORD *)(v10 + 40) = a2[1];
*(_OWORD *)(v10 + 24) = v11;
v12 = a2[2];
v13 = a2[3];
v14 = a2[4];
*(_OWORD *)(v10 + 104) = a2[5];
*(_OWORD *)(v10 + 88) = v14;
*(_OWORD *)(v10 + 72) = v13;
*(_OWORD *)(v10 + 56) = v12;
v15 = a2[6];
v16 = a2[7];
v17 = a2[8];
*((_QWORD *)v10 + 21) = *((_QWORD *)a2 + 18);
*(_OWORD *)(v10 + 152) = v17;
*(_OWORD *)(v10 + 136) = v16;
*(_OWORD *)(v10 + 120) = v15;
*((_QWORD *)v10 + 34) = a4;
*((_DWORD *)v10 + 44) = a5;
*((_DWORD *)v10 + 45) = 1048;
v18 = *(_DWORD *)(a1 + 928);
*(_DWORD *)(a1 + 928) = v18 + 1;
*((_DWORD *)v10 + 48) = v18;
v19 = *(_QWORD *)(a1 + 648);
*(_QWORD *)v10 = a1 + 640;
*((_QWORD *)v10 + 1) = v19;
*(_QWORD *)(a1 + 648) = v10;
**((_QWORD **)v10 + 1) = v10;
result = 0;
if ( a3 )
*a3 = v18;
return result;
}