{"type": "func", "start": 4299331312, "end": 4299331510, "name": "GJSmartBlockPreview::toggleSelectItem", "pseudocode": "// \n// GJSmartBlockPreview::toggleSelectItem from 0x1004296f0 to 0x1004297b6 (198 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onPrefabObject @ 0x1004eb6fe\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 __fastcall GJSmartBlockPreview::toggleSelectItem(GJSmartBlockPreview *a1, bool a2)\n{\n  cocos2d::CCSprite *m_selectSprite; // rax\n  cocos2d::CCSprite *v4; // rax\n  cocos2d::CCSprite *v5; // r14\n  float v6[12]; // [rsp-30h] [rbp-30h] BYREF\n\n  if ( a1->m_selected != a2 )\n  {\n    a1->m_selected = a2;\n    m_selectSprite = a1->m_selectSprite;\n    if ( !m_selectSprite )\n    {\n      v4 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_select_001.png\");\n      a1->m_selectSprite = v4;\n      ((void (__fastcall *)(GJSmartBlockPreview *, cocos2d::CCSprite *))a1->addChild)(a1, v4);\n      ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_selectSprite->setScale)(a1->m_selectSprite, 2.8);\n      v5 = a1->m_selectSprite;\n      sub_10028CBE0(v6, 45.0, 45.0);\n      ((void (__fastcall *)(cocos2d::CCSprite *, float *))v5->setPosition)(v5, v6);\n      m_selectSprite = a1->m_selectSprite;\n    }\n    ((void (__fastcall *)(cocos2d::CCSprite *, bool))m_selectSprite->setVisible)(m_selectSprite, a2);\n  }\n}", "assembly": "; \n; GJSmartBlockPreview::toggleSelectItem from 0x1004296f0 to 0x1004297b6 (198 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onPrefabObject @ 0x1004eb6fe\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\ncmp     [rdi+168h], sil                                                ; +0x0, 0x1004296f0\njz      locret_1004297B5                                               ; +0x7, 0x1004296f7\npush    rbp                                                            ; +0xd, 0x1004296fd\nmov     rbp, rsp                                                       ; +0xe, 0x1004296fe\npush    r15                                                            ; +0x11, 0x100429701\npush    r14                                                            ; +0x13, 0x100429703\npush    r12                                                            ; +0x15, 0x100429705\npush    rbx                                                            ; +0x17, 0x100429707\nsub     rsp, 10h                                                       ; +0x18, 0x100429708\nmov     [rdi+168h], sil                                                ; +0x1c, 0x10042970c\nmov     rax, [rdi+160h]                                                ; +0x23, 0x100429713\ntest    rax, rax                                                       ; +0x2a, 0x10042971a\njnz     short loc_100429799                                            ; +0x2d, 0x10042971d\nlea     rax, aGjSelect001Png; \"GJ_select_001.png\"                      ; +0x2f, 0x10042971f\nmov     rbx, rdi                                                       ; +0x36, 0x100429726\nmov     rdi, rax                                                       ; +0x39, 0x100429729\nmov     r12d, esi                                                      ; +0x3c, 0x10042972c\ncall    cocos2d__CCSprite__createWithSpriteFrameName                   ; +0x3f, 0x10042972f\nmov     [rbx+160h], rax                                                ; +0x44, 0x100429734\nmov     rcx, [rbx]                                                     ; +0x4b, 0x10042973b\nmov     rdi, rbx                                                       ; +0x4e, 0x10042973e\nmov     rsi, rax                                                       ; +0x51, 0x100429741\ncall    qword ptr [rcx+1B8h]                                           ; +0x54, 0x100429744\nmov     rdi, [rbx+160h]                                                ; +0x5a, 0x10042974a\nmov     rax, [rdi]                                                     ; +0x61, 0x100429751\nmovss   xmm0, cs:dword_10081B4D4                                       ; +0x64, 0x100429754\ncall    qword ptr [rax+0A0h]                                           ; +0x6c, 0x10042975c\nmov     r14, [rbx+160h]                                                ; +0x72, 0x100429762\nlea     r15, [rbp-28h]                                                 ; +0x79, 0x100429769\nmovss   xmm0, cs:dword_100814FD4                                       ; +0x7d, 0x10042976d\nmov     rdi, r15                                                       ; +0x85, 0x100429775\nmovaps  xmm1, xmm0                                                     ; +0x88, 0x100429778\ncall    sub_10028CBE0                                                  ; +0x8b, 0x10042977b\nmov     rax, [r14]                                                     ; +0x90, 0x100429780\nmov     rdi, r14                                                       ; +0x93, 0x100429783\nmov     rsi, r15                                                       ; +0x96, 0x100429786\ncall    qword ptr [rax+0B8h]                                           ; +0x99, 0x100429789\nmov     esi, r12d                                                      ; +0x9f, 0x10042978f\nmov     rax, [rbx+160h]                                                ; +0xa2, 0x100429792\nmov     rcx, [rax]                                                     ; +0xa9, 0x100429799\nmovzx   esi, sil                                                       ; +0xac, 0x10042979c\nmov     rdi, rax                                                       ; +0xb0, 0x1004297a0\ncall    qword ptr [rcx+148h]                                           ; +0xb3, 0x1004297a3\nadd     rsp, 10h                                                       ; +0xb9, 0x1004297a9\npop     rbx                                                            ; +0xbd, 0x1004297ad\npop     r12                                                            ; +0xbe, 0x1004297ae\npop     r14                                                            ; +0xc0, 0x1004297b0\npop     r15                                                            ; +0xc2, 0x1004297b2\npop     rbp                                                            ; +0xc4, 0x1004297b4\nretn                                                                   ; +0xc5, 0x1004297b5", "xrefs": ["BrowseSmartKeyLayer::onPrefabObject @ 0x1004eb6fe"], "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"}