{"type": "func", "start": 13173140, "end": 13173572, "name": "ClearPlatformerSavesPopup::FLAlert_Clicked", "pseudocode": "// \n// ClearPlatformerSavesPopup::FLAlert_Clicked from 0xc90194 to 0xc90344 (432 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'ClearPlatformerSavesPopup::FLAlert_Clicked @ 0xc9034c\n// > <???> @ 0xaa260\n// > <???> @ 0x14f47c0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:05:47 +0000\n// \n\n__int64 __fastcall ClearPlatformerSavesPopup::FLAlert_Clicked(\n        ClearPlatformerSavesPopup *this,\n        FLAlertLayer *a2,\n        unsigned __int8 a3)\n{\n  int v3; // w20\n  GameLevelManager *v5; // x0\n  GameLevelManager *v7; // x0\n  char *v8; // x2\n  cocos2d::CCString *v9; // x0\n  const char *CString; // x0\n  size_t v11; // x0\n  __int64 v12; // x20\n  char *v13; // [xsp+38h] [xbp+38h]\n  char *v14; // [xsp+38h] [xbp+38h]\n  __int64 v15; // [xsp+48h] [xbp+48h] BYREF\n  size_t v16; // [xsp+50h] [xbp+50h]\n  void *v17; // [xsp+58h] [xbp+58h]\n  __int64 v18; // [xsp+60h] [xbp+60h] BYREF\n  size_t v19; // [xsp+68h] [xbp+68h]\n  void *v20; // [xsp+70h] [xbp+70h]\n\n  v3 = a3;\n  v5 = (GameLevelManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( (_DWORD)v5 == 1 && v3 )\n  {\n    v7 = (GameLevelManager *)GameLevelManager::sharedState(v5);\n    v13 = (char *)(unsigned int)GameLevelManager::clearPlatformerSaves(v7, *((unsigned __int8 *)this + 672));\n    ClearPlatformerSavesPopup::updateStats(this);\n    if ( (_DWORD)v13 == 1 )\n      v8 = &byte_11B8890;\n    else\n      v8 = \"s\";\n    v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"Cleared <cg>%i</c> platformer save%s.\",\n                                v13,\n                                v8);\n    CString = (const char *)cocos2d::CCString::getCString(v9);\n    v15 = 0;\n    v14 = (char *)CString;\n    v16 = 0;\n    v17 = nullptr;\n    v11 = strlen(CString);\n    std::string::__init(&v15, v14, v11);\n    v18 = 0;\n    v19 = 0;\n    v20 = nullptr;\n    if ( (v15 & 1) != 0 )\n    {\n      std::string::__init(&v18, v17, v16);\n    }\n    else\n    {\n      v20 = v17;\n      v18 = v15;\n      v19 = v16;\n    }\n    v12 = FLAlertLayer::create(\n            0,\n            (cocos2d::CCLabelBMFont *)\"Cleared\",\n            (char *)&v18,\n            (ButtonSprite *)\"OK\",\n            nullptr,\n            300.0);\n    if ( (v18 & 1) != 0 )\n      operator delete(v20);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 1312LL))(v12);\n    if ( (v15 & 1) != 0 )\n      operator delete(v17);\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; ClearPlatformerSavesPopup::FLAlert_Clicked from 0xc90194 to 0xc90344 (432 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'ClearPlatformerSavesPopup::FLAlert_Clicked @ 0xc9034c\n; > <???> @ 0xaa260\n; > <???> @ 0x14f47c0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:05:47 +0000\n; \nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0xc90194\nMOV             X29, SP                                                ; +0x4, 0xc90198\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x8, 0xc9019c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0xc901a0\nSTR             X21, [SP,#0x80+var_60]                                 ; +0x10, 0xc901a4\nUXTB            W20, W2                                                ; +0x14, 0xc901a8\nMOV             X21, X0                                                ; +0x18, 0xc901ac\nMOV             X0, X1                                                 ; +0x1c, 0xc901b0\nLDR             X1, [X1]                                               ; +0x20, 0xc901b4\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0xc901b8\nLDR             X1, [X1,#0x40]                                         ; +0x28, 0xc901bc\nLDR             X2, [X2]                                               ; +0x2c, 0xc901c0\nSTR             X2, [X29,#0x80+var_8]                                  ; +0x30, 0xc901c4\nBLR             X1                                                     ; +0x34, 0xc901c8\nCMP             W0, #1                                                 ; +0x38, 0xc901cc\nB.NE            loc_C901D8                                             ; +0x3c, 0xc901d0\nCBNZ            W20, loc_C901FC                                        ; +0x40, 0xc901d4\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x44, 0xc901d8\nLDR             X1, [X29,#0x80+var_8]                                  ; +0x48, 0xc901dc\nLDR             X0, [X19]                                              ; +0x4c, 0xc901e0\nCMP             X1, X0                                                 ; +0x50, 0xc901e4\nB.NE            loc_C9030C                                             ; +0x54, 0xc901e8\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x58, 0xc901ec\nLDR             X21, [SP,#0x80+var_60]                                 ; +0x5c, 0xc901f0\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x60, 0xc901f4\nRET                                                                    ; +0x64, 0xc901f8\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x68, 0xc901fc\nLDRB            W1, [X21,#0x2A0]; int                                  ; +0x6c, 0xc90200\nBL              _ZN16GameLevelManager20clearPlatformerSavesEi; GameLevelManager::clearPlatformerSaves(int) ; +0x70, 0xc90204\nMOV             W1, W0                                                 ; +0x74, 0xc90208\nMOV             X0, X21; this                                          ; +0x78, 0xc9020c\nSTR             X1, [X29,#0x80+var_48]                                 ; +0x7c, 0xc90210\nBL              _ZN25ClearPlatformerSavesPopup11updateStatsEv; ClearPlatformerSavesPopup::updateStats(void) ; +0x80, 0xc90214\nLDR             X1, [X29,#0x80+var_48]; char *                         ; +0x84, 0xc90218\nCMP             W1, #1                                                 ; +0x88, 0xc9021c\nB.EQ            loc_C902E0                                             ; +0x8c, 0xc90220\nADRL            X2, (aSSSSSSLdSS+0x18); \"s\"                            ; +0x90, 0xc90224\nADRP            X0, #aClearedCgICPla@PAGE; \"Cleared <cg>%i</c> platformer save%s.\" ; +0x98, 0xc9022c\nADD             X20, X29, #0x80+var_38                                 ; +0x9c, 0xc90230\nADD             X0, X0, #aClearedCgICPla@PAGEOFF; \"Cleared <cg>%i</c> platformer save%s.\" ; +0xa0, 0xc90234\nADD             X21, X29, #0x80+var_20                                 ; +0xa4, 0xc90238\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xa8, 0xc9023c\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xac, 0xc90240\nSTR             XZR, [X29,#0x80+var_38]                                ; +0xb0, 0xc90244\nSTR             X0, [X29,#0x80+var_48]                                 ; +0xb4, 0xc90248\nSTR             XZR, [X29,#0x80+var_30]                                ; +0xb8, 0xc9024c\nSTR             XZR, [X29,#0x80+var_28]                                ; +0xbc, 0xc90250\nBL              .strlen                                                ; +0xc0, 0xc90254\nLDR             X1, [X29,#0x80+var_48]                                 ; +0xc4, 0xc90258\nMOV             X2, X0                                                 ; +0xc8, 0xc9025c\nMOV             X0, X20                                                ; +0xcc, 0xc90260\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0xd0, 0xc90264\nSTR             XZR, [X29,#0x80+var_20]                                ; +0xd4, 0xc90268\nLDRB            W0, [X29,#0x80+var_38]                                 ; +0xd8, 0xc9026c\nSTR             XZR, [X29,#0x80+var_18]                                ; +0xdc, 0xc90270\nSTR             XZR, [X29,#0x80+var_10]                                ; +0xe0, 0xc90274\nTBNZ            W0, #0, loc_C902F8                                     ; +0xe4, 0xc90278\nLDP             X0, X1, [X20]                                          ; +0xe8, 0xc9027c\nLDR             X2, [X29,#0x80+var_28]                                 ; +0xec, 0xc90280\nSTR             X2, [X29,#0x80+var_10]                                 ; +0xf0, 0xc90284\nSTP             X0, X1, [X29,#0x80+var_20]                             ; +0xf4, 0xc90288\nLDR             S0, =0x43960000                                        ; +0xf8, 0xc9028c\nADRP            X1, #aCleared@PAGE; \"Cleared\"                          ; +0xfc, 0xc90290\nADRP            X3, #aOk@PAGE; \"OK\"                                    ; +0x100, 0xc90294\nMOV             X0, #0                                                 ; +0x104, 0xc90298\nADD             X1, X1, #aCleared@PAGEOFF; \"Cleared\"                   ; +0x108, 0xc9029c\nMOV             X2, X21                                                ; +0x10c, 0xc902a0\nADD             X3, X3, #aOk@PAGEOFF; \"OK\"                             ; +0x110, 0xc902a4\nMOV             X4, #0                                                 ; +0x114, 0xc902a8\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x118, 0xc902ac\nMOV             X20, X0                                                ; +0x11c, 0xc902b0\nLDRB            W0, [X29,#0x80+var_20]                                 ; +0x120, 0xc902b4\nTBNZ            W0, #0, loc_C902EC                                     ; +0x124, 0xc902b8\nLDR             X1, [X20]                                              ; +0x128, 0xc902bc\nMOV             X0, X20                                                ; +0x12c, 0xc902c0\nLDR             X1, [X1,#0x520]                                        ; +0x130, 0xc902c4\nBLR             X1                                                     ; +0x134, 0xc902c8\nLDRB            W0, [X29,#0x80+var_38]                                 ; +0x138, 0xc902cc\nTBZ             W0, #0, loc_C901D8                                     ; +0x13c, 0xc902d0\nLDR             X0, [X29,#0x80+var_28]; void *                         ; +0x140, 0xc902d4\nBL              _ZdlPv; operator delete(void *)                        ; +0x144, 0xc902d8\nB               loc_C901D8                                             ; +0x148, 0xc902dc\nADRL            X2, byte_11B8890                                       ; +0x14c, 0xc902e0\nB               loc_C9022C                                             ; +0x154, 0xc902e8\nLDR             X0, [X29,#0x80+var_10]; void *                         ; +0x158, 0xc902ec\nBL              _ZdlPv; operator delete(void *)                        ; +0x15c, 0xc902f0\nB               loc_C902BC                                             ; +0x160, 0xc902f4\nLDR             X1, [X29,#0x80+var_28]                                 ; +0x164, 0xc902f8\nMOV             X0, X21                                                ; +0x168, 0xc902fc\nLDR             X2, [X29,#0x80+var_30]                                 ; +0x16c, 0xc90300\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0x170, 0xc90304\nB               loc_C9028C                                             ; +0x174, 0xc90308\nBL              .__stack_chk_fail                                      ; +0x178, 0xc9030c\nMOV             X19, X0                                                ; +0x17c, 0xc90310\nLDRB            W0, [X29,#0x80+var_38]                                 ; +0x180, 0xc90314\nTBZ             W0, #0, loc_C90324                                     ; +0x184, 0xc90318\nLDR             X0, [X29,#0x80+var_28]; void *                         ; +0x188, 0xc9031c\nBL              _ZdlPv; operator delete(void *)                        ; +0x18c, 0xc90320\nMOV             X0, X19                                                ; +0x190, 0xc90324\nBL              _Unwind_Resume                                         ; +0x194, 0xc90328\nLDRB            W1, [X29,#0x80+var_20]                                 ; +0x198, 0xc9032c\nMOV             X19, X0                                                ; +0x19c, 0xc90330\nTBZ             W1, #0, loc_C90314                                     ; +0x1a0, 0xc90334\nLDR             X0, [X29,#0x80+var_10]; void *                         ; +0x1a4, 0xc90338\nBL              _ZdlPv; operator delete(void *)                        ; +0x1a8, 0xc9033c\nB               loc_C90314                                             ; +0x1ac, 0xc90340", "xrefs": ["`non-virtual thunk to'ClearPlatformerSavesPopup::FLAlert_Clicked @ 0xc9034c", "<???> @ 0xaa260", "<???> @ 0x14f47c0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}