//
// sub_100656E40 from 0x100656e40 to 0x100656fb1 (369 bytes)
//
// 1 xrefs:
// > SFXBrowser::sfxFolderPicked @ 0x100432d9f
//
// 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:34:51 +0000
//
__int64 __fastcall sub_100656E40(__int64 a1, int a2, unsigned int a3)
{
unsigned int v3; // r15d
__int64 v5; // rdi
__int64 v7; // r14
__int64 v8; // rdi
__int64 v9; // r12
unsigned int v10; // eax
__int64 v11; // rax
unsigned int v12; // r12d
__int64 v13; // rsi
__int64 v14; // rdi
__int64 v15; // rdi
__int64 v16; // rax
__int64 v17; // rdi
__int64 v19; // rsi
__int64 v20; // rdi
__int64 v21; // [rsp+0h] [rbp-30h]
if ( a2 >= 2
&& (v5 = *(_QWORD *)(a1 + 824)) != 0
&& (v7 = cocos2d::CCDictionary::objectForKey_1(v5, (unsigned int)a2),
v8 = *(_QWORD *)(a1 + 824),
v8 != 0 && (int)a3 > 0)
&& (v9 = cocos2d::CCDictionary::objectForKey_1(v8, a3), v7 != 0 && v9 != 0)
&& *(_BYTE *)(v9 + 72) == 1 )
{
v10 = *(_DWORD *)(v7 + 60);
LOBYTE(v3) = 1;
if ( v10 != a3 )
{
if ( *(_BYTE *)(v7 + 72) == 1 )
{
v11 = v9;
v12 = 0;
v21 = v11;
do
{
if ( *(_DWORD *)(v11 + 76) == 1 || v12 > 0x63 )
break;
if ( v11 == v7 )
return 0;
v13 = *(int *)(v11 + 60);
if ( v13 <= 0 )
break;
v14 = *(_QWORD *)(a1 + 824);
if ( !v14 )
break;
v11 = cocos2d::CCDictionary::objectForKey_1(v14, v13);
++v12;
}
while ( v11 );
v10 = *(_DWORD *)(v7 + 60);
v9 = v21;
}
v15 = *(_QWORD *)(a1 + 824);
if ( v15 != 0 && (int)v10 > 0 )
{
v16 = cocos2d::CCDictionary::objectForKey_1(v15, v10);
if ( v16 )
{
if ( *(_BYTE *)(v16 + 72)
|| (v19 = *(int *)(v16 + 60), v20 = *(_QWORD *)(a1 + 824), v19 > 0 && v20 != 0)
&& (v16 = cocos2d::CCDictionary::objectForKey_1(v20, v19)) != 0
&& *(_BYTE *)(v16 + 72) == 1 )
{
v17 = *(_QWORD *)(v16 + 152);
if ( v17 )
sub_1007FF140(v17, v7, 1);
}
}
}
sub_1007FEBF0(*(_QWORD *)(v9 + 152), v7);
*(_DWORD *)(v7 + 60) = a3;
}
}
else
{
return 0;
}
return v3;
}