{"type": "func", "start": 9958344, "end": 9958628, "name": "CustomSongLayer::onSearch", "pseudocode": "// \n// CustomSongLayer::onSearch from 0x97f3c8 to 0x97f4e4 (284 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0xfe230\n// > CustomSongLayer::init @ 0x981114\n// > <???> @ 0x1547bf8\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 12:57:50 +0000\n// \n\n__int64 __fastcall CustomSongLayer::onSearch(CustomSongLayer *this, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // x0\n  FMODAudioEngine *GameVariable; // x0\n  FMODAudioEngine *v5; // x0\n  const char *v6; // x0\n  SongInfoObject *v7; // x0\n  CustomSongWidget *v8; // x20\n  SongInfoObject *v9; // x0\n  GameManager *v11; // x0\n  __int64 v12[2]; // [xsp+30h] [xbp+30h] BYREF\n  void *v13; // [xsp+40h] [xbp+40h]\n\n  v3 = (GameManager *)GameManager::sharedState(_stack_chk_guard);\n  GameVariable = (FMODAudioEngine *)(unsigned __int8)GameManager::getGameVariable(v3, \"0051\");\n  if ( (_BYTE)GameVariable )\n  {\n    v5 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(GameVariable);\n    FMODAudioEngine::stopAllMusic(v5, 1);\n    (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 86) + 1160LL))(*((_QWORD *)this + 86), 0);\n    CCTextInputNode::getString(*((CCTextInputNode **)this + 86), v12);\n    v6 = (char *)v12 + 1;\n    if ( (v12[0] & 1) != 0 )\n      v6 = (const char *)v13;\n    v7 = (SongInfoObject *)atoi(v6);\n    v8 = *((CustomSongWidget **)this + 87);\n    v9 = (SongInfoObject *)SongInfoObject::create(v7);\n    CustomSongWidget::updateSongObject(v8, v9);\n    CustomSongWidget::getSongInfoIfUnloaded(*((CustomSongWidget **)this + 87));\n    if ( (v12[0] & 1) != 0 )\n      operator delete(v13);\n  }\n  else\n  {\n    v11 = (GameManager *)GameManager::sharedState(GameVariable);\n    GameManager::setGameVariable(v11, \"0051\", 1u);\n    CustomSongLayer::showNewgroundsMessage(this);\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; CustomSongLayer::onSearch from 0x97f3c8 to 0x97f4e4 (284 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0xfe230\n; > CustomSongLayer::init @ 0x981114\n; > <???> @ 0x1547bf8\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 12:57:50 +0000\n; \nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x97f3c8\nMOV             X29, SP                                                ; +0x4, 0x97f3cc\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x97f3d0\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x97f3d4\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x10, 0x97f3d8\nMOV             X21, X0                                                ; +0x14, 0x97f3dc\nADRL            X20, a0051; \"0051\"                                     ; +0x18, 0x97f3e0\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x97f3e8\nLDR             X0, [X0]; this                                         ; +0x24, 0x97f3ec\nSTR             X0, [X29,#0x50+var_8]                                  ; +0x28, 0x97f3f0\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2c, 0x97f3f4\nMOV             X1, X20; char *                                        ; +0x30, 0x97f3f8\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x34, 0x97f3fc\nUXTB            W0, W0; this                                           ; +0x38, 0x97f400\nCBZ             W0, loc_97F49C                                         ; +0x3c, 0x97f404\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x40, 0x97f408\nADD             X20, X29, #0x50+var_20                                 ; +0x44, 0x97f40c\nMOV             W1, #1; bool                                           ; +0x48, 0x97f410\nBL              _ZN15FMODAudioEngine12stopAllMusicEb; FMODAudioEngine::stopAllMusic(bool) ; +0x4c, 0x97f414\nLDR             X2, [X21,#0x2B0]                                       ; +0x50, 0x97f418\nMOV             W1, #0                                                 ; +0x54, 0x97f41c\nMOV             X0, X2                                                 ; +0x58, 0x97f420\nLDR             X2, [X2]                                               ; +0x5c, 0x97f424\nLDR             X2, [X2,#0x488]                                        ; +0x60, 0x97f428\nBLR             X2                                                     ; +0x64, 0x97f42c\nLDR             X0, [X21,#0x2B0]; this                                 ; +0x68, 0x97f430\nMOV             X8, X20                                                ; +0x6c, 0x97f434\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x70, 0x97f438\nLDRB            W1, [X29,#0x50+var_20]                                 ; +0x74, 0x97f43c\nADD             X0, X20, #1; char *                                    ; +0x78, 0x97f440\nTBNZ            W1, #0, loc_97F494                                     ; +0x7c, 0x97f444\nBL              .atoi                                                  ; +0x80, 0x97f448\nLDR             X20, [X21,#0x2B8]                                      ; +0x84, 0x97f44c\nBL              _ZN14SongInfoObject6createEi; SongInfoObject::create(int) ; +0x88, 0x97f450\nMOV             X1, X0; SongInfoObject *                               ; +0x8c, 0x97f454\nMOV             X0, X20; this                                          ; +0x90, 0x97f458\nBL              _ZN16CustomSongWidget16updateSongObjectEP14SongInfoObject; CustomSongWidget::updateSongObject(SongInfoObject *) ; +0x94, 0x97f45c\nLDR             X0, [X21,#0x2B8]; this                                 ; +0x98, 0x97f460\nBL              _ZN16CustomSongWidget21getSongInfoIfUnloadedEv; CustomSongWidget::getSongInfoIfUnloaded(void) ; +0x9c, 0x97f464\nLDRB            W0, [X29,#0x50+var_20]                                 ; +0xa0, 0x97f468\nTBNZ            W0, #0, loc_97F4B8                                     ; +0xa4, 0x97f46c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xa8, 0x97f470\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xac, 0x97f474\nLDR             X0, [X19]                                              ; +0xb0, 0x97f478\nCMP             X1, X0                                                 ; +0xb4, 0x97f47c\nB.NE            loc_97F4C4                                             ; +0xb8, 0x97f480\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xbc, 0x97f484\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xc0, 0x97f488\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xc4, 0x97f48c\nRET                                                                    ; +0xc8, 0x97f490\nLDR             X0, [X29,#0x50+var_10]                                 ; +0xcc, 0x97f494\nB               loc_97F448                                             ; +0xd0, 0x97f498\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xd4, 0x97f49c\nMOV             X1, X20; char *                                        ; +0xd8, 0x97f4a0\nMOV             W2, #1; bool                                           ; +0xdc, 0x97f4a4\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0xe0, 0x97f4a8\nMOV             X0, X21; this                                          ; +0xe4, 0x97f4ac\nBL              _ZN15CustomSongLayer21showNewgroundsMessageEv; CustomSongLayer::showNewgroundsMessage(void) ; +0xe8, 0x97f4b0\nB               loc_97F470                                             ; +0xec, 0x97f4b4\nLDR             X0, [X29,#0x50+var_10]; void *                         ; +0xf0, 0x97f4b8\nBL              _ZdlPv; operator delete(void *)                        ; +0xf4, 0x97f4bc\nB               loc_97F470                                             ; +0xf8, 0x97f4c0\nBL              .__stack_chk_fail                                      ; +0xfc, 0x97f4c4\nLDRB            W1, [X29,#0x50+var_20]                                 ; +0x100, 0x97f4c8\nMOV             X19, X0                                                ; +0x104, 0x97f4cc\nTBZ             W1, #0, loc_97F4DC                                     ; +0x108, 0x97f4d0\nLDR             X0, [X29,#0x50+var_10]; void *                         ; +0x10c, 0x97f4d4\nBL              _ZdlPv; operator delete(void *)                        ; +0x110, 0x97f4d8\nMOV             X0, X19                                                ; +0x114, 0x97f4dc\nBL              _Unwind_Resume                                         ; +0x118, 0x97f4e0", "xrefs": ["<???> @ 0xfe230", "CustomSongLayer::init @ 0x981114", "<???> @ 0x1547bf8"], "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"}