//
// sub_100574020 from 0x100574020 to 0x100574254 (564 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009aaa30
//
// 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:08:19 +0000
//
__int64 __fastcall sub_100574020(__int64 a1)
{
int v2; // w20
__int64 v3; // x24
__int64 v4; // x21
__int64 result; // x0
int v6; // w22
__int64 v7; // x8
int v8; // w9
int v9; // w9
int v10; // w24
__int64 v11; // x8
int v12; // w22
__int64 v13; // x21
__int64 v14; // x1
sub_1005DBD78(*(_QWORD *)(a1 + 56), 0);
v2 = 0;
while ( *(_DWORD *)(a1 + 88) != v2 )
{
v3 = *(int *)(*(_QWORD *)(a1 + 80) + 4LL * v2++);
if ( (_DWORD)v3 != -1 )
{
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 96) + 16 * v3 + 8);
result = sub_1005DBED4(*(_QWORD *)(v4 + 8));
if ( (_DWORD)result )
return result;
v6 = v2 - 1;
while ( 1 )
{
sub_1005D7AD8(
*((_QWORD *)off_1009DA5E8 + 54),
v4,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile_remotefile.cpp",
64,
1);
v7 = *(_QWORD *)(a1 + 96);
v8 = *(_DWORD *)(v7 + 16 * v3 + 4);
if ( v8 == -1 )
break;
LABEL_6:
v3 = v8;
v4 = *(_QWORD *)(v7 + 16LL * v8 + 8);
result = sub_1005DBED4(*(_QWORD *)(v4 + 8));
if ( (_DWORD)result )
return result;
}
while ( *(_DWORD *)(a1 + 88) - 1 != v6 )
{
v8 = *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4LL * ++v6);
if ( v8 != -1 )
goto LABEL_6;
}
break;
}
}
v9 = 0;
do
{
if ( *(_DWORD *)(a1 + 128) == v9 )
{
LABEL_21:
v14 = *(_QWORD *)(a1 + 48);
if ( v14 )
sub_1005D7AD8(
*((_QWORD *)off_1009DA5E8 + 54),
v14,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile_remotefile.cpp",
183,
1);
sub_1005D7AD8(
*((_QWORD *)off_1009DA5E8 + 54),
*(_QWORD *)(a1 + 40),
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile_remotefile.cpp",
186,
1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 96LL))(a1);
sub_1005D7AD8(
*((_QWORD *)off_1009DA5E8 + 54),
a1,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile_remotefile.cpp",
188,
1);
return 0;
}
v10 = *(_DWORD *)(*(_QWORD *)(a1 + 120) + 4LL * v9++);
}
while ( v10 == -1 );
v11 = *(_QWORD *)(a1 + 136);
v12 = v9 - 1;
LABEL_15:
while ( 1 )
{
v13 = *(_QWORD *)(v11 + 16LL * v10 + 8);
if ( *(_QWORD *)(v13 + 16) )
{
result = sub_1005DB80C();
if ( (_DWORD)result )
return result;
}
sub_1005D7AD8(
*((_QWORD *)off_1009DA5E8 + 54),
v13,
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_profile_remotefile.cpp",
106,
1);
v11 = *(_QWORD *)(a1 + 136);
v10 = *(_DWORD *)(v11 + 16LL * v10 + 4);
if ( v10 == -1 )
{
while ( *(_DWORD *)(a1 + 128) - 1 != v12 )
{
v10 = *(_DWORD *)(*(_QWORD *)(a1 + 120) + 4LL * ++v12);
if ( v10 != -1 )
goto LABEL_15;
}
goto LABEL_21;
}
}
}