//
// sub_1005E2138 from 0x1005e2138 to 0x1005e225c (292 bytes)
//
// 1 xrefs:
// > sub_1005DBF8C @ 0x1005dbfb8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:09:40 +0000
//
__int64 __fastcall sub_1005E2138(__int64 a1, __int128 *a2, _DWORD *a3, __int64 a4)
{
char *v8; // x0
__int128 v9; // q0
__int128 v10; // q1
__int128 v11; // q2
__int128 v12; // q0
__int128 v13; // q1
__int128 v14; // q2
__int128 v15; // q0
__int128 v16; // q1
__int128 v17; // q2
__int128 v18; // q0
__int128 v19; // q1
__int64 v20; // x8
int v21; // w8
__int64 v22; // x10
__int64 result; // x0
if ( !a2 )
return 31;
if ( *(_DWORD *)a2 != 5 )
return 56;
v8 = (char *)sub_1005D7660(
*((__int64 **)off_1009DA5E8 + 54),
280,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_pluginfactory.cpp",
1021,
0);
if ( !v8 )
return 38;
*(_QWORD *)v8 = v8;
*((_QWORD *)v8 + 1) = v8;
*((_QWORD *)v8 + 2) = 0;
v9 = *a2;
v10 = a2[1];
v11 = a2[2];
*(_OWORD *)(v8 + 72) = a2[3];
*(_OWORD *)(v8 + 56) = v11;
*(_OWORD *)(v8 + 40) = v10;
*(_OWORD *)(v8 + 24) = v9;
v12 = a2[4];
v13 = a2[5];
v14 = a2[6];
*(_OWORD *)(v8 + 136) = a2[7];
*(_OWORD *)(v8 + 120) = v14;
*(_OWORD *)(v8 + 104) = v13;
*(_OWORD *)(v8 + 88) = v12;
v15 = a2[8];
v16 = a2[9];
v17 = a2[10];
*(_OWORD *)(v8 + 200) = a2[11];
*(_OWORD *)(v8 + 184) = v17;
*(_OWORD *)(v8 + 168) = v16;
*(_OWORD *)(v8 + 152) = v15;
v18 = a2[12];
v19 = a2[13];
v20 = *((_QWORD *)a2 + 30);
*(_OWORD *)(v8 + 248) = a2[14];
*(_OWORD *)(v8 + 232) = v19;
*(_OWORD *)(v8 + 216) = v18;
*((_QWORD *)v8 + 33) = v20;
*((_QWORD *)v8 + 34) = a4;
v21 = *(_DWORD *)(a1 + 928);
*(_DWORD *)(a1 + 928) = v21 + 1;
*((_DWORD *)v8 + 48) = v21;
v22 = *(_QWORD *)(a1 + 648);
*(_QWORD *)v8 = a1 + 640;
*((_QWORD *)v8 + 1) = v22;
*(_QWORD *)(a1 + 648) = v8;
**((_QWORD **)v8 + 1) = v8;
result = 0;
if ( a3 )
*a3 = v21;
return result;
}