{"type": "func", "start": 5370891328, "end": 5370891576, "name": "FriendsProfilePage::onToggleSortDir", "pseudocode": "// \n// FriendsProfilePage::onToggleSortDir from 0x140214c40 to 0x140214d38 (248 bytes)\n// \n// 4 xrefs:\n// > FriendsProfilePage::init @ 0x1402140e3\n// > <???> @ 0x1408a5348\n// > <???> @ 0x1408a5380\n// > <???> @ 0x14091b674\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:28:20 +0000\n// \n\nvoid __fastcall FriendsProfilePage::onToggleSortDir(__int64 a1)\n{\n  char v2; // cl\n  __int64 *v3; // r14\n  __int64 v4; // rdi\n  const char *v5; // rbx\n  cocos2d::CCSpriteFrameCache *v6; // rax\n  struct cocos2d::CCSpriteFrame *v7; // rax\n  __int64 v8; // rcx\n  const char *v9; // r8\n  const char *v10; // rdx\n  __int64 v11; // rcx\n\n  v2 = *(_BYTE *)(a1 + 976);\n  v3 = *(__int64 **)(a1 + 968);\n  *(_BYTE *)(a1 + 976) = v2 == 0;\n  if ( v3 )\n  {\n    v4 = *v3;\n    v5 = \"edit_downBtn_001.png\";\n    if ( !v2 )\n      v5 = \"edit_upBtn_001.png\";\n    v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n    v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, v5);\n    (*(void (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v4 + 1008))(v3, v7);\n  }\n  v8 = *(_QWORD *)(a1 + 944);\n  if ( v8 )\n  {\n    if ( *(_BYTE *)(a1 + 952) )\n    {\n      v9 = \"Old\";\n      v10 = \"New\";\n    }\n    else\n    {\n      v9 = \"Z-A\";\n      v10 = \"A-Z\";\n    }\n    v11 = *(_QWORD *)(v8 + 632);\n    if ( *(_BYTE *)(a1 + 976) )\n      v10 = v9;\n    (**(void (__fastcall ***)(__int64, const char *, const char *))(v11 + 360))(v11 + 360, v10, v9);\n  }\n  FriendsProfilePage::sortUsers(a1);\n  if ( *(_QWORD *)(a1 + 896) )\n    FriendsProfilePage::filterUsersWithQuery(a1);\n  FriendsProfilePage::updateCountLabel(a1);\n}", "assembly": "; \n; FriendsProfilePage::onToggleSortDir from 0x140214c40 to 0x140214d38 (248 bytes)\n; \n; 4 xrefs:\n; > FriendsProfilePage::init @ 0x1402140e3\n; > <???> @ 0x1408a5348\n; > <???> @ 0x1408a5380\n; > <???> @ 0x14091b674\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:28:20 +0000\n; \npush    rsi                                                            ; +0x0, 0x140214c40\nsub     rsp, 20h                                                       ; +0x2, 0x140214c42\nmov     rsi, rcx                                                       ; +0x6, 0x140214c46\nmov     [rsp+28h+arg_10], r14                                          ; +0x9, 0x140214c49\nmovzx   ecx, byte ptr [rcx+3D0h]                                       ; +0xe, 0x140214c4e\ntest    cl, cl                                                         ; +0x15, 0x140214c55\nmov     r14, [rsi+3C8h]                                                ; +0x17, 0x140214c57\nsetz    al                                                             ; +0x1e, 0x140214c5e\nmov     [rsi+3D0h], al                                                 ; +0x21, 0x140214c61\ntest    r14, r14                                                       ; +0x27, 0x140214c67\njz      short loc_140214CB5                                            ; +0x2a, 0x140214c6a\nmov     [rsp+28h+arg_0], rbx                                           ; +0x2c, 0x140214c6c\nlea     rax, aEditUpbtn001Pn; \"edit_upBtn_001.png\"                     ; +0x31, 0x140214c71\ntest    cl, cl                                                         ; +0x38, 0x140214c78\nmov     [rsp+28h+arg_8], rdi                                           ; +0x3a, 0x140214c7a\nmov     rdi, [r14]                                                     ; +0x3f, 0x140214c7f\nlea     rbx, aEditDownbtn001; \"edit_downBtn_001.png\"                   ; +0x42, 0x140214c82\ncmovz   rbx, rax                                                       ; +0x49, 0x140214c89\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x4d, 0x140214c8d\nmov     rcx, rax                                                       ; +0x53, 0x140214c93\nmov     rdx, rbx                                                       ; +0x56, 0x140214c96\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x59, 0x140214c99\nmov     rdx, rax                                                       ; +0x5f, 0x140214c9f\nmov     rcx, r14                                                       ; +0x62, 0x140214ca2\ncall    qword ptr [rdi+3F0h]                                           ; +0x65, 0x140214ca5\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x6b, 0x140214cab\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x70, 0x140214cb0\nmov     rcx, [rsi+3B0h]                                                ; +0x75, 0x140214cb5\nmov     r14, [rsp+28h+arg_10]                                          ; +0x7c, 0x140214cbc\ntest    rcx, rcx                                                       ; +0x81, 0x140214cc1\njz      short loc_140214D0D                                            ; +0x84, 0x140214cc4\ncmp     byte ptr [rsi+3B8h], 0                                         ; +0x86, 0x140214cc6\nmovzx   eax, byte ptr [rsi+3D0h]                                       ; +0x8d, 0x140214ccd\njz      short loc_140214CE6                                            ; +0x94, 0x140214cd4\nlea     r8, aOld; \"Old\"                                                ; +0x96, 0x140214cd6\nlea     rdx, aNew_0; \"New\"                                             ; +0x9d, 0x140214cdd\njmp     short loc_140214CF4                                            ; +0xa4, 0x140214ce4\nlea     r8, aZA; \"Z-A\"                                                 ; +0xa6, 0x140214ce6\nlea     rdx, aAZ; \"A-Z\"                                                ; +0xad, 0x140214ced\nmov     rcx, [rcx+278h]                                                ; +0xb4, 0x140214cf4\ntest    al, al                                                         ; +0xbb, 0x140214cfb\ncmovnz  rdx, r8                                                        ; +0xbd, 0x140214cfd\nadd     rcx, 168h                                                      ; +0xc1, 0x140214d01\nmov     rax, [rcx]                                                     ; +0xc8, 0x140214d08\ncall    qword ptr [rax]                                                ; +0xcb, 0x140214d0b\nmov     rcx, rsi                                                       ; +0xcd, 0x140214d0d\ncall    FriendsProfilePage__sortUsers                                  ; +0xd0, 0x140214d10\nlea     rdx, [rsi+370h]                                                ; +0xd5, 0x140214d15\ncmp     qword ptr [rdx+10h], 0                                         ; +0xdc, 0x140214d1c\njz      short loc_140214D2B                                            ; +0xe1, 0x140214d21\nmov     rcx, rsi                                                       ; +0xe3, 0x140214d23\ncall    FriendsProfilePage__filterUsersWithQuery                       ; +0xe6, 0x140214d26\nmov     rcx, rsi                                                       ; +0xeb, 0x140214d2b\nadd     rsp, 20h                                                       ; +0xee, 0x140214d2e\npop     rsi                                                            ; +0xf2, 0x140214d32\njmp     FriendsProfilePage__updateCountLabel                           ; +0xf3, 0x140214d33", "xrefs": ["FriendsProfilePage::init @ 0x1402140e3", "<???> @ 0x1408a5348", "<???> @ 0x1408a5380", "<???> @ 0x14091b674"], "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"}