{"type": "func", "start": 11626672, "end": 11626832, "name": "BrowseSmartKeyLayer::onButton", "pseudocode": "// \n// BrowseSmartKeyLayer::onButton from 0xb168b0 to 0xb16950 (160 bytes)\n// \n// 6 xrefs:\n// > <???> @ 0xfa528\n// > BrowseSmartKeyLayer::init @ 0xb18318\n// > BrowseSmartKeyLayer::init @ 0xb18384\n// > BrowseSmartKeyLayer::init @ 0xb183ec\n// > BrowseSmartKeyLayer::init @ 0xb18454\n// > <???> @ 0x15479c0\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:01:32 +0000\n// \n\n__int64 __fastcall BrowseSmartKeyLayer::onButton(BrowseSmartKeyLayer *this, cocos2d::CCObject *a2)\n{\n  __int64 result; // x0\n\n  result = (*(unsigned int (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2) - 1;\n  switch ( (int)result )\n  {\n    case 0:\n      result = BrowseSmartKeyLayer::createTemplateObjects(this);\n      break;\n    case 1:\n      result = BrowseSmartKeyLayer::deletedSelectedItems(this);\n      break;\n    case 2:\n      result = BrowseSmartKeyLayer::addChanceToSelected(this, 0, 1u);\n      break;\n    case 3:\n      result = BrowseSmartKeyLayer::addChanceToSelected(this, 10, 0);\n      break;\n    default:\n      return result;\n  }\n  return result;\n}", "assembly": "; \n; BrowseSmartKeyLayer::onButton from 0xb168b0 to 0xb16950 (160 bytes)\n; \n; 6 xrefs:\n; > <???> @ 0xfa528\n; > BrowseSmartKeyLayer::init @ 0xb18318\n; > BrowseSmartKeyLayer::init @ 0xb18384\n; > BrowseSmartKeyLayer::init @ 0xb183ec\n; > BrowseSmartKeyLayer::init @ 0xb18454\n; > <???> @ 0x15479c0\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:01:32 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0xb168b0\nMOV             X29, SP                                                ; +0x4, 0xb168b4\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x8, 0xb168b8\nMOV             X19, X0                                                ; +0xc, 0xb168bc\nMOV             X0, X1                                                 ; +0x10, 0xb168c0\nLDR             X1, [X1]                                               ; +0x14, 0xb168c4\nLDR             X1, [X1,#0x40]                                         ; +0x18, 0xb168c8\nBLR             X1                                                     ; +0x1c, 0xb168cc\nSUB             W0, W0, #1; switch 4 cases                             ; +0x20, 0xb168d0\nCMP             W0, #3                                                 ; +0x24, 0xb168d4\nB.LS            loc_B168E8                                             ; +0x28, 0xb168d8\nLDR             X19, [SP,#0x20+var_10]; jumptable 0000000000B168FC default case ; +0x2c, 0xb168dc\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x30, 0xb168e0\nRET                                                                    ; +0x34, 0xb168e4\nADRL            X1, jpt_B168FC                                         ; +0x38, 0xb168e8\nLDRB            W0, [X1,W0,UXTW]                                       ; +0x40, 0xb168f0\nADR             X1, loc_B16900; jumptable 0000000000B168FC case 3      ; +0x44, 0xb168f4\nADD             X0, X1, W0,SXTB#2                                      ; +0x48, 0xb168f8\nBR              X0; switch jump                                        ; +0x4c, 0xb168fc\nMOV             X0, X19; jumptable 0000000000B168FC case 3             ; +0x50, 0xb16900\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x54, 0xb16904\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x58, 0xb16908\nMOV             W1, #0; int                                            ; +0x5c, 0xb1690c\nMOV             W2, #1; bool                                           ; +0x60, 0xb16910\nB               _ZN19BrowseSmartKeyLayer19addChanceToSelectedEib; BrowseSmartKeyLayer::addChanceToSelected(int,bool) ; +0x64, 0xb16914\nMOV             X0, X19; jumptable 0000000000B168FC case 2             ; +0x68, 0xb16918\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x6c, 0xb1691c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x70, 0xb16920\nB               _ZN19BrowseSmartKeyLayer20deletedSelectedItemsEv; BrowseSmartKeyLayer::deletedSelectedItems(void) ; +0x74, 0xb16924\nMOV             X0, X19; jumptable 0000000000B168FC case 1             ; +0x78, 0xb16928\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x7c, 0xb1692c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x80, 0xb16930\nB               _ZN19BrowseSmartKeyLayer21createTemplateObjectsEv; BrowseSmartKeyLayer::createTemplateObjects(void) ; +0x84, 0xb16934\nMOV             X0, X19; jumptable 0000000000B168FC case 4             ; +0x88, 0xb16938\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x8c, 0xb1693c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x90, 0xb16940\nMOV             W1, #0xA; int                                          ; +0x94, 0xb16944\nMOV             W2, #0; bool                                           ; +0x98, 0xb16948\nB               _ZN19BrowseSmartKeyLayer19addChanceToSelectedEib; BrowseSmartKeyLayer::addChanceToSelected(int,bool) ; +0x9c, 0xb1694c", "xrefs": ["<???> @ 0xfa528", "BrowseSmartKeyLayer::init @ 0xb18318", "BrowseSmartKeyLayer::init @ 0xb18384", "BrowseSmartKeyLayer::init @ 0xb183ec", "BrowseSmartKeyLayer::init @ 0xb18454", "<???> @ 0x15479c0"], "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"}