{"type": "func", "start": 4584944, "end": 4585094, "name": "CustomSongLayer::onSearch", "pseudocode": "// \n// CustomSongLayer::onSearch from 0x45f5f0 to 0x45f686 (150 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid CustomSongLayer::onSearch(CustomSongLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // r0\n  GameManager *v4; // r0\n  FMODAudioEngine *v5; // r0\n  SongInfoObject *v6; // r0\n  CustomSongWidget *m_songWidget; // r7\n  int v8; // r1\n  SongInfoObject *v9; // r0\n  char *v10[3]; // [sp+0h] [bp-Ch] BYREF\n\n  v10[0] = (char *)a1;\n  v10[1] = (char *)a2;\n  v3 = GameManager::sharedState();\n  if ( GameManager::getGameVariable(v3, \"0051\") )\n  {\n    v5 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::stopAllMusic(v5, (bool)&dword_0 + 1);\n    a1->m_songIDInput->onClickTrackNode(a1->m_songIDInput, 0);\n    CCTextInputNode::getString((CCTextInputNode *)v10, (int)a1->m_songIDInput);\n    v6 = (SongInfoObject *)atoi(v10[0]);\n    m_songWidget = a1->m_songWidget;\n    v9 = SongInfoObject::create(v6, v8);\n    CustomSongWidget::updateSongObject(m_songWidget, v9);\n    CustomSongWidget::getSongInfoIfUnloaded(a1->m_songWidget);\n    sub_774008(v10);\n  }\n  else\n  {\n    v4 = GameManager::sharedState();\n    GameManager::setGameVariable(v4, \"0051\", 1);\n    CustomSongLayer::showNewgroundsMessage(a1);\n  }\n}", "assembly": "; \n; CustomSongLayer::onSearch from 0x45f5f0 to 0x45f686 (150 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R0-R2,R4-R7,LR}                                       ; +0x0, 0x45f5f0\nMOV             R5, R0                                                 ; +0x2, 0x45f5f2\nLDR             R4, =(__stack_chk_guard_ptr - 0x45F5FC)                ; +0x4, 0x45f5f4\nLDR             R6, =(a0051 - 0x45F600); \"0051\"                        ; +0x6, 0x45f5f6\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0x8, 0x45f5f8\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xa, 0x45f5fa\nADD             R6, PC; \"0051\"                                         ; +0xc, 0x45f5fc\nLDR             R3, [R4]                                               ; +0xe, 0x45f5fe\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x10, 0x45f600\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x12, 0x45f602\nMOV             R1, R6; char *                                         ; +0x16, 0x45f606\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x18, 0x45f608\nCBNZ            R0, loc_45F622                                         ; +0x1c, 0x45f60c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1e, 0x45f60e\nMOV             R1, R6; char *                                         ; +0x22, 0x45f612\nMOVS            R2, #1; bool                                           ; +0x24, 0x45f614\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x26, 0x45f616\nMOV             R0, R5; this                                           ; +0x2a, 0x45f61a\nBL              _ZN15CustomSongLayer21showNewgroundsMessageEv; CustomSongLayer::showNewgroundsMessage(void) ; +0x2c, 0x45f61c\nB               loc_45F676                                             ; +0x30, 0x45f620\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x32, 0x45f622\nMOVS            R1, #(dword_0+1); p                                    ; +0x36, 0x45f626\nBL              _ZN15FMODAudioEngine12stopAllMusicEb; FMODAudioEngine::stopAllMusic(bool) ; +0x38, 0x45f628\nLDR.W           R0, [R5,#0x200]                                        ; +0x3c, 0x45f62c\nMOVS            R1, #0                                                 ; +0x40, 0x45f630\nMOV             R6, SP                                                 ; +0x42, 0x45f632\nLDR             R3, [R0]                                               ; +0x44, 0x45f634\nLDR.W           R3, [R3,#0x23C]                                        ; +0x46, 0x45f636\nBLX             R3                                                     ; +0x4a, 0x45f63a\nMOV             R0, SP; this                                           ; +0x4c, 0x45f63c\nLDR.W           R1, [R5,#0x200]                                        ; +0x4e, 0x45f63e\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x52, 0x45f642\nLDR             R0, [SP,#0xC+var_C]; char *                            ; +0x56, 0x45f646\nBLX             atoi                                                   ; +0x58, 0x45f648\nLDR.W           R7, [R5,#0x204]                                        ; +0x5c, 0x45f64c\nBL              _ZN14SongInfoObject6createEi; SongInfoObject::create(int) ; +0x60, 0x45f650\nMOV             R1, R0; SongInfoObject *                               ; +0x64, 0x45f654\nMOV             R0, R7; this                                           ; +0x66, 0x45f656\nBL              _ZN16CustomSongWidget16updateSongObjectEP14SongInfoObject; CustomSongWidget::updateSongObject(SongInfoObject *) ; +0x68, 0x45f658\nLDR.W           R0, [R5,#0x204]; this                                  ; +0x6c, 0x45f65c\nBL              _ZN16CustomSongWidget21getSongInfoIfUnloadedEv; CustomSongWidget::getSongInfoIfUnloaded(void) ; +0x70, 0x45f660\nMOV             R0, SP                                                 ; +0x74, 0x45f664\nBL              sub_774008                                             ; +0x76, 0x45f666\nB               loc_45F676                                             ; +0x7a, 0x45f66a\nMOV             R0, R6                                                 ; +0x7c, 0x45f66c\nBL              sub_774008                                             ; +0x7e, 0x45f66e\nBL              __cxa_end_cleanup                                      ; +0x82, 0x45f672\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x86, 0x45f676\nLDR             R3, [R4]                                               ; +0x88, 0x45f678\nCMP             R2, R3                                                 ; +0x8a, 0x45f67a\nBEQ             loc_45F682                                             ; +0x8c, 0x45f67c\nBLX             __stack_chk_fail                                       ; +0x8e, 0x45f67e\nADD             SP, SP, #0xC                                           ; +0x92, 0x45f682\nPOP             {R4-R7,PC}                                             ; +0x94, 0x45f684", "xrefs": [], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}