{"type": "func", "start": 5371655728, "end": 5371655874, "name": "LevelBrowserLayer::onToggleAllObjects", "pseudocode": "// \n// LevelBrowserLayer::onToggleAllObjects from 0x1402cf630 to 0x1402cf6c2 (146 bytes)\n// \n// 2 xrefs:\n// > LevelBrowserLayer::init @ 0x1402c9932\n// > <???> @ 0x1406d2e28\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 LevelBrowserLayer::onToggleAllObjects(LevelBrowserLayer *a1, cocos2d::CCObject *a2)\n{\n  cocos2d::CCArray *m_levels; // rcx\n  cocos2d::CCArray *v4; // rax\n  cocos2d::ccArray *data; // rax\n  __int64 num; // rcx\n  cocos2d::CCObject **arr; // rax\n  cocos2d::CCObject **i; // r8\n  cocos2d::CCObject *v9; // rdx\n\n  a1->m_allSelected = !a1->m_allSelected;\n  m_levels = a1->m_levels;\n  if ( m_levels && cocos2d::CCArray::count(m_levels) )\n  {\n    v4 = a1->m_levels;\n    if ( v4 )\n    {\n      data = v4->data;\n      num = data->num;\n      if ( (_DWORD)num )\n      {\n        arr = data->arr;\n        for ( i = &arr[num - 1]; arr <= i; HIBYTE(v9[12].m_unknown5) = a1->m_allSelected )\n        {\n          v9 = *arr;\n          if ( !*arr )\n            break;\n          ++arr;\n        }\n      }\n    }\n    CustomListView::reloadAll((CustomListView *)a1->m_list->m_listView);\n  }\n}", "assembly": "; \n; LevelBrowserLayer::onToggleAllObjects from 0x1402cf630 to 0x1402cf6c2 (146 bytes)\n; \n; 2 xrefs:\n; > LevelBrowserLayer::init @ 0x1402c9932\n; > <???> @ 0x1406d2e28\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\npush    rbx                                                            ; +0x0, 0x1402cf630\nsub     rsp, 20h                                                       ; +0x2, 0x1402cf632\ncmp     byte ptr [rcx+251h], 0                                         ; +0x6, 0x1402cf636\nmov     rbx, rcx                                                       ; +0xd, 0x1402cf63d\nsetz    al                                                             ; +0x10, 0x1402cf640\nmov     [rcx+251h], al                                                 ; +0x13, 0x1402cf643\nmov     rcx, [rcx+290h]                                                ; +0x19, 0x1402cf649\ntest    rcx, rcx                                                       ; +0x20, 0x1402cf650\njz      short loc_1402CF6BC                                            ; +0x23, 0x1402cf653\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x25, 0x1402cf655\ntest    eax, eax                                                       ; +0x2b, 0x1402cf65b\njz      short loc_1402CF6BC                                            ; +0x2d, 0x1402cf65d\nmov     rax, [rbx+290h]                                                ; +0x2f, 0x1402cf65f\ntest    rax, rax                                                       ; +0x36, 0x1402cf666\njz      short loc_1402CF6A4                                            ; +0x39, 0x1402cf669\nmov     rax, [rax+38h]                                                 ; +0x3b, 0x1402cf66b\nmov     ecx, [rax]                                                     ; +0x3f, 0x1402cf66f\ntest    ecx, ecx                                                       ; +0x41, 0x1402cf671\njz      short loc_1402CF6A4                                            ; +0x43, 0x1402cf673\nmov     rax, [rax+10h]                                                 ; +0x45, 0x1402cf675\nlea     r8, [rcx-1]                                                    ; +0x49, 0x1402cf679\nlea     r8, [rax+r8*8]                                                 ; +0x4d, 0x1402cf67d\ncmp     rax, r8                                                        ; +0x51, 0x1402cf681\nja      short loc_1402CF6A4                                            ; +0x54, 0x1402cf684\nmov     rdx, [rax]                                                     ; +0x56, 0x1402cf686\ntest    rdx, rdx                                                       ; +0x59, 0x1402cf689\njz      short loc_1402CF6A4                                            ; +0x5c, 0x1402cf68c\nmovzx   ecx, byte ptr [rbx+251h]                                       ; +0x5e, 0x1402cf68e\nadd     rax, 8                                                         ; +0x65, 0x1402cf695\nmov     [rdx+2D7h], cl                                                 ; +0x69, 0x1402cf699\ncmp     rax, r8                                                        ; +0x6f, 0x1402cf69f\njbe     short loc_1402CF686                                            ; +0x72, 0x1402cf6a2\nmov     rcx, [rbx+260h]                                                ; +0x74, 0x1402cf6a4\nmov     rcx, [rcx+220h]                                                ; +0x7b, 0x1402cf6ab\nadd     rsp, 20h                                                       ; +0x82, 0x1402cf6b2\npop     rbx                                                            ; +0x86, 0x1402cf6b6\njmp     CustomListView__reloadAll                                      ; +0x87, 0x1402cf6b7\nadd     rsp, 20h                                                       ; +0x8c, 0x1402cf6bc\npop     rbx                                                            ; +0x90, 0x1402cf6c0\nretn                                                                   ; +0x91, 0x1402cf6c1", "xrefs": ["LevelBrowserLayer::init @ 0x1402c9932", "<???> @ 0x1406d2e28"], "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"}