//
// LocalLevelManager::filesPicked from 0x912524 to 0x912728 (516 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LocalLevelManager::filesPicked @ 0x91272c
// > ??> @ 0x80260
// > ??> @ 0x1467450
//
// 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 12:57:17 +0000
//
__int64 __fastcall LocalLevelManager::filesPicked(__int64 a1, __int64 a2)
{
_QWORD *v4; // x20
_QWORD *v5; // x22
int v6; // w26
char *v7; // x0
_QWORD *v8; // x20
_QWORD *v9; // x19
const char *v10; // x0
char *v11; // x19
char *v12; // x0
void *v14; // [xsp+68h] [xbp+68h] BYREF
char *v15; // [xsp+70h] [xbp+70h]
char *i; // [xsp+78h] [xbp+78h]
char v17; // [xsp+80h] [xbp+80h] BYREF
char v18[7]; // [xsp+81h] [xbp+81h] BYREF
__int64 v19; // [xsp+88h] [xbp+88h]
void *v20; // [xsp+90h] [xbp+90h]
v4 = *(_QWORD **)a2;
v5 = *(_QWORD **)(a2 + 8);
v14 = nullptr;
v15 = nullptr;
for ( i = nullptr; v5 != v4; v4 += 3 )
{
v19 = 0;
strcpy(v18, ".gdlvl");
v20 = nullptr;
v17 = 12;
v6 = (unsigned __int8)GameToolbox::stringEndsWith((__int64)v4, (__int64)&v17);
if ( (v17 & 1) != 0 )
operator delete(v20);
if ( v6 )
{
v7 = v15;
if ( v15 == i )
{
std::vector::__push_back_slow_path((__int64 *)&v14, v4);
}
else
{
if ( v15 )
{
std::string::basic_string((unsigned __int64)v15, v4);
v7 = v15;
}
v15 = v7 + 24;
}
}
}
*(_DWORD *)(a1 + 588) = LocalLevelManager::importLevelsFromPaths(
(cocos2d::CCArray **)a1,
(unsigned __int8 **)&v14,
*(_DWORD *)(a1 + 580));
v8 = *(_QWORD **)(a2 + 8);
v9 = *(_QWORD **)a2;
if ( *(_QWORD **)a2 != v8 )
{
do
{
v10 = (char *)v9 + 1;
if ( (*(_BYTE *)v9 & 1) != 0 )
v10 = (const char *)v9[2];
remove(v10);
v9 += 3;
}
while ( v8 != v9 );
}
LocalLevelManager::queueFileResults((LocalLevelManager *)a1);
v11 = (char *)v14;
if ( v14 )
{
v12 = v15;
if ( v14 != v15 )
{
do
{
v15 = v12 - 24;
std::string::~string((__int64)(v12 - 24));
v12 = v15;
}
while ( v11 != v15 );
v12 = (char *)v14;
}
operator delete(v12);
}
return _stack_chk_guard;
}