{"type": "func", "start": 5372395440, "end": 5372395631, "name": "GJItemIcon::toggleEnabledState", "pseudocode": "// \n// GJItemIcon::toggleEnabledState from 0x140383fb0 to 0x14038406f (191 bytes)\n// \n// 5 xrefs:\n// > GJGarageLayer::setupSpecialPage @ 0x14037f98a\n// > GJGarageLayer::onToggleItem @ 0x1403803d3\n// > <???> @ 0x1408bd650\n// > <???> @ 0x1408bd660\n// > <???> @ 0x140922a48\n// \n// This function is hookable on this platform (idp: pc, 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 11:31:06 +0000\n// \n\nvoid __fastcall GJItemIcon::toggleEnabledState(__int64 a1, char a2)\n{\n  void (__fastcall ***v2)(_QWORD, _QWORD); // 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 ( !*(_BYTE *)(a1 + 620) )\n  {\n    v2 = *(void (__fastcall ****)(_QWORD, _QWORD))(a1 + 600);\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    (*v2[40])(v2 + 40, v3);\n    v4 = (cocos2d::CCArray *)((__int64 (__fastcall *)(void (__fastcall ***)(_QWORD, _QWORD)))(*v2)[60])(v2);\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))(*(_QWORD *)v7 + 336LL))(v7, v8);\n          ++v6;\n        }\n        while ( v6 < cocos2d::CCArray::count(v5) );\n      }\n    }\n  }\n}", "assembly": "; \n; GJItemIcon::toggleEnabledState from 0x140383fb0 to 0x14038406f (191 bytes)\n; \n; 5 xrefs:\n; > GJGarageLayer::setupSpecialPage @ 0x14037f98a\n; > GJGarageLayer::onToggleItem @ 0x1403803d3\n; > <???> @ 0x1408bd650\n; > <???> @ 0x1408bd660\n; > <???> @ 0x140922a48\n; \n; This function is hookable on this platform (idp: pc, 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 11:31:06 +0000\n; \nsub     rsp, 28h                                                       ; +0x0, 0x140383fb0\ncmp     byte ptr [rcx+26Ch], 0                                         ; +0x4, 0x140383fb4\njnz     loc_14038406A                                                  ; +0xb, 0x140383fbb\nmov     [rsp+28h+arg_8], rbx                                           ; +0x11, 0x140383fc1\nmov     rbx, [rcx+258h]                                                ; +0x16, 0x140383fc6\nmov     [rsp+28h+var_8], rdi                                           ; +0x1d, 0x140383fcd\ntest    dl, dl                                                         ; +0x22, 0x140383fd2\njz      short loc_140383FF4                                            ; +0x24, 0x140383fd4\nmovzx   eax, cs:word_140703470                                         ; +0x26, 0x140383fd6\nlea     rdx, [rsp+28h+arg_10]                                          ; +0x2d, 0x140383fdd\nmov     [rsp+28h+arg_10], ax                                           ; +0x32, 0x140383fe2\nmovzx   eax, cs:byte_140703472                                         ; +0x37, 0x140383fe7\nmov     [rsp+28h+arg_12], al                                           ; +0x3e, 0x140383fee\njmp     short loc_140384005                                            ; +0x42, 0x140383ff2\nmov     [rsp+28h+arg_0], 6464h                                         ; +0x44, 0x140383ff4\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x4b, 0x140383ffb\nmov     [rsp+28h+arg_2], 64h ; 'd'                                     ; +0x50, 0x140384000\nlea     rcx, [rbx+140h]                                                ; +0x55, 0x140384005\nmov     rax, [rcx]                                                     ; +0x5c, 0x14038400c\ncall    qword ptr [rax]                                                ; +0x5f, 0x14038400f\nmov     rax, [rbx]                                                     ; +0x61, 0x140384011\nmov     rcx, rbx                                                       ; +0x64, 0x140384014\ncall    qword ptr [rax+1E0h]                                           ; +0x67, 0x140384017\nmov     rdi, rax                                                       ; +0x6d, 0x14038401d\ntest    rax, rax                                                       ; +0x70, 0x140384020\njz      short loc_140384060                                            ; +0x73, 0x140384023\nmov     rcx, rax                                                       ; +0x75, 0x140384025\nxor     ebx, ebx                                                       ; +0x78, 0x140384028\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7a, 0x14038402a\ntest    eax, eax                                                       ; +0x80, 0x140384030\njz      short loc_140384060                                            ; +0x82, 0x140384032\nmov     edx, ebx                                                       ; +0x84, 0x140384034\nmov     rcx, rdi                                                       ; +0x86, 0x140384036\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x89, 0x140384039\nmov     dl, 1                                                          ; +0x8f, 0x14038403f\nmov     rcx, [rax]                                                     ; +0x91, 0x140384041\nmov     r8, [rcx+150h]                                                 ; +0x94, 0x140384044\nmov     rcx, rax                                                       ; +0x9b, 0x14038404b\ncall    r8                                                             ; +0x9e, 0x14038404e\nmov     rcx, rdi                                                       ; +0xa1, 0x140384051\ninc     ebx                                                            ; +0xa4, 0x140384054\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa6, 0x140384056\ncmp     ebx, eax                                                       ; +0xac, 0x14038405c\njb      short loc_140384034                                            ; +0xae, 0x14038405e\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xb0, 0x140384060\nmov     rdi, [rsp+28h+var_8]                                           ; +0xb5, 0x140384065\nadd     rsp, 28h                                                       ; +0xba, 0x14038406a\nretn                                                                   ; +0xbe, 0x14038406e", "xrefs": ["GJGarageLayer::setupSpecialPage @ 0x14037f98a", "GJGarageLayer::onToggleItem @ 0x1403803d3", "<???> @ 0x1408bd650", "<???> @ 0x1408bd660", "<???> @ 0x140922a48"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}