{"type": "func", "start": 5372080432, "end": 5372080654, "name": "MessagesProfilePage::onToggleAllObjects", "pseudocode": "// \n// MessagesProfilePage::onToggleAllObjects from 0x140337130 to 0x14033720e (222 bytes)\n// \n// 2 xrefs:\n// > MessagesProfilePage::init @ 0x140336cd5\n// > <???> @ 0x1406d524c\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 MessagesProfilePage::onToggleAllObjects(MessagesProfilePage *a1, cocos2d::CCObject *a2)\n{\n  std::string *p_m_messageKey; // rdi\n  GameLevelManager *v4; // rcx\n  cocos2d::CCArray *StoredOnlineLevels; // rax\n  cocos2d::CCArray *v6; // rdi\n  cocos2d::ccArray *data; // rax\n  __int64 num; // rcx\n  cocos2d::CCObject **arr; // rax\n  unsigned __int64 i; // r8\n  void *v11; // [rsp+30h] [rbp+8h]\n\n  a1->m_toggledAll = !a1->m_toggledAll;\n  p_m_messageKey = &a1->m_messageKey;\n  if ( a1->m_messageKey.m_data.m_capacity > 0xF )\n    p_m_messageKey = (std::string *)p_m_messageKey->m_data.m_bigStorage;\n  v4 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v11 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v11);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v4 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v4, p_m_messageKey->m_data.m_smallStorage._Elems);\n  v6 = StoredOnlineLevels;\n  if ( StoredOnlineLevels && cocos2d::CCArray::count(StoredOnlineLevels) )\n  {\n    data = v6->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      for ( i = (unsigned __int64)&arr[num - 1]; (unsigned __int64)arr <= i; ++arr )\n      {\n        if ( !*arr )\n          break;\n        BYTE2((*arr)[8].m_nTag) = a1->m_toggledAll;\n      }\n    }\n    CustomListView::reloadAll((CustomListView *)a1->m_listLayer->m_list);\n  }\n}", "assembly": "; \n; MessagesProfilePage::onToggleAllObjects from 0x140337130 to 0x14033720e (222 bytes)\n; \n; 2 xrefs:\n; > MessagesProfilePage::init @ 0x140336cd5\n; > <???> @ 0x1406d524c\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140337130\npush    rdi                                                            ; +0x5, 0x140337135\nsub     rsp, 20h                                                       ; +0x6, 0x140337136\nmov     rbx, rcx                                                       ; +0xa, 0x14033713a\ncmp     byte ptr [rcx+320h], 0                                         ; +0xd, 0x14033713d\nsetz    al                                                             ; +0x14, 0x140337144\nmov     [rcx+320h], al                                                 ; +0x17, 0x140337147\nlea     rdi, [rcx+2A0h]                                                ; +0x1d, 0x14033714d\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x24, 0x140337154\njbe     short loc_14033715E                                            ; +0x29, 0x140337159\nmov     rdi, [rdi]                                                     ; +0x2b, 0x14033715b\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x2e, 0x14033715e\ntest    rcx, rcx                                                       ; +0x35, 0x140337165\njnz     short loc_14033719A                                            ; +0x38, 0x140337168\nmov     ecx, 3D0h; Size                                                ; +0x3a, 0x14033716a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3f, 0x14033716f\nmov     [rsp+28h+arg_0], rax                                           ; +0x44, 0x140337174\nmov     rcx, rax                                                       ; +0x49, 0x140337179\ncall    sub_140141280                                                  ; +0x4c, 0x14033717c\nnop                                                                    ; +0x51, 0x140337181\nmov     cs:qword_1406C2EC0, rax                                        ; +0x52, 0x140337182\nmov     r8, [rax]                                                      ; +0x59, 0x140337189\nmov     rcx, rax                                                       ; +0x5c, 0x14033718c\ncall    qword ptr [r8+48h]                                             ; +0x5f, 0x14033718f\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x63, 0x140337193\nmov     rdx, rdi                                                       ; +0x6a, 0x14033719a\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x6d, 0x14033719d\nmov     rdi, rax                                                       ; +0x72, 0x1403371a2\ntest    rax, rax                                                       ; +0x75, 0x1403371a5\njz      short loc_140337203                                            ; +0x78, 0x1403371a8\nmov     rcx, rax                                                       ; +0x7a, 0x1403371aa\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7d, 0x1403371ad\ntest    eax, eax                                                       ; +0x83, 0x1403371b3\njz      short loc_140337203                                            ; +0x85, 0x1403371b5\nmov     rax, [rdi+38h]                                                 ; +0x87, 0x1403371b7\nmov     ecx, [rax]                                                     ; +0x8b, 0x1403371bb\ntest    ecx, ecx                                                       ; +0x8d, 0x1403371bd\njz      short loc_1403371F0                                            ; +0x8f, 0x1403371bf\nmov     rax, [rax+10h]                                                 ; +0x91, 0x1403371c1\nlea     r8, [rcx-1]                                                    ; +0x95, 0x1403371c5\nlea     r8, [rax+r8*8]                                                 ; +0x99, 0x1403371c9\ncmp     rax, r8                                                        ; +0x9d, 0x1403371cd\nja      short loc_1403371F0                                            ; +0xa0, 0x1403371d0\nmov     rdx, [rax]                                                     ; +0xa2, 0x1403371d2\ntest    rdx, rdx                                                       ; +0xa5, 0x1403371d5\njz      short loc_1403371F0                                            ; +0xa8, 0x1403371d8\nmovzx   ecx, byte ptr [rbx+320h]                                       ; +0xaa, 0x1403371da\nmov     [rdx+1D2h], cl                                                 ; +0xb1, 0x1403371e1\nadd     rax, 8                                                         ; +0xb7, 0x1403371e7\ncmp     rax, r8                                                        ; +0xbb, 0x1403371eb\njbe     short loc_1403371D2                                            ; +0xbe, 0x1403371ee\nmov     rcx, [rbx+2D0h]                                                ; +0xc0, 0x1403371f0\nmov     rcx, [rcx+220h]                                                ; +0xc7, 0x1403371f7\ncall    CustomListView__reloadAll                                      ; +0xce, 0x1403371fe\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xd3, 0x140337203\nadd     rsp, 20h                                                       ; +0xd8, 0x140337208\npop     rdi                                                            ; +0xdc, 0x14033720c\nretn                                                                   ; +0xdd, 0x14033720d", "xrefs": ["MessagesProfilePage::init @ 0x140336cd5", "<???> @ 0x1406d524c"], "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"}