//
// LocalLevelManager::postFileResults from 0x1006cf5f0 to 0x1006cf7dc (492 bytes)
//
// 4 xrefs:
// > LocalLevelManager::filesPicked @ 0x1006cf3ee
// > LocalLevelManager::queueFileResults @ 0x1006cf4da
// > LocalLevelManager::fileShareFinished @ 0x1006cf54a
// > sub_1006CF580 @ 0x1006cf5b2
//
// 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:35:38 +0000
//
void __fastcall LocalLevelManager::postFileResults(__int64 a1)
{
_DWORD *v1; // r15
int v2; // r12d
_DWORD *v3; // r14
int v4; // esi
const char *CString; // r14
__int64 v6; // rax
size_t v7; // rax
size_t v8; // r15
char *v9; // r12
size_t v10; // r13
__int64 v11; // r14
char v12; // r15
char *v13; // rax
char v14; // [rsp+0h] [rbp-80h]
__int128 v15; // [rsp+8h] [rbp-78h] BYREF
void *v16; // [rsp+18h] [rbp-68h]
__int128 v17; // [rsp+20h] [rbp-60h] BYREF
void *v18; // [rsp+30h] [rbp-50h]
__int128 __dst; // [rsp+40h] [rbp-40h] BYREF
void *__p; // [rsp+50h] [rbp-30h]
if ( *(int *)(a1 + 612) >= 0 )
{
v1 = cocos2d::CCNotificationCenter::sharedNotificationCenter();
v2 = *(_DWORD *)(a1 + 612);
v3 = operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v3);
*(_QWORD *)v3 = off_100ABB920;
v3[14] = v2;
cocos2d::CCObject::autorelease((__int64)v3);
cocos2d::CCNotificationCenter::postNotification((__int64)v1, "LevelsImportedNotification", (__int64)v3);
*(_DWORD *)(a1 + 612) = -1;
}
v4 = *(_DWORD *)(a1 + 616);
if ( v4 <= 0 )
goto LABEL_22;
if ( v4 == 1 )
{
CString = "Level exported!";
}
else
{
v6 = sub_10088E820("%i levels exported!", v14);
CString = (const char *)cocos2d::CCString::getCString(v6);
}
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
if ( v7 >= 0x17 )
{
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
v9 = (char *)operator new(v10);
__p = v9;
*(_QWORD *)&__dst = v10 + 1;
*((_QWORD *)&__dst + 1) = v8;
goto LABEL_14;
}
LOBYTE(__dst) = 2 * v7;
v9 = (char *)&__dst + 1;
if ( v7 )
LABEL_14:
memmove(v9, CString, v8);
v9[v8] = 0;
v11 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector() + 272);
v12 = __dst & 1;
if ( (__dst & 1) != 0 )
{
sub_10001AD30(&v17, __p, *((unsigned __int64 *)&__dst + 1));
}
else
{
v18 = __p;
v17 = __dst;
}
LOWORD(v15) = 0;
v13 = TextAlertPopup::create(&v17, 0x96u, &v15, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v11 + 464LL))(v11, v13, 100);
if ( (v15 & 1) == 0 )
{
if ( (v17 & 1) == 0 )
goto LABEL_20;
LABEL_24:
operator delete(v18);
if ( !v12 )
goto LABEL_22;
goto LABEL_21;
}
operator delete(v16);
if ( (v17 & 1) != 0 )
goto LABEL_24;
LABEL_20:
if ( v12 )
LABEL_21:
operator delete(__p);
LABEL_22:
*(_DWORD *)(a1 + 616) = -1;
}