//
// UploadPopup::onReturnToLevel from 0x7f22ec to 0x7f236c (128 bytes)
//
// 3 xrefs:
// > ??> @ 0xf6310
// > UploadPopup::levelUploadFinished @ 0x7f28d4
// > ??> @ 0x1547750
//
// 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:54:36 +0000
//
__int64 __fastcall UploadPopup::onReturnToLevel(EditLevelLayer **this, cocos2d::CCObject *a2)
{
cocos2d::CCDirector *v3; // x0
cocos2d::CCDirector *v4; // x20
GJGameLevel *v5; // x1
AppDelegate *v6; // x0
cocos2d::CCScene *v7; // x1
cocos2d::CCScene *v8; // x0
GameManager *v9; // x0
__int64 v10; // x0
int v11; // w1
__int64 result; // x0
GameLevelManager *v13; // x0
v3 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(EditLevelLayer **, _QWORD))*this + 134))(this, 0);
v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v3);
v6 = EditLevelLayer::scene(*(this + 84), v5);
v8 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v6, 0.5, v7);
v9 = (GameManager *)cocos2d::CCDirector::replaceScene(v4, v8);
v10 = GameManager::sharedState(v9);
v11 = *(_DWORD *)(v10 + 660);
result = *(unsigned int *)(v10 + 664);
if ( v11 == (_DWORD)result )
{
result = *(unsigned __int8 *)(GameManager::sharedState((GameManager *)result) + 656);
if ( !(_DWORD)result )
{
v13 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)result);
return GameLevelManager::updateUserScore(v13);
}
}
return result;
}