{"type": "func", "start": 4299781848, "end": 4299782092, "name": "LevelBrowserLayer::onRemoveAllFavorites", "pseudocode": "// \n// LevelBrowserLayer::onRemoveAllFavorites from 0x1004976d8 to 0x1004977cc (244 bytes)\n// \n// 1 xrefs:\n// > LevelBrowserLayer::init @ 0x1004960d0\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 11:05:57 +0000\n// \n\nvoid __fastcall LevelBrowserLayer::onRemoveAllFavorites(__int64 a1)\n{\n  __int64 v2; // x8\n  const std::string::value_type *v3; // x1\n  void *v4; // x19\n  std::string __p; // [xsp+0h] [xbp-40h] BYREF\n  std::string v6; // [xsp+18h] [xbp-28h] BYREF\n\n  memset(&v6, 0, sizeof(v6));\n  v2 = *(_QWORD *)(a1 + 664);\n  v3 = \"Remove all levels from favorites?\\n\"\n       \"<cg>Search and folder filters apply.</c>\\n\"\n       \"<cy>Levels will not be deleted.</c>\";\n  if ( v2 && *(_DWORD *)(v2 + 316) == 103 )\n    v3 = \"Remove all lists from favorites?\\n<cg>Search and folder filters apply.</c>\";\n  std::string::assign(&v6, v3);\n  if ( SHIBYTE(v6.__r_.__value_.__r.__words[2]) < 0 )\n    sub_1000097D0(&__p, v6.__r_.__value_.__l.__data_, v6.__r_.__value_.__l.__size_);\n  else\n    __p = v6;\n  v4 = FLAlertLayer::create_1(\n         a1 + 552,\n         (__int64)\"Remove Favorites\",\n         (__int64)&__p,\n         (__int64)\"Cancel\",\n         (__int64)\"Remove\",\n         360.0);\n  if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__p.__r_.__value_.__l.__data_);\n  (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v4 + 72LL))(v4, 2);\n  (*(void (__fastcall **)(void *))(*(_QWORD *)v4 + 1312LL))(v4);\n  if ( SHIBYTE(v6.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(v6.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; LevelBrowserLayer::onRemoveAllFavorites from 0x1004976d8 to 0x1004977cc (244 bytes)\n; \n; 1 xrefs:\n; > LevelBrowserLayer::init @ 0x1004960d0\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 11:05:57 +0000\n; \nSUB             SP, SP, #0x50                                          ; +0x0, 0x1004976d8\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x4, 0x1004976dc\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x8, 0x1004976e0\nADD             X29, SP, #0x40                                         ; +0xc, 0x1004976e4\nMOV             X19, X0                                                ; +0x10, 0x1004976e8\nSTP             XZR, XZR, [SP,#0x40+var_28]                            ; +0x14, 0x1004976ec\nSTR             XZR, [SP,#0x40+var_28.__r_.__value_+0x10]              ; +0x18, 0x1004976f0\nLDR             X8, [X0,#0x298]                                        ; +0x1c, 0x1004976f4\nADRL            X1, aRemoveAllLevel; \"Remove all levels from favorites?\\n<cg>\"... ; +0x20, 0x1004976f8\nCBZ             X8, loc_100497718                                      ; +0x28, 0x100497700\nLDR             W8, [X8,#0x13C]                                        ; +0x2c, 0x100497704\nADRL            X9, aRemoveAllLists; \"Remove all lists from favorites?\\n<cg>S\"... ; +0x30, 0x100497708\nCMP             W8, #0x67 ; 'g'                                        ; +0x38, 0x100497710\nCSEL            X1, X9, X1, EQ; __s                                    ; +0x3c, 0x100497714\nADD             X0, SP, #0x40+var_28; this                             ; +0x40, 0x100497718\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x44, 0x10049771c\nLDRSB           W8, [SP,#0x40+var_28.__r_.__value_+0x17]               ; +0x48, 0x100497720\nTBNZ            W8, #0x1F, loc_10049773C                               ; +0x4c, 0x100497724\nLDUR            Q0, [SP,#0x40+var_28]                                  ; +0x50, 0x100497728\nSTR             Q0, [SP,#0x40+__p]                                     ; +0x54, 0x10049772c\nLDR             X8, [SP,#0x40+var_28.__r_.__value_+0x10]               ; +0x58, 0x100497730\nSTR             X8, [SP,#0x40+var_30]                                  ; +0x5c, 0x100497734\nB               loc_100497748                                          ; +0x60, 0x100497738\nLDP             X1, X2, [SP,#0x40+var_28]; __src                       ; +0x64, 0x10049773c\nMOV             X0, SP; __dst                                          ; +0x68, 0x100497740\nBL              sub_1000097D0                                          ; +0x6c, 0x100497744\nADRL            X1, aRemoveFavorite; \"Remove Favorites\"                ; +0x70, 0x100497748\nADRL            X3, aCancel; \"Cancel\"                                  ; +0x78, 0x100497750\nADRL            X4, aRemove; \"Remove\"                                  ; +0x80, 0x100497758\nMOV             W8, #0x43B40000                                        ; +0x88, 0x100497760\nFMOV            S0, W8                                                 ; +0x8c, 0x100497764\nADD             X0, X19, #0x228                                        ; +0x90, 0x100497768\nMOV             X2, SP                                                 ; +0x94, 0x10049776c\nBL              FLAlertLayer__create_1                                 ; +0x98, 0x100497770\nMOV             X19, X0                                                ; +0x9c, 0x100497774\nLDRSB           W8, [SP,#0x40+var_30+7]                                ; +0xa0, 0x100497778\nTBZ             W8, #0x1F, loc_100497788                               ; +0xa4, 0x10049777c\nLDR             X0, [SP,#0x40+__p]; __p                                ; +0xa8, 0x100497780\nBL              __ZdlPv; operator delete(void *)                       ; +0xac, 0x100497784\nLDR             X8, [X19]                                              ; +0xb0, 0x100497788\nLDR             X8, [X8,#0x48]                                         ; +0xb4, 0x10049778c\nMOV             X0, X19                                                ; +0xb8, 0x100497790\nMOV             W1, #2                                                 ; +0xbc, 0x100497794\nBLR             X8                                                     ; +0xc0, 0x100497798\nLDR             X8, [X19]                                              ; +0xc4, 0x10049779c\nLDR             X8, [X8,#0x520]                                        ; +0xc8, 0x1004977a0\nMOV             X0, X19                                                ; +0xcc, 0x1004977a4\nBLR             X8                                                     ; +0xd0, 0x1004977a8\nLDRSB           W8, [SP,#0x40+var_28.__r_.__value_+0x17]               ; +0xd4, 0x1004977ac\nTBZ             W8, #0x1F, loc_1004977BC                               ; +0xd8, 0x1004977b0\nLDR             X0, [SP,#0x40+var_28]; __p                             ; +0xdc, 0x1004977b4\nBL              __ZdlPv; operator delete(void *)                       ; +0xe0, 0x1004977b8\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xe4, 0x1004977bc\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xe8, 0x1004977c0\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xec, 0x1004977c4\nRET                                                                    ; +0xf0, 0x1004977c8", "xrefs": ["LevelBrowserLayer::init @ 0x1004960d0"], "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"}