//
// sub_1008ED070 from 0x1008ed070 to 0x1008ed0df (111 bytes)
//
// 6 xrefs:
// > sub_1008F68C0 @ 0x1008f6933
// > sub_1008F6E60 @ 0x1008f6e99
// > sub_1008F7400 @ 0x1008f7444
// > EditorSoundConfigInfoLayer::likedItem @ 0x1008f89c9
// > sub_1008F8A00 @ 0x1008f8a64
// > EditorSoundConfigInfoLayer::downloadEditorSoundFinished @ 0x1008f97b0
//
// 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_1008ED070(__int64 a1, int a2)
{
__int64 v3; // rdi
unsigned int v4; // r15d
__int64 result; // rax
v3 = *(_QWORD *)(a1 + 144);
if ( !v3 || !(unsigned int)sub_1007FEF90(v3) )
return 0;
v4 = 0;
while ( 1 )
{
result = sub_1007FEFE0(*(_QWORD *)(a1 + 144), v4);
if ( result )
{
if ( *(_DWORD *)(result + 316) == a2 )
break;
}
if ( ++v4 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 144)) )
return 0;
}
return result;
}