{"type": "func", "start": 5371311472, "end": 5371311660, "name": "GJItemIcon::toggleEnabledState", "pseudocode": "// \n// GJItemIcon::toggleEnabledState from 0x14027b570 to 0x14027b62c (188 bytes)\n// \n// 5 xrefs:\n// > GJGarageLayer::setupSpecialPage @ 0x140276f82\n// > GJGarageLayer::onToggleItem @ 0x1402779ce\n// > <???> @ 0x1406876b0\n// > <???> @ 0x1406876c0\n// > <???> @ 0x1406d1130\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 GJItemIcon::toggleEnabledState(GJItemIcon *a1, bool a2)\n{\n  cocos2d::CCSprite *m_player; // rbx\n  __int16 *v3; // rdx\n  cocos2d::CCArray *v4; // rax\n  cocos2d::CCArray *v5; // rdi\n  unsigned int v6; // ebx\n  struct cocos2d::CCObject *v7; // rax\n  __int64 v8; // rdx\n  _BYTE v9[3]; // [rsp+30h] [rbp+8h] BYREF\n  __int16 v10; // [rsp+40h] [rbp+18h] BYREF\n  char v11; // [rsp+42h] [rbp+1Ah]\n\n  if ( !a1->m_isIcon )\n  {\n    m_player = a1->m_player;\n    if ( a2 )\n    {\n      v3 = &v10;\n      v10 = -1;\n      v11 = -1;\n    }\n    else\n    {\n      memset(v9, 100, sizeof(v9));\n      v3 = (__int16 *)v9;\n    }\n    m_player->setColor(&m_player->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v3);\n    v4 = m_player->getChildren(m_player);\n    v5 = v4;\n    if ( v4 )\n    {\n      v6 = 0;\n      if ( cocos2d::CCArray::count(v4) )\n      {\n        do\n        {\n          v7 = cocos2d::CCArray::objectAtIndex(v5, v6);\n          LOBYTE(v8) = 1;\n          ((void (__fastcall *)(struct cocos2d::CCObject *, __int64))v7->__vftable[4].update)(v7, v8);\n          ++v6;\n        }\n        while ( v6 < cocos2d::CCArray::count(v5) );\n      }\n    }\n  }\n}", "assembly": "; \n; GJItemIcon::toggleEnabledState from 0x14027b570 to 0x14027b62c (188 bytes)\n; \n; 5 xrefs:\n; > GJGarageLayer::setupSpecialPage @ 0x140276f82\n; > GJGarageLayer::onToggleItem @ 0x1402779ce\n; > <???> @ 0x1406876b0\n; > <???> @ 0x1406876c0\n; > <???> @ 0x1406d1130\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\nsub     rsp, 28h                                                       ; +0x0, 0x14027b570\ncmp     byte ptr [rcx+26Ch], 0                                         ; +0x4, 0x14027b574\njnz     loc_14027B627                                                  ; +0xb, 0x14027b57b\nmov     [rsp+28h+arg_8], rbx                                           ; +0x11, 0x14027b581\nmov     rbx, [rcx+258h]                                                ; +0x16, 0x14027b586\nmov     [rsp+28h+var_8], rdi                                           ; +0x1d, 0x14027b58d\ntest    dl, dl                                                         ; +0x22, 0x14027b592\njz      short loc_14027B5B4                                            ; +0x24, 0x14027b594\nmovzx   eax, cs:word_140529AC4                                         ; +0x26, 0x14027b596\nlea     rdx, [rsp+28h+arg_10]                                          ; +0x2d, 0x14027b59d\nmov     [rsp+28h+arg_10], ax                                           ; +0x32, 0x14027b5a2\nmovzx   eax, cs:byte_140529AC6                                         ; +0x37, 0x14027b5a7\nmov     [rsp+28h+arg_12], al                                           ; +0x3e, 0x14027b5ae\njmp     short loc_14027B5C5                                            ; +0x42, 0x14027b5b2\nmov     [rsp+28h+arg_0], 6464h                                         ; +0x44, 0x14027b5b4\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x4b, 0x14027b5bb\nmov     [rsp+28h+arg_2], 64h ; 'd'                                     ; +0x50, 0x14027b5c0\nlea     rcx, [rbx+140h]                                                ; +0x55, 0x14027b5c5\nmov     rax, [rcx]                                                     ; +0x5c, 0x14027b5cc\ncall    qword ptr [rax]                                                ; +0x5f, 0x14027b5cf\nmov     rax, [rbx]                                                     ; +0x61, 0x14027b5d1\nmov     rcx, rbx                                                       ; +0x64, 0x14027b5d4\ncall    qword ptr [rax+1D0h]                                           ; +0x67, 0x14027b5d7\nmov     rdi, rax                                                       ; +0x6d, 0x14027b5dd\ntest    rax, rax                                                       ; +0x70, 0x14027b5e0\njz      short loc_14027B61D                                            ; +0x73, 0x14027b5e3\nmov     rcx, rax                                                       ; +0x75, 0x14027b5e5\nxor     ebx, ebx                                                       ; +0x78, 0x14027b5e8\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7a, 0x14027b5ea\ntest    eax, eax                                                       ; +0x80, 0x14027b5f0\njz      short loc_14027B61D                                            ; +0x82, 0x14027b5f2\nmov     edx, ebx                                                       ; +0x84, 0x14027b5f4\nmov     rcx, rdi                                                       ; +0x86, 0x14027b5f6\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x89, 0x14027b5f9\nmov     dl, 1                                                          ; +0x8f, 0x14027b5ff\nmov     rcx, rax                                                       ; +0x91, 0x14027b601\nmov     r8, [rax]                                                      ; +0x94, 0x14027b604\ncall    qword ptr [r8+140h]                                            ; +0x97, 0x14027b607\nmov     rcx, rdi                                                       ; +0x9e, 0x14027b60e\ninc     ebx                                                            ; +0xa1, 0x14027b611\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa3, 0x14027b613\ncmp     ebx, eax                                                       ; +0xa9, 0x14027b619\njb      short loc_14027B5F4                                            ; +0xab, 0x14027b61b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xad, 0x14027b61d\nmov     rdi, [rsp+28h+var_8]                                           ; +0xb2, 0x14027b622\nadd     rsp, 28h                                                       ; +0xb7, 0x14027b627\nretn                                                                   ; +0xbb, 0x14027b62b", "xrefs": ["GJGarageLayer::setupSpecialPage @ 0x140276f82", "GJGarageLayer::onToggleItem @ 0x1402779ce", "<???> @ 0x1406876b0", "<???> @ 0x1406876c0", "<???> @ 0x1406d1130"], "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"}