{"type": "func", "start": 5373387776, "end": 5373387948, "name": "MessagesProfilePage::selectedCount", "pseudocode": "// \n// MessagesProfilePage::selectedCount from 0x140476400 to 0x1404764ac (172 bytes)\n// \n// 3 xrefs:\n// > MessagesProfilePage::onToggleAllObjects @ 0x140476382\n// > MessagesProfilePage::updateSelectUI @ 0x1404764be\n// > <???> @ 0x14092837c\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:32:40 +0000\n// \n\n__int64 __fastcall MessagesProfilePage::selectedCount(__int64 a1)\n{\n  unsigned int v1; // ebx\n  _BYTE *v2; // rdi\n  __int64 v3; // rcx\n  __int64 StoredOnlineLevels; // rax\n  unsigned int *v5; // rcx\n  __int64 v6; // rax\n  unsigned __int64 v7; // rcx\n  unsigned __int64 i; // r8\n  unsigned int v9; // edx\n  void *v11; // [rsp+30h] [rbp+8h]\n\n  v1 = 0;\n  v2 = (_BYTE *)(a1 + 704);\n  if ( *(_QWORD *)(a1 + 728) > 0xFu )\n    v2 = *(_BYTE **)v2;\n  v3 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v11 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v11);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v3 = *(_QWORD *)&qword_14090BFB0;\n  }\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v3, v2);\n  if ( StoredOnlineLevels )\n  {\n    v5 = *(unsigned int **)(StoredOnlineLevels + 56);\n    v6 = *v5;\n    if ( (_DWORD)v6 )\n    {\n      v7 = *((_QWORD *)v5 + 2);\n      for ( i = v7 + 8 * (v6 - 1); v7 <= i; v7 += 8LL )\n      {\n        v9 = v1;\n        if ( !*(_QWORD *)v7 )\n          break;\n        ++v1;\n        if ( !*(_BYTE *)(*(_QWORD *)v7 + 466LL) )\n          v1 = v9;\n      }\n    }\n  }\n  return v1;\n}", "assembly": "; \n; MessagesProfilePage::selectedCount from 0x140476400 to 0x1404764ac (172 bytes)\n; \n; 3 xrefs:\n; > MessagesProfilePage::onToggleAllObjects @ 0x140476382\n; > MessagesProfilePage::updateSelectUI @ 0x1404764be\n; > <???> @ 0x14092837c\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:32:40 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140476400\npush    rdi                                                            ; +0x5, 0x140476405\nsub     rsp, 20h                                                       ; +0x6, 0x140476406\nxor     ebx, ebx                                                       ; +0xa, 0x14047640a\nlea     rdi, [rcx+2C0h]                                                ; +0xc, 0x14047640c\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x13, 0x140476413\njbe     short loc_14047641D                                            ; +0x18, 0x140476418\nmov     rdi, [rdi]                                                     ; +0x1a, 0x14047641a\nmov     rcx, cs:qword_14090BFB0                                        ; +0x1d, 0x14047641d\ntest    rcx, rcx                                                       ; +0x24, 0x140476424\njnz     short loc_140476457                                            ; +0x27, 0x140476427\nmov     ecx, 690h; Size                                                ; +0x29, 0x140476429\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2e, 0x14047642e\nmov     [rsp+28h+arg_0], rax                                           ; +0x33, 0x140476433\nmov     rcx, rax                                                       ; +0x38, 0x140476438\ncall    GameLevelManager__GameLevelManager                             ; +0x3b, 0x14047643b\nmov     rcx, rax                                                       ; +0x40, 0x140476440\nmov     cs:qword_14090BFB0, rax                                        ; +0x43, 0x140476443\nmov     rax, [rax]                                                     ; +0x4a, 0x14047644a\ncall    qword ptr [rax+48h]                                            ; +0x4d, 0x14047644d\nmov     rcx, cs:qword_14090BFB0                                        ; +0x50, 0x140476450\nmov     rdx, rdi                                                       ; +0x57, 0x140476457\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x5a, 0x14047645a\ntest    rax, rax                                                       ; +0x5f, 0x14047645f\njz      short loc_14047649F                                            ; +0x62, 0x140476462\nmov     rcx, [rax+38h]                                                 ; +0x64, 0x140476464\nmov     eax, [rcx]                                                     ; +0x68, 0x140476468\ntest    eax, eax                                                       ; +0x6a, 0x14047646a\njz      short loc_14047649F                                            ; +0x6c, 0x14047646c\nmov     rcx, [rcx+10h]                                                 ; +0x6e, 0x14047646e\nlea     r8, [rax-1]                                                    ; +0x72, 0x140476472\nlea     r8, [rcx+r8*8]                                                 ; +0x76, 0x140476476\ncmp     rcx, r8                                                        ; +0x7a, 0x14047647a\nja      short loc_14047649F                                            ; +0x7d, 0x14047647d\nnop                                                                    ; +0x7f, 0x14047647f\nmov     edx, ebx                                                       ; +0x80, 0x140476480\nmov     rax, [rcx]                                                     ; +0x82, 0x140476482\ntest    rax, rax                                                       ; +0x85, 0x140476485\njz      short loc_14047649F                                            ; +0x88, 0x140476488\ninc     ebx                                                            ; +0x8a, 0x14047648a\ncmp     byte ptr [rax+1D2h], 0                                         ; +0x8c, 0x14047648c\ncmovz   ebx, edx                                                       ; +0x93, 0x140476493\nadd     rcx, 8                                                         ; +0x96, 0x140476496\ncmp     rcx, r8                                                        ; +0x9a, 0x14047649a\njbe     short loc_140476480                                            ; +0x9d, 0x14047649d\nmov     eax, ebx                                                       ; +0x9f, 0x14047649f\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xa1, 0x1404764a1\nadd     rsp, 20h                                                       ; +0xa6, 0x1404764a6\npop     rdi                                                            ; +0xaa, 0x1404764aa\nretn                                                                   ; +0xab, 0x1404764ab", "xrefs": ["MessagesProfilePage::onToggleAllObjects @ 0x140476382", "MessagesProfilePage::updateSelectUI @ 0x1404764be", "<???> @ 0x14092837c"], "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"}