{"type": "func", "start": 5754436, "end": 5754600, "name": "CustomSongLayer::onSearch", "pseudocode": "// \n// CustomSongLayer::onSearch from 0x57ce44 to 0x57cee8 (164 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:50 +0000\n// \n\nint __fastcall CustomSongLayer::onSearch(CustomSongLayer *this, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // r0\n  FMODAudioEngine *GameVariable; // r0\n  GameManager *v5; // r0\n  FMODAudioEngine *v7; // r0\n  char *v8; // r0\n  SongInfoObject *v9; // r0\n  CustomSongWidget *v10; // r7\n  int v11; // r1\n  SongInfoObject *v12; // r0\n  char v13; // [sp+0h] [bp-14h] BYREF\n  char v14; // [sp+1h] [bp-13h] BYREF\n  char *v15; // [sp+8h] [bp-Ch]\n\n  v3 = (GameManager *)GameManager::sharedState(this);\n  GameVariable = (FMODAudioEngine *)GameManager::getGameVariable(v3, \"0051\");\n  if ( GameVariable )\n  {\n    v7 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(GameVariable);\n    FMODAudioEngine::stopAllMusic(v7, 1);\n    (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 133) + 580))(*((_DWORD *)this + 133), 0);\n    CCTextInputNode::getString((CCTextInputNode *)&v13, *((_DWORD *)this + 133));\n    if ( (v13 & 1) != 0 )\n      v8 = v15;\n    else\n      v8 = &v14;\n    v9 = (SongInfoObject *)atoi(v8);\n    v10 = *((CustomSongWidget **)this + 134);\n    v12 = SongInfoObject::create(v9, v11);\n    CustomSongWidget::updateSongObject(v10, v12);\n    CustomSongWidget::getSongInfoIfUnloaded(*((_DWORD *)this + 134));\n    return std::string::~string((int)&v13);\n  }\n  else\n  {\n    v5 = (GameManager *)GameManager::sharedState(nullptr);\n    GameManager::setGameVariable(v5, \"0051\", (_BYTE *)&dword_0 + 1);\n    return CustomSongLayer::showNewgroundsMessage(this);\n  }\n}", "assembly": "; \n; CustomSongLayer::onSearch from 0x57ce44 to 0x57cee8 (164 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:50 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x57ce44\nSUB             SP, SP, #0x14                                          ; +0x2, 0x57ce46\nLDR             R4, =(__stack_chk_guard_ptr - 0x57CE52)                ; +0x4, 0x57ce48\nMOV             R5, R0                                                 ; +0x6, 0x57ce4a\nLDR             R6, =(a0051 - 0x57CE56); \"0051\"                        ; +0x8, 0x57ce4c\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xa, 0x57ce4e\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xc, 0x57ce50\nADD             R6, PC; \"0051\"                                         ; +0xe, 0x57ce52\nLDR             R3, [R4]                                               ; +0x10, 0x57ce54\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x12, 0x57ce56\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x57ce58\nMOV             R1, R6; char *                                         ; +0x18, 0x57ce5c\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x1a, 0x57ce5e\nCBNZ            R0, loc_57CE78                                         ; +0x1e, 0x57ce62\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x20, 0x57ce64\nMOV             R1, R6; char *                                         ; +0x24, 0x57ce68\nMOVS            R2, #1; bool                                           ; +0x26, 0x57ce6a\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x28, 0x57ce6c\nMOV             R0, R5; this                                           ; +0x2c, 0x57ce70\nBL              _ZN15CustomSongLayer21showNewgroundsMessageEv; CustomSongLayer::showNewgroundsMessage(void) ; +0x2e, 0x57ce72\nB               loc_57CED8                                             ; +0x32, 0x57ce76\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x34, 0x57ce78\nMOVS            R1, #1; bool                                           ; +0x38, 0x57ce7c\nBL              _ZN15FMODAudioEngine12stopAllMusicEb; FMODAudioEngine::stopAllMusic(bool) ; +0x3a, 0x57ce7e\nLDR.W           R0, [R5,#0x214]                                        ; +0x3e, 0x57ce82\nMOVS            R1, #0                                                 ; +0x42, 0x57ce86\nMOV             R6, SP                                                 ; +0x44, 0x57ce88\nLDR             R3, [R0]                                               ; +0x46, 0x57ce8a\nLDR.W           R3, [R3,#0x244]                                        ; +0x48, 0x57ce8c\nBLX             R3                                                     ; +0x4c, 0x57ce90\nMOV             R0, SP; this                                           ; +0x4e, 0x57ce92\nLDR.W           R1, [R5,#0x214]                                        ; +0x50, 0x57ce94\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x54, 0x57ce98\nLDRB.W          R3, [SP,#0x14+var_14]                                  ; +0x58, 0x57ce9c\nLSLS            R3, R3, #0x1F                                          ; +0x5c, 0x57cea0\nITE PL                                                                 ; +0x5e, 0x57cea2\nADDPL.W         R0, SP, #0x14+var_13                                   ; +0x60, 0x57cea4\nLDRMI           R0, [SP,#0x14+var_C]; char *                           ; +0x64, 0x57cea8\nBLX             atoi                                                   ; +0x66, 0x57ceaa\nLDR.W           R7, [R5,#0x218]                                        ; +0x6a, 0x57ceae\nBL              _ZN14SongInfoObject6createEi; SongInfoObject::create(int) ; +0x6e, 0x57ceb2\nMOV             R1, R0; SongInfoObject *                               ; +0x72, 0x57ceb6\nMOV             R0, R7; this                                           ; +0x74, 0x57ceb8\nBL              _ZN16CustomSongWidget16updateSongObjectEP14SongInfoObject; CustomSongWidget::updateSongObject(SongInfoObject *) ; +0x76, 0x57ceba\nLDR.W           R0, [R5,#0x218]; this                                  ; +0x7a, 0x57cebe\nBL              _ZN16CustomSongWidget21getSongInfoIfUnloadedEv; CustomSongWidget::getSongInfoIfUnloaded(void) ; +0x7e, 0x57cec2\nMOV             R0, SP                                                 ; +0x82, 0x57cec6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x84, 0x57cec8\nB               loc_57CED8                                             ; +0x88, 0x57cecc\nMOV             R0, R6                                                 ; +0x8a, 0x57cece\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x8c, 0x57ced0\nBL              __cxa_end_cleanup                                      ; +0x90, 0x57ced4\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x94, 0x57ced8\nLDR             R3, [R4]                                               ; +0x96, 0x57ceda\nCMP             R2, R3                                                 ; +0x98, 0x57cedc\nBEQ             loc_57CEE4                                             ; +0x9a, 0x57cede\nBLX             __stack_chk_fail                                       ; +0x9c, 0x57cee0\nADD             SP, SP, #0x14                                          ; +0xa0, 0x57cee4\nPOP             {R4-R7,PC}                                             ; +0xa2, 0x57cee6", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}