{"type": "func", "start": 4302528096, "end": 4302528429, "name": "FriendsProfilePage::onToggleSortDir", "pseudocode": "// \n// FriendsProfilePage::onToggleSortDir from 0x100735e60 to 0x100735fad (333 bytes)\n// \n// 1 xrefs:\n// > FriendsProfilePage::init @ 0x100735712\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 12:36:24 +0000\n// \n\n__int64 __fastcall FriendsProfilePage::onToggleSortDir(__int64 a1)\n{\n  __int64 v2; // r14\n  __int64 v3; // rax\n  const char *v4; // rsi\n  __int64 v5; // rax\n  __int64 v6; // rax\n  const char *v7; // rdx\n  const char *v8; // rsi\n  __int64 v9; // rdi\n  void **v10; // rax\n  size_t v11; // rsi\n  int (__cdecl *v12)(const void *, const void *); // rcx\n  unsigned int v13; // eax\n\n  *(_BYTE *)(a1 + 968) ^= 1u;\n  v2 = *(_QWORD *)(a1 + 960);\n  if ( v2 )\n  {\n    v3 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n    v4 = \"edit_downBtn_001.png\";\n    if ( *(_BYTE *)(a1 + 968) )\n      v4 = \"edit_upBtn_001.png\";\n    v5 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v3, v4);\n    (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1160LL))(v2, v5);\n  }\n  v6 = *(_QWORD *)(a1 + 936);\n  if ( v6 )\n  {\n    v7 = \"New\";\n    if ( *(_BYTE *)(a1 + 968) )\n      v7 = \"Old\";\n    v8 = \"A-Z\";\n    if ( *(_BYTE *)(a1 + 968) )\n      v8 = \"Z-A\";\n    if ( *(_BYTE *)(a1 + 944) )\n      v8 = v7;\n    (*(void (__fastcall **)(_QWORD, const char *, const char *))(**(_QWORD **)(v6 + 624) + 928LL))(\n      *(_QWORD *)(v6 + 624),\n      v8,\n      v7);\n  }\n  v9 = *(_QWORD *)(a1 + 856);\n  if ( v9 && (unsigned int)sub_1007FEF90(v9) >= 2 )\n  {\n    v10 = *(void ***)(*(_QWORD *)(a1 + 856) + 56LL);\n    v11 = *(unsigned int *)v10;\n    v12 = (int (__cdecl *)(const void *, const void *))sub_100734500;\n    if ( *(_BYTE *)(a1 + 944) )\n      v12 = (int (__cdecl *)(const void *, const void *))sub_100734680;\n    qsort(v10[2], v11, 8u, v12);\n    if ( *(_BYTE *)(a1 + 968) == 1 )\n      sub_1007FF280(*(_QWORD *)(a1 + 856), v11);\n  }\n  v13 = *(unsigned __int8 *)(a1 + 880);\n  if ( (v13 & 1) == 0 )\n  {\n    if ( !(v13 >> 1) )\n      goto LABEL_24;\n    goto LABEL_23;\n  }\n  if ( *(_QWORD *)(a1 + 888) )\nLABEL_23:\n    FriendsProfilePage::filterUsersWithQuery(a1, a1 + 880);\nLABEL_24:\n  FriendsProfilePage::updateCountLabel(a1);\n  return ScrollableContentLayer::reloadVirtualRows(*(_QWORD *)(a1 + 688), 0.0);\n}", "assembly": "; \n; FriendsProfilePage::onToggleSortDir from 0x100735e60 to 0x100735fad (333 bytes)\n; \n; 1 xrefs:\n; > FriendsProfilePage::init @ 0x100735712\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 12:36:24 +0000\n; \npush    rbp                                                            ; +0x0, 0x100735e60\nmov     rbp, rsp                                                       ; +0x1, 0x100735e61\npush    r14                                                            ; +0x4, 0x100735e64\npush    rbx                                                            ; +0x6, 0x100735e66\nmov     rbx, rdi                                                       ; +0x7, 0x100735e67\nxor     byte ptr [rdi+3C8h], 1                                         ; +0xa, 0x100735e6a\nmov     r14, [rdi+3C0h]                                                ; +0x11, 0x100735e71\ntest    r14, r14                                                       ; +0x18, 0x100735e78\njz      short loc_100735EB2                                            ; +0x1b, 0x100735e7b\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0x1d, 0x100735e7d\nlea     rcx, aEditUpbtn001Pn; \"edit_upBtn_001.png\"                     ; +0x22, 0x100735e82\nlea     rsi, aEditDownbtn001; \"edit_downBtn_001.png\"                   ; +0x29, 0x100735e89\ncmp     byte ptr [rbx+3C8h], 0                                         ; +0x30, 0x100735e90\ncmovnz  rsi, rcx                                                       ; +0x37, 0x100735e97\nmov     rdi, rax                                                       ; +0x3b, 0x100735e9b\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0x3e, 0x100735e9e\nmov     rcx, [r14]                                                     ; +0x43, 0x100735ea3\nmov     rdi, r14                                                       ; +0x46, 0x100735ea6\nmov     rsi, rax                                                       ; +0x49, 0x100735ea9\ncall    qword ptr [rcx+488h]                                           ; +0x4c, 0x100735eac\nmov     rax, [rbx+3A8h]                                                ; +0x52, 0x100735eb2\ntest    rax, rax                                                       ; +0x59, 0x100735eb9\njz      short loc_100735F04                                            ; +0x5c, 0x100735ebc\nlea     rcx, aOld; \"Old\"                                               ; +0x5e, 0x100735ebe\nlea     rdx, aNew_0; \"New\"                                             ; +0x65, 0x100735ec5\ncmp     byte ptr [rbx+3C8h], 0                                         ; +0x6c, 0x100735ecc\ncmovnz  rdx, rcx                                                       ; +0x73, 0x100735ed3\nlea     rcx, aZA; \"Z-A\"                                                ; +0x77, 0x100735ed7\nlea     rsi, aAZ; \"A-Z\"                                                ; +0x7e, 0x100735ede\ncmovnz  rsi, rcx                                                       ; +0x85, 0x100735ee5\ncmp     byte ptr [rbx+3B0h], 0                                         ; +0x89, 0x100735ee9\ncmovnz  rsi, rdx                                                       ; +0x90, 0x100735ef0\nmov     rdi, [rax+270h]                                                ; +0x94, 0x100735ef4\nmov     rax, [rdi]                                                     ; +0x9b, 0x100735efb\ncall    qword ptr [rax+3A0h]                                           ; +0x9e, 0x100735efe\nmov     rdi, [rbx+358h]                                                ; +0xa4, 0x100735f04\ntest    rdi, rdi                                                       ; +0xab, 0x100735f0b\njz      short loc_100735F63                                            ; +0xae, 0x100735f0e\ncall    sub_1007FEF90                                                  ; +0xb0, 0x100735f10\ncmp     eax, 2                                                         ; +0xb5, 0x100735f15\njb      short loc_100735F63                                            ; +0xb8, 0x100735f18\nmov     rax, [rbx+358h]                                                ; +0xba, 0x100735f1a\nmov     rax, [rax+38h]                                                 ; +0xc1, 0x100735f21\nmov     rdi, [rax+10h]; __base                                         ; +0xc5, 0x100735f25\nmov     esi, [rax]; __nel                                              ; +0xc9, 0x100735f29\nlea     rax, sub_100734680                                             ; +0xcb, 0x100735f2b\nlea     rcx, sub_100734500                                             ; +0xd2, 0x100735f32\ncmp     byte ptr [rbx+3B0h], 0                                         ; +0xd9, 0x100735f39\ncmovnz  rcx, rax; __compar                                             ; +0xe0, 0x100735f40\nmov     edx, 8; __width                                                ; +0xe4, 0x100735f44\ncall    _qsort                                                         ; +0xe9, 0x100735f49\ncmp     byte ptr [rbx+3C8h], 1                                         ; +0xee, 0x100735f4e\njnz     short loc_100735F63                                            ; +0xf5, 0x100735f55\nmov     rdi, [rbx+358h]                                                ; +0xf7, 0x100735f57\ncall    sub_1007FF280                                                  ; +0xfe, 0x100735f5e\nmovzx   eax, byte ptr [rbx+370h]                                       ; +0x103, 0x100735f63\ntest    al, 1                                                          ; +0x10a, 0x100735f6a\njnz     short loc_100735F77                                            ; +0x10c, 0x100735f6c\nshr     eax, 1                                                         ; +0x10e, 0x100735f6e\ntest    rax, rax                                                       ; +0x110, 0x100735f70\njnz     short loc_100735F83                                            ; +0x113, 0x100735f73\njmp     short loc_100735F92                                            ; +0x115, 0x100735f75\nmov     rax, [rbx+378h]                                                ; +0x117, 0x100735f77\ntest    rax, rax                                                       ; +0x11e, 0x100735f7e\njz      short loc_100735F92                                            ; +0x121, 0x100735f81\nlea     rsi, [rbx+370h]                                                ; +0x123, 0x100735f83\nmov     rdi, rbx                                                       ; +0x12a, 0x100735f8a\ncall    FriendsProfilePage__filterUsersWithQuery                       ; +0x12d, 0x100735f8d\nmov     rdi, rbx                                                       ; +0x132, 0x100735f92\ncall    FriendsProfilePage__updateCountLabel                           ; +0x135, 0x100735f95\nmov     rdi, [rbx+2B0h]                                                ; +0x13a, 0x100735f9a\nxorps   xmm0, xmm0                                                     ; +0x141, 0x100735fa1\npop     rbx                                                            ; +0x144, 0x100735fa4\npop     r14                                                            ; +0x145, 0x100735fa5\npop     rbp                                                            ; +0x147, 0x100735fa7\njmp     ScrollableContentLayer__reloadVirtualRows                      ; +0x148, 0x100735fa8", "xrefs": ["FriendsProfilePage::init @ 0x100735712"], "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"}