{"type": "func", "start": 4295005520, "end": 4295005716, "name": "GJSmartBlockPreview::toggleSelectItem", "pseudocode": "// \n// GJSmartBlockPreview::toggleSelectItem from 0x100009550 to 0x100009614 (196 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onPrefabObject @ 0x1000733ac\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\n// local variable allocation has failed, the output may be wrong!\nvoid __fastcall GJSmartBlockPreview::toggleSelectItem(GJSmartBlockPreview *a1, bool a2)\n{\n  __int64 v2; // x29\n  __int64 v3; // x30\n  _BOOL8 v4; // x19\n  cocos2d::CCSprite *m_selectSprite; // x0\n  cocos2d::CCSprite *v7; // x0\n  __n128 v8; // q0\n  cocos2d::CCSprite *v9; // x21\n  __n128 v10; // q1\n  _BYTE v11[8]; // [xsp+8h] [xbp-38h] BYREF\n  __int64 v12; // [xsp+30h] [xbp-10h]\n  __int64 v13; // [xsp+38h] [xbp-8h]\n  cocos2d::CCPoint v14; // 0:kr00_8.8\n\n  if ( a1->m_selected != a2 )\n  {\n    v12 = v2;\n    v13 = v3;\n    v4 = a2;\n    a1->m_selected = a2;\n    m_selectSprite = a1->m_selectSprite;\n    if ( !m_selectSprite )\n    {\n      v7 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_select_001.png\");\n      a1->m_selectSprite = v7;\n      ((void (__fastcall *)(GJSmartBlockPreview *, cocos2d::CCSprite *))a1->addChild)(a1, v7);\n      v8 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->m_selectSprite->setScale)(a1->m_selectSprite, 2.8);\n      v9 = a1->m_selectSprite;\n      v8.n128_u32[0] = 1110704128;\n      v10.n128_u32[0] = 1110704128;\n      v14 = sub_100022980(v8, v10);\n      ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *, float, float))v9->setPosition)(v9, v11, v14.x, v14.y);\n      m_selectSprite = a1->m_selectSprite;\n    }\n    ((void (__fastcall *)(cocos2d::CCSprite *, _BOOL8))m_selectSprite->setVisible)(m_selectSprite, v4);\n  }\n}", "assembly": "; \n; GJSmartBlockPreview::toggleSelectItem from 0x100009550 to 0x100009614 (196 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onPrefabObject @ 0x1000733ac\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\nLDRB            W8, [X0,#0x168]                                        ; +0x0, 0x100009550\nCMP             W8, W1                                                 ; +0x4, 0x100009554\nB.EQ            locret_100009610                                       ; +0x8, 0x100009558\nSUB             SP, SP, #0x40 ; '@'                                    ; +0xc, 0x10000955c\nSTP             X22, X21, [SP,#0x40+var_30]                            ; +0x10, 0x100009560\nSTP             X20, X19, [SP,#0x40+var_20]                            ; +0x14, 0x100009564\nSTP             X29, X30, [SP,#0x40+var_10]                            ; +0x18, 0x100009568\nADD             X29, SP, #0x40+var_10                                  ; +0x1c, 0x10000956c\nMOV             X19, X1                                                ; +0x20, 0x100009570\nMOV             X20, X0                                                ; +0x24, 0x100009574\nSTRB            W1, [X0,#0x168]                                        ; +0x28, 0x100009578\nLDR             X0, [X0,#0x160]                                        ; +0x2c, 0x10000957c\nCBNZ            X0, loc_1000095F0                                      ; +0x30, 0x100009580\nADRL            X0, aGjSelect001Png; \"GJ_select_001.png\"               ; +0x34, 0x100009584\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x3c, 0x10000958c\nMOV             X1, X0                                                 ; +0x40, 0x100009590\nSTR             X0, [X20,#0x160]                                       ; +0x44, 0x100009594\nLDR             X8, [X20]                                              ; +0x48, 0x100009598\nLDR             X8, [X8,#0x1B8]                                        ; +0x4c, 0x10000959c\nMOV             X0, X20                                                ; +0x50, 0x1000095a0\nBLR             X8                                                     ; +0x54, 0x1000095a4\nLDR             X0, [X20,#0x160]                                       ; +0x58, 0x1000095a8\nLDR             X8, [X0]                                               ; +0x5c, 0x1000095ac\nLDR             X8, [X8,#0xA0]                                         ; +0x60, 0x1000095b0\nADRP            X9, #a3330@PAGE; \"333@0\"                               ; +0x64, 0x1000095b4\nLDR             S0, [X9,#a3330@PAGEOFF]; \"333@0\"                       ; +0x68, 0x1000095b8\nBLR             X8                                                     ; +0x6c, 0x1000095bc\nLDR             X21, [X20,#0x160]                                      ; +0x70, 0x1000095c0\nMOV             W8, #0x42340000                                        ; +0x74, 0x1000095c4\nFMOV            S0, W8                                                 ; +0x78, 0x1000095c8\nADD             X0, SP, #0x40+var_38                                   ; +0x7c, 0x1000095cc\nFMOV            S1, S0                                                 ; +0x80, 0x1000095d0\nBL              sub_100022980                                          ; +0x84, 0x1000095d4\nLDR             X8, [X21]                                              ; +0x88, 0x1000095d8\nLDR             X8, [X8,#0xB8]                                         ; +0x8c, 0x1000095dc\nADD             X1, SP, #0x40+var_38                                   ; +0x90, 0x1000095e0\nMOV             X0, X21                                                ; +0x94, 0x1000095e4\nBLR             X8                                                     ; +0x98, 0x1000095e8\nLDR             X0, [X20,#0x160]                                       ; +0x9c, 0x1000095ec\nLDR             X8, [X0]                                               ; +0xa0, 0x1000095f0\nLDR             X8, [X8,#0x148]                                        ; +0xa4, 0x1000095f4\nMOV             X1, X19                                                ; +0xa8, 0x1000095f8\nBLR             X8                                                     ; +0xac, 0x1000095fc\nLDP             X29, X30, [SP,#0x40+var_10]                            ; +0xb0, 0x100009600\nLDP             X20, X19, [SP,#0x40+var_20]                            ; +0xb4, 0x100009604\nLDP             X22, X21, [SP,#0x40+var_30]                            ; +0xb8, 0x100009608\nADD             SP, SP, #0x40 ; '@'                                    ; +0xbc, 0x10000960c\nRET                                                                    ; +0xc0, 0x100009610", "xrefs": ["BrowseSmartKeyLayer::onPrefabObject @ 0x1000733ac"], "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"}