//
// sub_1008ED520 from 0x1008ed520 to 0x1008ed59f (127 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::uploadActionFinished @ 0x1008f7ea3
// > EditorSoundConfigInfoLayer::deleteEditorSoundFinished @ 0x1008f99f7
//
// This function is hookable on this platform (idp: pc, 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 12:37:54 +0000
//
__int64 __fastcall sub_1008ED520(__int64 a1, int a2)
{
__int64 v3; // rdi
unsigned int v4; // r15d
__int64 result; // rax
v3 = *(_QWORD *)(a1 + 152);
if ( v3 == 0 || a2 <= 0 || !(unsigned int)sub_1007FEF90(v3) )
return 0;
v4 = 0;
while ( 1 )
{
result = sub_1007FEFE0(*(_QWORD *)(a1 + 152), v4);
if ( result )
{
if ( *(_DWORD *)(result + 316) == a2 )
break;
}
if ( ++v4 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 152)) )
return 0;
}
return result;
}