{"type": "func", "start": 5370032928, "end": 5370033366, "name": "CustomizeObjectLayer::toggleVisible", "pseudocode": "// \n// CustomizeObjectLayer::toggleVisible from 0x140143320 to 0x1401434d6 (438 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::onSelectMode @ 0x1401431f8\n// > <???> @ 0x1409173cc\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:27:10 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::toggleVisible(__int64 a1)\n{\n  unsigned int v2; // edi\n  unsigned int i; // esi\n  struct cocos2d::CCObject *v4; // rax\n  __int64 v5; // rdx\n  unsigned int j; // esi\n  struct cocos2d::CCObject *v7; // rax\n  __int64 v8; // rdx\n  struct cocos2d::CCObject *v9; // rax\n  __int64 v10; // rcx\n  unsigned int ActiveMode; // eax\n  __int64 ButtonByTag; // rax\n\n  v2 = 0;\n  *(_BYTE *)(a1 + 920) = *(_DWORD *)(a1 + 744) == 3;\n  for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 712)); ++i )\n  {\n    v4 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 712), i);\n    LOBYTE(v5) = *(_BYTE *)(a1 + 920) == 0;\n    (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v4 + 336LL))(v4, v5);\n  }\n  for ( j = 0; j < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 736)); ++j )\n  {\n    v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 736), j);\n    LOBYTE(v8) = *(_BYTE *)(a1 + 920) == 0;\n    (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v7 + 336LL))(v7, v8);\n  }\n  if ( *(_BYTE *)(a1 + 921) )\n  {\n    if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 720)) )\n    {\n      do\n      {\n        v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 720), v2);\n        (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v9 + 336LL))(\n          v9,\n          *(unsigned __int8 *)(a1 + 920));\n        ++v2;\n      }\n      while ( v2 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 720)) );\n    }\n    v10 = *(_QWORD *)(a1 + 824);\n    if ( v10 )\n    {\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 920LL))(v10, *(unsigned __int8 *)(a1 + 920));\n      (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 824) + 336LL))(\n        *(_QWORD *)(a1 + 824),\n        *(unsigned __int8 *)(a1 + 920));\n    }\n  }\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 0);\n  if ( ActiveMode - 10 <= 0x3DD )\n  {\n    *(_BYTE *)(a1 + 922) = 1;\n    *(_DWORD *)(a1 + 748) = ActiveMode;\n    CustomizeObjectLayer::updateCustomColorLabels(a1);\n    ActiveMode = 1008;\n    *(_BYTE *)(a1 + 922) = 0;\n  }\n  ButtonByTag = CustomizeObjectLayer::getButtonByTag(a1, ActiveMode);\n  return CustomizeObjectLayer::highlightSelected(a1, ButtonByTag);\n}", "assembly": "; \n; CustomizeObjectLayer::toggleVisible from 0x140143320 to 0x1401434d6 (438 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::onSelectMode @ 0x1401431f8\n; > <???> @ 0x1409173cc\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:27:10 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140143320\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x140143325\npush    rdi                                                            ; +0xa, 0x14014332a\nsub     rsp, 20h                                                       ; +0xb, 0x14014332b\ncmp     dword ptr [rcx+2E8h], 3                                        ; +0xf, 0x14014332f\nmov     rbx, rcx                                                       ; +0x16, 0x140143336\nsetz    al                                                             ; +0x19, 0x140143339\nxor     edi, edi                                                       ; +0x1c, 0x14014333c\nmov     [rcx+398h], al                                                 ; +0x1e, 0x14014333e\nmov     esi, edi                                                       ; +0x24, 0x140143344\nmov     rcx, [rcx+2C8h]                                                ; +0x26, 0x140143346\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2d, 0x14014334d\ntest    eax, eax                                                       ; +0x33, 0x140143353\njz      short loc_14014339C                                            ; +0x35, 0x140143355\nnop     word ptr [rax+rax+00000000h]                                   ; +0x37, 0x140143357\nmov     rcx, [rbx+2C8h]                                                ; +0x40, 0x140143360\nmov     edx, esi                                                       ; +0x47, 0x140143367\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x49, 0x140143369\ncmp     [rbx+398h], dil                                                ; +0x4f, 0x14014336f\nsetz    dl                                                             ; +0x56, 0x140143376\nmov     rcx, [rax]                                                     ; +0x59, 0x140143379\nmov     r8, [rcx+150h]                                                 ; +0x5c, 0x14014337c\nmov     rcx, rax                                                       ; +0x63, 0x140143383\ncall    r8                                                             ; +0x66, 0x140143386\nmov     rcx, [rbx+2C8h]                                                ; +0x69, 0x140143389\ninc     esi                                                            ; +0x70, 0x140143390\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x72, 0x140143392\ncmp     esi, eax                                                       ; +0x78, 0x140143398\njb      short loc_140143360                                            ; +0x7a, 0x14014339a\nmov     rcx, [rbx+2E0h]                                                ; +0x7c, 0x14014339c\nmov     esi, edi                                                       ; +0x83, 0x1401433a3\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x85, 0x1401433a5\ntest    eax, eax                                                       ; +0x8b, 0x1401433ab\njz      short loc_1401433EC                                            ; +0x8d, 0x1401433ad\nnop                                                                    ; +0x8f, 0x1401433af\nmov     rcx, [rbx+2E0h]                                                ; +0x90, 0x1401433b0\nmov     edx, esi                                                       ; +0x97, 0x1401433b7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x99, 0x1401433b9\ncmp     [rbx+398h], dil                                                ; +0x9f, 0x1401433bf\nsetz    dl                                                             ; +0xa6, 0x1401433c6\nmov     rcx, [rax]                                                     ; +0xa9, 0x1401433c9\nmov     r8, [rcx+150h]                                                 ; +0xac, 0x1401433cc\nmov     rcx, rax                                                       ; +0xb3, 0x1401433d3\ncall    r8                                                             ; +0xb6, 0x1401433d6\nmov     rcx, [rbx+2E0h]                                                ; +0xb9, 0x1401433d9\ninc     esi                                                            ; +0xc0, 0x1401433e0\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc2, 0x1401433e2\ncmp     esi, eax                                                       ; +0xc8, 0x1401433e8\njb      short loc_1401433B0                                            ; +0xca, 0x1401433ea\ncmp     [rbx+399h], dil                                                ; +0xcc, 0x1401433ec\njz      loc_14014347C                                                  ; +0xd3, 0x1401433f3\nmov     rcx, [rbx+2D0h]                                                ; +0xd9, 0x1401433f9\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe0, 0x140143400\ntest    eax, eax                                                       ; +0xe6, 0x140143406\njz      short loc_140143449                                            ; +0xe8, 0x140143408\nnop     word ptr [rax+rax+00h]                                         ; +0xea, 0x14014340a\nmov     rcx, [rbx+2D0h]                                                ; +0xf0, 0x140143410\nmov     edx, edi                                                       ; +0xf7, 0x140143417\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xf9, 0x140143419\nmovzx   edx, byte ptr [rbx+398h]                                       ; +0xff, 0x14014341f\nmov     rcx, [rax]                                                     ; +0x106, 0x140143426\nmov     r8, [rcx+150h]                                                 ; +0x109, 0x140143429\nmov     rcx, rax                                                       ; +0x110, 0x140143430\ncall    r8                                                             ; +0x113, 0x140143433\nmov     rcx, [rbx+2D0h]                                                ; +0x116, 0x140143436\ninc     edi                                                            ; +0x11d, 0x14014343d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x11f, 0x14014343f\ncmp     edi, eax                                                       ; +0x125, 0x140143445\njb      short loc_140143410                                            ; +0x127, 0x140143447\nmov     rcx, [rbx+338h]                                                ; +0x129, 0x140143449\ntest    rcx, rcx                                                       ; +0x130, 0x140143450\njz      short loc_14014347C                                            ; +0x133, 0x140143453\nmov     rax, [rcx]                                                     ; +0x135, 0x140143455\nmovzx   edx, byte ptr [rbx+398h]                                       ; +0x138, 0x140143458\ncall    qword ptr [rax+398h]                                           ; +0x13f, 0x14014345f\nmov     rcx, [rbx+338h]                                                ; +0x145, 0x140143465\nmovzx   edx, byte ptr [rbx+398h]                                       ; +0x14c, 0x14014346c\nmov     rax, [rcx]                                                     ; +0x153, 0x140143473\ncall    qword ptr [rax+150h]                                           ; +0x156, 0x140143476\nxor     edx, edx                                                       ; +0x15c, 0x14014347c\nmov     rcx, rbx                                                       ; +0x15e, 0x14014347e\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x161, 0x140143481\nlea     ecx, [rax-0Ah]                                                 ; +0x166, 0x140143486\ncmp     ecx, 3DDh                                                      ; +0x169, 0x140143489\nja      short loc_1401434B2                                            ; +0x16f, 0x14014348f\nmov     rcx, rbx                                                       ; +0x171, 0x140143491\nmov     byte ptr [rbx+39Ah], 1                                         ; +0x174, 0x140143494\nmov     [rbx+2ECh], eax                                                ; +0x17b, 0x14014349b\ncall    CustomizeObjectLayer__updateCustomColorLabels                  ; +0x181, 0x1401434a1\nmov     eax, 3F0h                                                      ; +0x186, 0x1401434a6\nmov     byte ptr [rbx+39Ah], 0                                         ; +0x18b, 0x1401434ab\nmov     edx, eax                                                       ; +0x192, 0x1401434b2\nmov     rcx, rbx                                                       ; +0x194, 0x1401434b4\ncall    CustomizeObjectLayer__getButtonByTag                           ; +0x197, 0x1401434b7\nmov     rdx, rax                                                       ; +0x19c, 0x1401434bc\nmov     rcx, rbx                                                       ; +0x19f, 0x1401434bf\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1a2, 0x1401434c2\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x1a7, 0x1401434c7\nadd     rsp, 20h                                                       ; +0x1ac, 0x1401434cc\npop     rdi                                                            ; +0x1b0, 0x1401434d0\njmp     CustomizeObjectLayer__highlightSelected                        ; +0x1b1, 0x1401434d1", "xrefs": ["CustomizeObjectLayer::onSelectMode @ 0x1401431f8", "<???> @ 0x1409173cc"], "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"}