// // PauseLayer::onSideButtonPressed from 0x1001bfb00 to 0x1001bfe2c (812 bytes) // // 2 xrefs: // > PauseLayer::customSetup @ 0x1001be978 // > PauseLayer::customSetup @ 0x1001be89c // // 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 11:00:14 +0000 // __int64 __fastcall PauseLayer::onSideButtonPressed(__int64 a1, __int64 a2) { __int64 result; // x0 __int64 v5; // x0 void *v6; // x0 __int64 v7; // x0 __int64 v8; // x0 int v9; // w19 __int64 v10; // x0 __int64 v11; // x0 __int64 v12; // x20 __int64 v13; // x0 const char *v14; // x1 __int64 v15; // x0 __int64 v16; // x0 __int64 v17; // x0 __int64 v18; // x0 __int64 v19; // x0 __int64 v20; // x0 __int64 v21; // x21 int v22; // w0 __int64 v23; // x21 __int64 v24; // x0 __n128 v25; // q0 _QWORD *v26; // x0 __int64 v27; // x0 __int64 v28; // x0 __int64 v29; // x19 float v30; // [xsp+8h] [xbp-38h] BYREF __int64 v31; // [xsp+10h] [xbp-30h] BYREF __int64 v32; // [xsp+18h] [xbp-28h] BYREF result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2); if ( (int)result > 4 ) { if ( (int)result <= 6 ) { if ( (_DWORD)result == 5 ) { v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v17 + 560LL))(v17, 99); v6 = ChallengesPage::create(); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); } v7 = GameManager::sharedState(result); v8 = GameManager::toggleGameVariable(v7, "0173"); v9 = v8; v10 = GameManager::sharedState(v8); if ( *(_QWORD *)(v10 + 544) ) { v11 = GameManager::sharedState(v10); sub_10013ECDC(*(_QWORD *)(v11 + 544), v9); } v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2); v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v12); if ( v9 ) v14 = "sideBtn_damageOff_001.png"; else v14 = "sideBtn_damageOn_001.png"; v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, v14); return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 1160LL))(v12, v15); } else { switch ( (_DWORD)result ) { case 7: result = GameManager::sharedState(result); if ( *(_QWORD *)(result + 544) ) { result = GameManager::sharedState(result); if ( *(_QWORD *)(*(_QWORD *)(result + 544) + 1936LL) ) { v19 = GameManager::sharedState(result); v6 = (void *)PlatformerControlsPopup::create(*(_QWORD *)(*(_QWORD *)(v19 + 544) + 1936LL), 0); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); } } break; case 8: v21 = *(_QWORD *)(a1 + 624); if ( v21 ) { v22 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v21 + 352LL))(*(_QWORD *)(a1 + 624)); return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v21 + 344LL))(v21, v22 ^ 1u); } else { v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 512LL))(a2); v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 192LL))(a2); cocos2d::CCNode::convertToWorldSpace(&v32, v23, v24); v26 = cocos2d::CCNode::convertToNodeSpace(&v31, a1, &v32, v25); v27 = GameManager::sharedState(v26); v28 = TimeSpeedControl::create(*(_QWORD *)(v27 + 544)); *(_QWORD *)(a1 + 624) = v28; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 632) + 464LL))( *(_QWORD *)(a1 + 632), v28, 4); v29 = *(_QWORD *)(a1 + 624); sub_1000262BC(&v30, *(float *)&v31, *((float *)&v31 + 1) + -80.0); return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v29 + 184LL))(v29, &v30); } case 9: v6 = (void *)sub_10037F610(); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); default: return result; } } } else if ( (int)result <= 1 ) { if ( !(_DWORD)result ) { v16 = GameManager::sharedState(result); v6 = GameSettingsLayer::create(*(_QWORD *)(v16 + 544), 0); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); } if ( (_DWORD)result == 1 ) return sub_1001BFED8(a1); } else if ( (_DWORD)result == 2 ) { result = GameManager::sharedState(result); if ( *(_QWORD *)(result + 544) ) { result = GameManager::sharedState(result); if ( *(_QWORD *)(*(_QWORD *)(result + 544) + 1936LL) ) { v18 = GameManager::sharedState(result); v6 = (void *)DeathTrackerPopup::create(*(_QWORD *)(*(_QWORD *)(v18 + 544) + 1936LL)); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); } } } else { if ( (_DWORD)result != 3 ) { v5 = GameManager::sharedState(result); v6 = (void *)InfoLayer::create(*(_QWORD *)(*(_QWORD *)(v5 + 544) + 1936LL), 0, 0, 0); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); } result = GameManager::sharedState(result); if ( *(_QWORD *)(result + 544) ) { result = GameManager::sharedState(result); if ( *(_QWORD *)(*(_QWORD *)(result + 544) + 1936LL) ) { v20 = GameManager::sharedState(result); v6 = (void *)DeathMarkerSettingsPopup::create(*(_QWORD *)(*(_QWORD *)(v20 + 544) + 1936LL)); return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 1312LL))(v6); } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source