//
// UploadPopup::onReturnToLevel from 0x1406329f0 to 0x140632ad9 (233 bytes)
//
// 2 xrefs:
// > UploadPopup::levelUploadFinished @ 0x14063275e
// > ??> @ 0x140930b60
//
// 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 11:35:29 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall UploadPopup::onReturnToLevel(__int64 *a1)
{
__int64 v2; // rdx
__int64 v3; // r8
__int64 v4; // r9
struct cocos2d::CCScene *v5; // rax
struct cocos2d::CCScene *v6; // rbx
__int64 v7; // rcx
cocos2d::CCDirector *v8; // rax
__int64 v9; // rcx
__int64 v10; // rcx
void *v11; // [rsp+30h] [rbp+8h]
void *v12; // [rsp+30h] [rbp+8h]
(*(void (__fastcall **)(__int64 *, _QWORD))(*a1 + 992))(a1, 0);
v5 = (struct cocos2d::CCScene *)EditLevelLayer::scene(a1[84], v2, v3, v4);
v6 = cocos2d::CCTransitionFade::create(0.5, v5);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::replaceScene(v8, v6);
v9 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v11 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v9 = qword_14090BFD0;
}
if ( *(_DWORD *)(v9 + 692) == *(_DWORD *)(v9 + 696) && !*(_BYTE *)(v9 + 688) )
{
v10 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v12 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v12);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v10 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::updateUserScore(v10);
}
}